Class ValueHolderFactory

java.lang.Object
de.uplanet.lucy.server.dataobjects.impl.ValueHolderFactory

public final class ValueHolderFactory extends Object
  • Method Details

    • 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 IStringValueHolder getValueHolder(char[] p_chars)
    • getValueHolder

      public static IStringValueHolder getValueHolder(CharSequence p_chseq)
    • getValueHolder

      public static IValueHolder<?> getValueHolder(boolean p_bValue)
    • 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(Short p_sValue)
    • getValueHolder

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

      public static IValueHolder<?> getValueHolder(Integer p_intValue)
    • 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 IValueHolder<?> getValueHolder(Double p_dblValue)
    • getValueHolder

      public static IValueHolder<?> getValueHolder(BigDecimal p_decValue)
    • getFileValueHolder

      public static IFileValueHolder getFileValueHolder(Path p_file)
    • getFileValueHolder

      public static IFileValueHolder getFileValueHolder(File p_file)
    • getValueHolder

      public static IFileValueHolder getValueHolder(IVHFileDescriptor p_fileDesc)
    • getValueHolder

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

      public static IFileValueHolder getValueHolder(Collection<? extends IVHFileDescriptor> p_fileDesc)
    • getValueHolder

      public static IDateTimeValueHolder getValueHolder(Date p_dt)
    • getValueHolder

      public static IDateTimeValueHolder getValueHolder(FileTime p_dt)
    • getValueHolder

      @Deprecated public static IDateTimeValueHolder getValueHolder(Calendar p_cal)
      Deprecated.
      There is no value holder that is able to retain the full calendar information. Use getValueHolder(Date) instead.
    • 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.
    • getBeanProperties

      public static Map<QName,IValueHolder<?>> getBeanProperties(String p_strNamespaceUri, Object p_obj) throws ReflectiveOperationException
      Get bean properties from the given object.
      Parameters:
      p_strNamespaceUri - The namespace URI for the created properties.
      p_obj - The object to get the values from.
      Returns:
      A map that contains the bean properties.
      Throws:
      IllegalArgumentException - If the given object is null.
      ReflectiveOperationException - If a reflection error occurred.
    • 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