de.uplanet.lucy.server.dataobjects.impl
Class ValueHolderFactory

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

public final class ValueHolderFactory
extends java.lang.Object

Version:
$Revision: 89621 $

Method Summary
static IValueHolder<?> createValueHolderWithDataType(java.lang.String p_strDefault, de.uplanet.lucy.types.UP_TYPE p_dataType, java.util.TimeZone p_tz)
           
static java.util.Map<javax.xml.namespace.QName,IValueHolder<?>> getBeanProperties(java.lang.String p_strNamespaceUri, java.lang.Object p_obj)
           
static IFileValueHolder getFileValueHolder(java.io.File p_file)
           
static IValueHolder<?> getIxValueHolder(java.lang.Object p_value, javax.xml.namespace.QName p_qnmType)
          Get a standard value holder for the given Intrexx datatype.
static IValueHolder<?> getNullValueHolder()
          Get a value holder that holds a xsd:anySimpleType typed null value.
static IValueHolder<?> getNullValueHolder(javax.xml.namespace.QName p_qnmType)
          Get a value holder that holds a typed null value.
static IValueHolder<?> getNullValueHolderForControlType(de.uplanet.lucy.types.IControlType p_controlDataType, de.uplanet.lucy.types.IControlType p_refControlDataType)
           
static IValueHolder<?> getNullValueHolderForDBType(de.uplanet.lucy.types.UP_TYPE p_eType)
           
static IValueHolder<?> getValueHolder(java.math.BigDecimal p_decValue)
           
static IValueHolder<?> getValueHolder(boolean p_bValue)
           
static IValueHolder<?> getValueHolder(java.lang.Boolean p_bValue)
           
static IValueHolder<?> getValueHolder(byte p_byValue)
           
static IValueHolder<?> getValueHolder(java.lang.Byte p_byteValue)
           
static IStringValueHolder getValueHolder(char[] p_chars)
           
static IStringValueHolder getValueHolder(java.lang.CharSequence p_chseq)
           
static IDateTimeValueHolder getValueHolder(java.util.Date p_dt)
           
static IValueHolder<?> getValueHolder(double p_dblValue)
           
static IValueHolder<?> getValueHolder(java.lang.Double p_dblValue)
           
static IValueHolder<?> getValueHolder(float p_fValue)
           
static IValueHolder<?> getValueHolder(java.lang.Float p_fltValue)
           
static IValueHolder<?> getValueHolder(int p_iValue)
           
static IValueHolder<?> getValueHolder(java.lang.Integer p_intValue)
           
static IValueHolder<?> getValueHolder(IValueHolder<?> p_valueHolder)
          Deprecated. Do not use this antipattern. The caller should use explicit code.
static IValueHolder<?> getValueHolder(long p_lValue)
           
static IValueHolder<?> getValueHolder(java.lang.Long p_lngValue)
           
static IValueHolder<?> getValueHolder(java.lang.Object p_value)
          Get a value holder that wraps the given value.
static IValueHolder<?> getValueHolder(short p_sValue)
           
static IValueHolder<?> getValueHolder(java.lang.Short p_sValue)
           
static IDateTimeValueHolder getValueHolder(UpCalendar p_calendar)
          creates a new java.util.Date Instance from the UPCalender in UTC
static IFileValueHolder getValueHolder(VHFileDescriptor p_fileDesc)
           
static XmlSchemaDatatypeValueHolder getXmlSchemaValueHolder(java.lang.Object p_objValue)
          Get a value holder that wraps the given object as an XML Schema type.
static XmlSchemaDatatypeValueHolder getXmlSchemaValueHolder(java.lang.String p_strValue, javax.xml.namespace.QName p_qnmType)
          Get a value holder that wraps a parsed XML Schema type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(javax.xml.namespace.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(java.lang.CharSequence p_chseq)

getValueHolder

public static IValueHolder<?> getValueHolder(boolean p_bValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Boolean p_bValue)

getValueHolder

public static IValueHolder<?> getValueHolder(byte p_byValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Byte p_byteValue)

getValueHolder

public static IValueHolder<?> getValueHolder(short p_sValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Short p_sValue)

getValueHolder

public static IValueHolder<?> getValueHolder(int p_iValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Integer p_intValue)

getValueHolder

public static IValueHolder<?> getValueHolder(long p_lValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Long p_lngValue)

getValueHolder

public static IValueHolder<?> getValueHolder(float p_fValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Float p_fltValue)

getValueHolder

public static IValueHolder<?> getValueHolder(double p_dblValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.Double p_dblValue)

getValueHolder

public static IValueHolder<?> getValueHolder(java.math.BigDecimal p_decValue)

getFileValueHolder

public static IFileValueHolder getFileValueHolder(java.io.File p_file)

getValueHolder

public static IFileValueHolder getValueHolder(VHFileDescriptor p_fileDesc)

getValueHolder

public static IDateTimeValueHolder getValueHolder(java.util.Date p_dt)

getValueHolder

public static IDateTimeValueHolder getValueHolder(UpCalendar p_calendar)
creates a new java.util.Date Instance from the UPCalender in UTC

Parameters:
p_calendar -
Returns:
IDateTimeValueHolder

getValueHolder

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

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

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

getIxValueHolder

public static IValueHolder<?> getIxValueHolder(java.lang.Object p_value,
                                               javax.xml.namespace.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(java.lang.String p_strDefault,
                                                            de.uplanet.lucy.types.UP_TYPE p_dataType,
                                                            java.util.TimeZone p_tz)

getXmlSchemaValueHolder

public static XmlSchemaDatatypeValueHolder getXmlSchemaValueHolder(java.lang.String p_strValue,
                                                                   javax.xml.namespace.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(java.lang.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:
java.lang.IllegalArgumentException - - If the given object could not be wrapped as an XML Schema type.

getBeanProperties

public static java.util.Map<javax.xml.namespace.QName,IValueHolder<?>> getBeanProperties(java.lang.String p_strNamespaceUri,
                                                                                         java.lang.Object p_obj)
                                                                                  throws java.lang.IllegalArgumentException,
                                                                                         java.lang.IllegalAccessException,
                                                                                         java.lang.reflect.InvocationTargetException,
                                                                                         de.uplanet.xml.schema.XmlSchemaDatatypeParseException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
de.uplanet.xml.schema.XmlSchemaDatatypeParseException

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.IControlType p_controlDataType,
                                                               de.uplanet.lucy.types.IControlType p_refControlDataType)
Parameters:
p_controlDataType -
p_refControlDataType - may be null (only used for listbox,dropdown multilistbox controls)
Returns:
a type specific Null ValueHolder


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.