Class ValueHolderFactory


  • public final class ValueHolderFactory
    extends Object
    • Method Detail

      • getValueHolder

        @Deprecated
        public static IValueHolder<?> getValueHolder​(IValueHolder<?> p_valueHolder)
        Deprecated.
        Do not use this antipattern. The caller should use explicit code.
      • getNullValueHolder

        public static IValueHolder<?> getNullValueHolder()
        Get a value holder that holds a xsd:anySimpleType typed null value.
        Returns:
        A value holder that contains a null value.
      • getNullValueHolder

        public static IValueHolder<?> getNullValueHolder​(QName p_qnmType)
        Get a value holder that holds a typed null value.
        Parameters:
        p_qnmType - The type of the null value.
        Returns:
        A value holder that contains a null value.
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(boolean p_bValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(byte p_byValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(Byte p_byteValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(short p_sValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(int p_iValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(long p_lValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(Long p_lngValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(float p_fValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(Float p_fltValue)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(double p_dblValue)
      • getValueHolder

        public static IFileValueHolder getValueHolder​(de.uplanet.lucy.server.util.IVHFileDescriptor p_fileDesc)
      • getValueHolder

        public static IFileValueHolder getValueHolder​(de.uplanet.lucy.server.util.IVHFileDescriptors p_fileDesc)
      • getValueHolder

        public static IFileValueHolder getValueHolder​(Collection<? extends de.uplanet.lucy.server.util.IVHFileDescriptor> p_fileDesc)
      • getValueHolder

        public static IValueHolder<?> getValueHolder​(Object p_value)
        Get a value holder that wraps the given value.

        Calls to this methods are being dispatched to the dedicated getValueHolder(...) methods.

        Note: Avoid this method and use a more specifically typed method instead.

        Parameters:
        p_value - The value to be wrapped in a IValueHolder.
        Returns:
        The wrapped value.
        Throws:
        NullPointerException - If the given value is null.
        IllegalArgumentException - If no value holder is available for the given type of value.
      • getIxValueHolder

        public static IValueHolder<?> getIxValueHolder​(Object p_value,
                                                       QName p_qnmType)
        Get a standard value holder for the given Intrexx datatype.
        Parameters:
        p_value - The value to be wrapped.
        p_qnmType - The Intrexx Datatype.
        Returns:
        The wrapped value.
      • createValueHolderWithDataType

        public static IValueHolder<?> createValueHolderWithDataType​(String p_strDefault,
                                                                    de.uplanet.lucy.types.UP_TYPE p_dataType,
                                                                    TimeZone p_tz)
      • getXmlSchemaValueHolder

        public static XmlSchemaDatatypeValueHolder getXmlSchemaValueHolder​(String p_strValue,
                                                                           QName p_qnmType)
                                                                    throws de.uplanet.xml.schema.XmlSchemaDatatypeParseException
        Get a value holder that wraps a parsed XML Schema type.
        Parameters:
        p_strValue - The value as a string.
        p_qnmType - The XML Schema type.
        Returns:
        The wrapped value.
        Throws:
        de.uplanet.xml.schema.XmlSchemaDatatypeParseException - If the given p_strValue could not be parsed as the required datatype.
      • getXmlSchemaValueHolder

        public static XmlSchemaDatatypeValueHolder getXmlSchemaValueHolder​(Object p_objValue)
        Get a value holder that wraps the given object as an XML Schema type.
        Parameters:
        p_objValue - The object to be wrapped.
        Returns:
        The wrapped object.
        Throws:
        IllegalArgumentException - - If the given object could not be wrapped as an XML Schema type.
      • getNullValueHolderForDBType

        public static IValueHolder<?> getNullValueHolderForDBType​(de.uplanet.lucy.types.UP_TYPE p_eType)
        Parameters:
        p_eType -
        Returns:
        A type specific Null ValueHolder.
      • getNullValueHolderForControlType

        public static IValueHolder<?> getNullValueHolderForControlType​(de.uplanet.lucy.types.CONTROL_TYPE p_controlDataType)
        Parameters:
        p_controlDataType -
        Returns:
        a type specific Null ValueHolder