org.openfast.template.operator
Class OptionallyPresentOperatorCodec

java.lang.Object
  extended by org.openfast.template.operator.OperatorCodec
      extended by org.openfast.template.operator.OptionallyPresentOperatorCodec
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CopyOperatorCodec

public abstract class OptionallyPresentOperatorCodec
extends OperatorCodec

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openfast.template.operator.OperatorCodec
CONSTANT_ALL, COPY_ALL, DEFAULT_ALL, DELTA_DECIMAL, DELTA_INTEGER, DELTA_STRING, INCREMENT_INTEGER, NONE_ALL, TAIL
 
Constructor Summary
protected OptionallyPresentOperatorCodec(Operator operator, Type[] types)
           
 
Method Summary
 ScalarValue decodeEmptyValue(ScalarValue priorValue, Scalar field)
           
protected abstract  ScalarValue getEmptyValue(ScalarValue priorValue)
           
protected abstract  ScalarValue getInitialValue(Scalar field)
           
 ScalarValue getValueToEncode(ScalarValue value, ScalarValue priorValue, Scalar field)
           
protected abstract  ScalarValue getValueToEncode(ScalarValue value, ScalarValue priorValue, ScalarValue defaultValue)
           
 
Methods inherited from class org.openfast.template.operator.OperatorCodec
canEncode, decodeValue, equals, getCodec, getOperator, getValueToEncode, isPresenceMapBitSet, shouldDecodeType, toString, usesPresenceMapBit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OptionallyPresentOperatorCodec

protected OptionallyPresentOperatorCodec(Operator operator,
                                         Type[] types)
Method Detail

decodeEmptyValue

public ScalarValue decodeEmptyValue(ScalarValue priorValue,
                                    Scalar field)
Specified by:
decodeEmptyValue in class OperatorCodec
Parameters:
priorValue -
field -
Returns:
the value that should be used if no value is present in the fast stream

getValueToEncode

public ScalarValue getValueToEncode(ScalarValue value,
                                    ScalarValue priorValue,
                                    Scalar field)
Specified by:
getValueToEncode in class OperatorCodec
Parameters:
value -
priorValue -
field -
Returns:
the value that should be encoded over the fast stream given the previous value for this field

getValueToEncode

protected abstract ScalarValue getValueToEncode(ScalarValue value,
                                                ScalarValue priorValue,
                                                ScalarValue defaultValue)

getInitialValue

protected abstract ScalarValue getInitialValue(Scalar field)

getEmptyValue

protected abstract ScalarValue getEmptyValue(ScalarValue priorValue)


Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.