org.openfast.template.operator
Class CopyOperatorCodec

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

public class CopyOperatorCodec
extends OptionallyPresentOperatorCodec

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 CopyOperatorCodec()
           
 
Method Summary
 ScalarValue decodeValue(ScalarValue newValue, ScalarValue priorValue, Scalar field)
           
 boolean equals(java.lang.Object obj)
           
protected  ScalarValue getEmptyValue(ScalarValue priorValue)
           
protected  ScalarValue getInitialValue(Scalar field)
          Get the initial value of the passed Scalar object as long as the object is defined
protected  ScalarValue getValueToEncode(ScalarValue value, ScalarValue priorValue, ScalarValue defaultValue)
          Determine which values to encode from the passed ScalarValue objects
 
Methods inherited from class org.openfast.template.operator.OptionallyPresentOperatorCodec
decodeEmptyValue, getValueToEncode
 
Methods inherited from class org.openfast.template.operator.OperatorCodec
canEncode, 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

CopyOperatorCodec

protected CopyOperatorCodec()
Method Detail

getValueToEncode

protected ScalarValue getValueToEncode(ScalarValue value,
                                       ScalarValue priorValue,
                                       ScalarValue defaultValue)
Determine which values to encode from the passed ScalarValue objects

Specified by:
getValueToEncode in class OptionallyPresentOperatorCodec
Parameters:
value - The ScalarValue object to be encoded
priorValue - The priorValue object to be encoded
defaultValue - The defaultValue object to be encoded
Returns:
Returns null if the priorValue is undefined and if the ScalarValue object equals the defaultValue object or priorValue object, otherwise returns the ScalarValue object

getInitialValue

protected ScalarValue getInitialValue(Scalar field)
Get the initial value of the passed Scalar object as long as the object is defined

Specified by:
getInitialValue in class OptionallyPresentOperatorCodec
Parameters:
field - The Scalar object that the initial value is trying to return
Returns:
Returns the default value of the passed Scalar object if the object is defined, otherwise returns null

getEmptyValue

protected ScalarValue getEmptyValue(ScalarValue priorValue)
Specified by:
getEmptyValue in class OptionallyPresentOperatorCodec
Returns:
Returns the variable priorValue

decodeValue

public ScalarValue decodeValue(ScalarValue newValue,
                               ScalarValue priorValue,
                               Scalar field)
Specified by:
decodeValue in class OperatorCodec
Returns:
newValue

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OperatorCodec


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