Class IxKeyValue

    • Method Detail

      • getKeyNames

        public Set<String> getKeyNames()
        Returns:
        Returns the key names.
      • getKeyValue

        public IIxValue getKeyValue​(String p_key)
        Returns the value for the given key. If no key set an empty value will returned.
        Parameters:
        p_key - The key name.
        Returns:
        Returns the value of the key or empty.
      • getType

        public de.uplanet.lucy.types.UP_TYPE getType()
        Description copied from interface: IIxValue
        Returns the type. For internal use only.
        Specified by:
        getType in interface IIxValue
        Returns:
        Returns the value type (not null).
      • asValueHolder

        public IValueHolder<?> asValueHolder()
        Description copied from interface: IIxValue
        Returns the value as an value holder.
        Specified by:
        asValueHolder in interface IIxValue
        Returns:
        Converts a IIxValue to an value holder.
      • 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
                                all other values false
        
                Numeric (int, long, double):
                        0 = false
                        1 = true
                        other values true (value != 0)
         
        Specified by:
        asBoolean in interface IIxValue
        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
         
        Specified by:
        asDouble in interface IIxValue
        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
         
        Specified by:
        asInt in interface IIxValue
        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
         
        Specified by:
        asLong in interface IIxValue
        Returns:
        Returns the value as an long. Throws an exception if IIxValue.hasValue() == false or the value type cannot be casted to an long.
      • 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
        Returns:
        Returns the value as an timestamp.
      • asTimestamp

        public Timestamp asTimestamp​(Timestamp p_fallbackValue)
        Description copied from interface: IIxValue
        Returns the timestamp value or the given fallback value for an empty value.
                Value must be a date / timestamp type. No cast will be done.
         
        Specified by:
        asTimestamp in interface IIxValue
        Parameters:
        p_fallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an timestamp.
      • 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
        Returns:
        Returns the value as an date.
      • asDate

        public Date asDate​(Date p_fallbackValue)
        Description copied from interface: IIxValue
        Returns the date value or the fallback date for an empty value.
                Value must be a date / time stamp / string type.
         
        Specified by:
        asDate in interface IIxValue
        Parameters:
        p_fallbackValue - The fallback value used if IIxValue.hasValue() == false.
        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
        Returns:
        Returns the value as an time.
      • asTime

        public Date asTime​(Date p_fallback)
        Description copied from interface: IIxValue
        Returns the time value or the fallback value on an empty value.
                Value must be a time / time stamp / string type.
         
        Specified by:
        asTime in interface IIxValue
        Returns:
        Returns the value as an time or the fallback value on an empty value.
      • asBigDecimal

        public BigDecimal asBigDecimal()
        Description copied from interface: IIxValue
        Returns a big decimal value.
         Cast Rules:
                String
                        new BigDecimal(value)
                Numeric Types
                        new BigDecimalvalue)
                
        Specified by:
        asBigDecimal in interface IIxValue
        Returns:
        Returns the value as an big decimal or null if IIxValue.hasValue() == false.
      • 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
        Returns:
        Returns the value as an string.
      • hasValue

        public boolean hasValue()
        Description copied from interface: IIxValue
        Returns true if the value is not empty or exits.
        Specified by:
        hasValue in interface IIxValue
        Returns:
        Returns true if IIxValue.getValue() != null otherwise false will returned.
      • asBoolean

        public boolean asBoolean​(boolean p_bFallbackValue)
        Description copied from interface: IIxValue
        Returns the boolean value or the fallback value on an empty value.
         Cast Rules:
                String
                        "0" = false
                        "1" = true
                        "true" = true
                        "false" = false
                                all other values false
                Numeric (int, long, double):
                        0 = false
                        1 = true
                                all other values true (value != 0)
         
        Specified by:
        asBoolean in interface IIxValue
        Parameters:
        p_bFallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an boolean or the given fallback value if IIxValue.hasValue() == false.
      • asDouble

        public double asDouble​(double p_dFallbackValue)
        Description copied from interface: IIxValue
        Returns the value as an double or the fallback value on an empty value.
         Cast Rules:
                String
                        Double.parseDouble(value)
        
                Numeric:
                        (double)value
         
        Specified by:
        asDouble in interface IIxValue
        Parameters:
        p_dFallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an double or the fallback value if IIxValue.hasValue() == false.
      • asInt

        public int asInt​(int p_iFallbackValue)
        Description copied from interface: IIxValue
        Returns a integer value or the fallback value on an empty value.
         Cast Rules:
                String
                        Integer.parseInteger(value)
        
                Numeric Types
                        (int)value
        
          Other types:
                String.valueOf(type) will check.
         
        Specified by:
        asInt in interface IIxValue
        Parameters:
        p_iFallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an integer or p_iFallbackValue if IIxValue.hasValue() == false
      • asLong

        public long asLong​(long p_lFallbackValue)
        Description copied from interface: IIxValue
        Returns a long value or the fallback value on an empty value.
         Cast Rules:
                String
                        Long.parseLong(value)
        
                Numeric Types
                        (long)value
        
          Other types:
                String.valueOf(type) will check.
         
        Specified by:
        asLong in interface IIxValue
        Parameters:
        p_lFallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an long or p_lFallbackValue if IIxValue.hasValue() == false.
      • asString

        public String asString​(String p_strFallbackValue)
        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
        Parameters:
        p_strFallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an string or p_strFallbackValue if IIxValue.hasValue() == false.
      • asBigDecimal

        public BigDecimal asBigDecimal​(BigDecimal p_fallbackValue)
        Description copied from interface: IIxValue
        Returns a big decimal value or the fallback value on an empty value.
         Cast Rules:
                String
                        new BigDecimal(value)
                Numeric Types
                        new BigDecimalvalue)
                
        Specified by:
        asBigDecimal in interface IIxValue
        Parameters:
        p_fallbackValue - The fallback value used if IIxValue.hasValue() == false.
        Returns:
        Returns the value as an string or p_fallbackValue if IIxValue.hasValue() == false.
      • isPrimitive

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