com.flexive.shared.value.mapper
Class NumberQueryInputMapper<T,BaseType extends FxValue<T,?>>

java.lang.Object
  extended by com.flexive.shared.value.mapper.InputMapper<BaseType,FxString>
      extended by com.flexive.shared.value.mapper.NumberQueryInputMapper<T,BaseType>
Type Parameters:
T - the actual value type of the FxValue implementation (e.g. Long)
BaseType - the FxValue class to be used as input (e.g. FxLargeNumber or FxReference)
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NumberQueryInputMapper.AccountQueryInputMapper, NumberQueryInputMapper.ReferenceQueryInputMapper

public abstract class NumberQueryInputMapper<T,BaseType extends FxValue<T,?>>
extends InputMapper<BaseType,FxString>

An abstract input mapper between discrete values (e.g. IDs) and unique String representations. For example, this can be used to map account IDs to login names. This is also used for most auto-complete inputs for flexive structure propreties.

Version:
$Rev: 2284 $
Author:
Daniel Lichtenberger, UCS
See Also:
Serialized Form

Nested Class Summary
static class NumberQueryInputMapper.AccountQueryInputMapper
          Maps account IDs to login names.
static class NumberQueryInputMapper.ReferenceQueryInputMapper
           
 
Constructor Summary
NumberQueryInputMapper()
           
 
Method Summary
protected  FxString doEncode(BaseType value)
          Map the given value to the destination FxValue type.
abstract  java.lang.String encodeId(T id)
           
 java.util.List<? extends ValueComparator> getAvailableValueComparators()
          Returns all available value comparators available in search queries.
 
Methods inherited from class com.flexive.shared.value.mapper.InputMapper
applySettings, buildAutocompleteHandler, decode, doDecode, encode, getAutocompleteHandler, getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberQueryInputMapper

public NumberQueryInputMapper()
Method Detail

encodeId

public abstract java.lang.String encodeId(T id)

doEncode

protected FxString doEncode(BaseType value)
Description copied from class: InputMapper
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<BaseType extends FxValue<T,?>,FxString>
Parameters:
value - the value to be mapped
Returns:
the mapped type

getAvailableValueComparators

public java.util.List<? extends ValueComparator> getAvailableValueComparators()
Description copied from class: InputMapper
Returns all available value comparators available in search queries. If the returned list is empty, it is ignored.

Overrides:
getAvailableValueComparators in class InputMapper<BaseType extends FxValue<T,?>,FxString>
Returns:
all available value comparators available in search queries