Class IxDateTimeValue

java.lang.Object
de.uplanet.lucy.server.ixvalue.AbstractIxValue
de.uplanet.lucy.server.ixvalue.IxDateTimeValue
All Implemented Interfaces:
IIxValue

public final class IxDateTimeValue extends de.uplanet.lucy.server.ixvalue.AbstractIxValue
  • Field Summary

    Fields inherited from interface de.uplanet.lucy.server.ixvalue.IIxValue

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a big decimal value.
    boolean
    Returns the a boolean value.
    Returns the date value.
    double
    Returns a double value.
    int
    Returns a integer value.
    long
    Returns a long value.
    Returns a iso string representation of the date in the yyyy-MM-ddTHH:mm:ssZ format, calculated for the TimeZone UTC.
    Returns the time value.
    Returns a timestamp value.
    de.uplanet.lucy.server.dataobjects.IValueHolder<?>
    Returns the value as an value holder.
    Returns the physical value.
    boolean
    Returns true on a primitive value type like integer or boolean.

    Methods inherited from class de.uplanet.lucy.server.ixvalue.AbstractIxValue

    asBigDecimal, asBoolean, asDate, asDouble, asInt, asLong, asString, asTime, asTimestamp, getType, hasValue

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IxDateTimeValue

      public IxDateTimeValue(Date p_value)
      Parameters:
      p_value - The value (could be null)
  • Method Details

    • getValue

      public Date getValue()
      Description copied from interface: IIxValue
      Returns:
      the value
    • asValueHolder

      public de.uplanet.lucy.server.dataobjects.IValueHolder<?> asValueHolder()
      Description copied from interface: IIxValue
      Returns the value as an value holder.
      Returns:
      Converts a IIxValue to an value holder.
    • asString

      public String asString()
      Returns a iso string representation of the date in the yyyy-MM-ddTHH:mm:ssZ format, calculated for the TimeZone UTC.
      Specified by:
      asString in interface IIxValue
      Overrides:
      asString in class de.uplanet.lucy.server.ixvalue.AbstractIxValue
      Returns:
      Returns the value as an string.
    • asBoolean

      public boolean asBoolean()
      Description copied from interface: IIxValue
      Returns the a boolean value.
       Cast Rules:
              String
                      "0" = false
                      "1" = true
                      "true" = true
                      "false" = false
      
              Numeric (int, long, double):
                      0 = false
                      1 = true
      
       
      Returns:
      Returns the value as an boolean.
    • asDouble

      public double asDouble()
      Description copied from interface: IIxValue
      Returns a double value.
       Cast Rules:
              String
                      Double.parseDouble(value)
      
              Numeric Types
                      (double)value
       
      Returns:
      Returns the value as an double.
    • asInt

      public int asInt()
      Description copied from interface: IIxValue
      Returns a integer value.
       Cast Rules:
              String
                      Integer.parseInteger(value)
      
              Numeric Types
                      (int)value
       
      Returns:
      Returns the value as an integer.
    • asLong

      public long asLong()
      Description copied from interface: IIxValue
      Returns a long value.
       Cast Rules:
              String
                      Long.parseLong(value)
      
              Numeric Types
                      (long)value
       
      Returns:
      Returns the value as an long. Throws an exception if IIxValue.hasValue() == false or the value type cannot be cast to an long.
    • asBigDecimal

      public BigDecimal asBigDecimal()
      Description copied from interface: IIxValue
      Returns a big decimal value.
       Cast Rules:
              String
                      new BigDecimal(value)
              Numeric Types
                      new BigDecimalvalue)
              
      Returns:
      Returns the value as an big decimal or null if IIxValue.hasValue() == false.
    • asDate

      public Date asDate()
      Description copied from interface: IIxValue
      Returns the date value.
              Value must be a date / time stamp / string type.
       
      Specified by:
      asDate in interface IIxValue
      Overrides:
      asDate in class de.uplanet.lucy.server.ixvalue.AbstractIxValue
      Returns:
      Returns the value as an date.
    • asTime

      public Date asTime()
      Description copied from interface: IIxValue
      Returns the time value.
              Value must be a time / time stamp / string type.
       
      Specified by:
      asTime in interface IIxValue
      Overrides:
      asTime in class de.uplanet.lucy.server.ixvalue.AbstractIxValue
      Returns:
      Returns the value as an time.
    • asTimestamp

      public Timestamp asTimestamp()
      Description copied from interface: IIxValue
      Returns a timestamp value.
              Value must be a date / timestamp type. No cast will be done.
       
      Specified by:
      asTimestamp in interface IIxValue
      Overrides:
      asTimestamp in class de.uplanet.lucy.server.ixvalue.AbstractIxValue
      Returns:
      Returns the value as an timestamp.
    • isPrimitive

      public boolean isPrimitive()
      Description copied from interface: IIxValue
      Returns true on a primitive value type like integer or boolean.
      Returns:
      Returns true if the value represent an primitive type like a boolean, integer...