com.flexive.shared.configuration.parameters
Class LongParameter

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

 class LongParameter
extends ParameterImpl<java.lang.Long>

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

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

Constructor Detail

LongParameter

public LongParameter()

LongParameter

public LongParameter(ParameterData<java.lang.Long> parameter,
                     boolean registerParameter)
Creates a new long 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.Long> 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.Long 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.

isValid

public boolean isValid(java.lang.Long value)
Returns true if the given value is a valid configuration value (e.g. primitive parameters may not be null).

Specified by:
isValid in interface Parameter<java.lang.Long>
Overrides:
isValid in class ParameterImpl<java.lang.Long>
Parameters:
value - the value to be checked
Returns:
true if the given value is a valid configuration value