com.flexive.shared.configuration.parameters
Class StringParameter

java.lang.Object
  extended by com.flexive.shared.configuration.parameters.ParameterImpl<java.lang.String>
      extended by com.flexive.shared.configuration.parameters.StringParameter
All Implemented Interfaces:
Parameter<java.lang.String>, java.io.Serializable

 class StringParameter
extends ParameterImpl<java.lang.String>

String parameters for flexive.

Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Constructor Summary
StringParameter()
           
StringParameter(ParameterData<java.lang.String> parameter, boolean registerParameter)
          Creates a new string parameter definition.
 
Method Summary
 Parameter<java.lang.String> copy()
          Return a copy of this parameter instance.
 java.lang.String getValue(java.lang.Object dbValue)
          Convert the given database value (in string representation) to an object of type T.
 
Methods inherited from class com.flexive.shared.configuration.parameters.ParameterImpl
freeze, getData, getDatabaseValue, getDefaultValue, getKey, getPath, getScope, isCached, isValid, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringParameter

public StringParameter()

StringParameter

public StringParameter(ParameterData<java.lang.String> parameter,
                       boolean registerParameter)
Creates a new string parameter definition.

Parameters:
parameter - parameter data
registerParameter - if the parameter should be registered in the static parameter table (don't do this for non-static parameter declarations)
Method Detail

copy

public Parameter<java.lang.String> copy()
Return a copy of this parameter instance. If this instance was frozen, the new object will be "unfrozen". The ParameterData instance will not be cloned, however you can replace it with a new instance, e.g. to update the parameter key.

Returns:
a copy of this parameter instance

getValue

public java.lang.String getValue(java.lang.Object dbValue)
Convert the given database value (in string representation) to an object of type T.

Parameters:
dbValue - the value to be converted
Returns:
dbValue as type T.