de.uplanet.lucy.server.auxiliaries
Class ValueHolderFactory

java.lang.Object
  extended by de.uplanet.lucy.server.auxiliaries.ValueHolderFactory

@VelocityCallable(value="singleton")
public final class ValueHolderFactory
extends java.lang.Object

Version:
$Revision: 64100 $

Constructor Summary
ValueHolderFactory()
           
 
Method Summary
static NowValueHolder getNowValueHolder()
          Get a value holder, that holds the current date and time.
static IValueHolder<?> getValueHolder(java.lang.Object p_value)
          Get a value holder that wraps the given value.
static IValueHolder<?> getValueHolder(java.lang.String p_strValue, java.lang.String p_strNamespaceURI, java.lang.String p_strLocalPart)
          Get a value holder that wraps a parsed XML Schema type.
static IValueHolder<?> getVH(float p_fVal)
          Get a value holder that wraps the given float value.
static IValueHolder<?> getVH(int p_iVal)
          Get a value holder that wraps the given int value.
static IValueHolder<?> getVH(java.lang.Object p_value)
          Get a value holder that wraps the given value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueHolderFactory

public ValueHolderFactory()
Method Detail

getValueHolder

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

Parameters:
p_value - The value to be wrapped in a IValueHolder.
Returns:
The wrapped value, or null if the value could not be wrapped in a value holder.

getVH

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

Parameters:
p_value - The value to be wrapped in a IValueHolder.
Returns:
The wrapped value, or null if the value could not be wrapped in a value holder.

getVH

public static IValueHolder<?> getVH(int p_iVal)
Get a value holder that wraps the given int value.

Parameters:
p_iVal - The value to be wrapped in a IValueHolder.
Returns:
The wrapped value, or null if the value could not be wrapped in a value holder.

getVH

public static IValueHolder<?> getVH(float p_fVal)
Get a value holder that wraps the given float value.

Parameters:
p_fVal - The value to be wrapped in a IValueHolder.
Returns:
The wrapped value, or null if the value could not be wrapped in a value holder.

getValueHolder

public static IValueHolder<?> getValueHolder(java.lang.String p_strValue,
                                             java.lang.String p_strNamespaceURI,
                                             java.lang.String p_strLocalPart)
                                      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_strNamespaceURI - The URI of the namespace the type belongs to. Must be http://www.w3.org/2001/XMLSchema.
p_strLocalPart - The local part of the type name.
Returns:
The wrapped value.
Throws:
java.lang.IllegalArgumentException - - If the given namespace URI does not match http://www.w3.org/2001/XMLSchema;
de.uplanet.xml.schema.XmlSchemaDatatypeParseException

getNowValueHolder

public static NowValueHolder getNowValueHolder()
Get a value holder, that holds the current date and time.



Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.