com.flexive.shared.value.mapper
Class IdentityInputMapper

java.lang.Object
  extended by com.flexive.shared.value.mapper.InputMapper<FxValue,FxValue>
      extended by com.flexive.shared.value.mapper.IdentityInputMapper

public final class IdentityInputMapper
extends InputMapper<FxValue,FxValue>

The trivial input mapper that performs no conversion for UI input.

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

Constructor Summary
IdentityInputMapper()
           
 
Method Summary
protected  FxValue doDecode(FxValue value)
          Decode the mapped type.
protected  FxValue doEncode(FxValue value)
          Map the given value to the destination FxValue type.
static IdentityInputMapper getInstance()
          Return a shared instance of this value mapper.
 
Methods inherited from class com.flexive.shared.value.mapper.InputMapper
buildAutocompleteHandler, decode, encode, getAutocompleteHandler, getAvailableValueComparators, getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityInputMapper

public IdentityInputMapper()
Method Detail

doEncode

protected FxValue doEncode(FxValue value)
Map the given value to the destination FxValue type. The resulting object will be used for rendering the input element for the given value.

Specified by:
doEncode in class InputMapper<FxValue,FxValue>
Parameters:
value - the value to be mapped
Returns:
the mapped type

doDecode

protected FxValue doDecode(FxValue value)
Decode the mapped type. Called after the mapped type has been updated in the user form.

Specified by:
doDecode in class InputMapper<FxValue,FxValue>
Parameters:
value - the mapped value type, possibly modified by the user
Returns:
the corresponding base type

getInstance

public static IdentityInputMapper getInstance()
Return a shared instance of this value mapper. Use this method instead of creating a new identity mapper when no mapper really is needed.

Returns:
an identity input mapper