Class IxObjectValue

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

public final class IxObjectValue extends de.uplanet.lucy.server.ixvalue.AbstractIxValue
  • Constructor Details

    • IxObjectValue

      public IxObjectValue(Object p_value)
      Parameters:
      p_value - The value (could be null)
    • IxObjectValue

      public IxObjectValue(Object p_value, boolean p_empty)
      Parameters:
      p_value - The value (could be null)
      p_empty - true if the value is empty, otherwise false, if empty is true then asString() will return null instead of throwing an exception
  • Method Details

    • getValue

      public Object getValue()
      Description copied from interface: IIxValue
      Returns:
      Returns the value (could be null).
    • asValueHolder

      public 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()
      Description copied from interface: IIxValue
      Returns the value as an string
       Cast Rules:
          Date values: A string representation of the date in the yyyy-MM-dd HH:mm:ss format,
          calculated for the TimeZone UTC.
      
          Other Types: String.valueOf(type) will returned.
       
      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.
    • 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.
    • 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.
    • 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...