Class ValueHolderFactory
- java.lang.Object
-
- de.uplanet.lucy.server.dataobjects.impl.ValueHolderFactory
-
public final class ValueHolderFactory extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static IValueHolder<?>
createValueHolderWithDataType(String p_strDefault, de.uplanet.lucy.types.UP_TYPE p_dataType, TimeZone p_tz)
static Map<QName,IValueHolder<?>>
getBeanProperties(String p_strNamespaceUri, Object p_obj)
Get bean properties from the given object.static IFileValueHolder
getFileValueHolder(File p_file)
static IFileValueHolder
getFileValueHolder(Path p_file)
static IValueHolder<?>
getIxValueHolder(Object p_value, QName p_qnmType)
Get a standard value holder for the given Intrexx datatype.static IValueHolder<?>
getNullValueHolder()
Get a value holder that holds axsd:anySimpleType
typednull
value.static IValueHolder<?>
getNullValueHolder(QName p_qnmType)
Get a value holder that holds a typednull
value.static IValueHolder<?>
getNullValueHolderForControlType(de.uplanet.lucy.types.CONTROL_TYPE p_controlDataType)
static IValueHolder<?>
getNullValueHolderForDBType(de.uplanet.lucy.types.UP_TYPE p_eType)
static IValueHolder<?>
getValueHolder(boolean p_bValue)
static IValueHolder<?>
getValueHolder(byte p_byValue)
static IStringValueHolder
getValueHolder(char[] p_chars)
static IValueHolder<?>
getValueHolder(double p_dblValue)
static IValueHolder<?>
getValueHolder(float p_fValue)
static IValueHolder<?>
getValueHolder(int p_iValue)
static IValueHolder<?>
getValueHolder(long p_lValue)
static IValueHolder<?>
getValueHolder(short p_sValue)
static IValueHolder<?>
getValueHolder(IValueHolder<?> p_valueHolder)
Deprecated.Do not use this antipattern.static IFileValueHolder
getValueHolder(de.uplanet.lucy.server.util.IVHFileDescriptor p_fileDesc)
static IFileValueHolder
getValueHolder(de.uplanet.lucy.server.util.IVHFileDescriptors p_fileDesc)
static IValueHolder<?>
getValueHolder(Boolean p_bValue)
static IValueHolder<?>
getValueHolder(Byte p_byteValue)
static IStringValueHolder
getValueHolder(CharSequence p_chseq)
static IValueHolder<?>
getValueHolder(Double p_dblValue)
static IValueHolder<?>
getValueHolder(Float p_fltValue)
static IValueHolder<?>
getValueHolder(Integer p_intValue)
static IValueHolder<?>
getValueHolder(Long p_lngValue)
static IValueHolder<?>
getValueHolder(Object p_value)
Get a value holder that wraps the given value.static IValueHolder<?>
getValueHolder(Short p_sValue)
static IValueHolder<?>
getValueHolder(BigDecimal p_decValue)
static IDateTimeValueHolder
getValueHolder(FileTime p_dt)
static IDateTimeValueHolder
getValueHolder(Calendar p_cal)
Deprecated.There is no value holder that is able to retain the full calendar information.static IFileValueHolder
getValueHolder(Collection<? extends de.uplanet.lucy.server.util.IVHFileDescriptor> p_fileDesc)
static IDateTimeValueHolder
getValueHolder(Date p_dt)
static XmlSchemaDatatypeValueHolder
getXmlSchemaValueHolder(Object p_objValue)
Get a value holder that wraps the given object as an XML Schema type.static XmlSchemaDatatypeValueHolder
getXmlSchemaValueHolder(String p_strValue, QName p_qnmType)
Get a value holder that wraps a parsed XML Schema type.
-
-
-
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 axsd:anySimpleType
typednull
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 typednull
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(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 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. UsegetValueHolder(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 aIValueHolder
.- Returns:
- The wrapped value.
- Throws:
NullPointerException
- If the given value isnull
.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 givenp_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 isnull
.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
-
-