org.openfast.template.operator
Class OperatorCodec
java.lang.Object
org.openfast.template.operator.OperatorCodec
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AlwaysPresentOperatorCodec, OptionallyPresentOperatorCodec
public abstract class OperatorCodec
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
|
Method Summary |
boolean |
canEncode(ScalarValue value,
Scalar field)
|
abstract ScalarValue |
decodeEmptyValue(ScalarValue previousValue,
Scalar field)
|
abstract ScalarValue |
decodeValue(ScalarValue newValue,
ScalarValue priorValue,
Scalar field)
|
boolean |
equals(java.lang.Object obj)
|
static OperatorCodec |
getCodec(Operator operator,
Type type)
Find the operator by the key |
Operator |
getOperator()
|
abstract ScalarValue |
getValueToEncode(ScalarValue value,
ScalarValue priorValue,
Scalar field)
|
ScalarValue |
getValueToEncode(ScalarValue value,
ScalarValue priorValue,
Scalar scalar,
BitVectorBuilder presenceMapBuilder)
|
boolean |
isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
|
boolean |
shouldDecodeType()
|
java.lang.String |
toString()
|
boolean |
usesPresenceMapBit(boolean optional)
Use this to show that there is a MapBit present |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NONE_ALL
protected static final OperatorCodec NONE_ALL
CONSTANT_ALL
protected static final OperatorCodec CONSTANT_ALL
DEFAULT_ALL
protected static final OperatorCodec DEFAULT_ALL
COPY_ALL
protected static final OperatorCodec COPY_ALL
INCREMENT_INTEGER
protected static final OperatorCodec INCREMENT_INTEGER
DELTA_INTEGER
protected static final OperatorCodec DELTA_INTEGER
DELTA_STRING
protected static final OperatorCodec DELTA_STRING
DELTA_DECIMAL
protected static final OperatorCodec DELTA_DECIMAL
TAIL
protected static final OperatorCodec TAIL
OperatorCodec
protected OperatorCodec(Operator operator,
Type[] types)
- Parameters:
operator - The name of the Operator as a stringtypes - The type array to be stored in the keys
getCodec
public static OperatorCodec getCodec(Operator operator,
Type type)
- Find the operator by the key
- Parameters:
operator - the fast operatortype - The type of the operator, stored to the key
- Returns:
- Returns the operator object with the specified key
getValueToEncode
public abstract ScalarValue getValueToEncode(ScalarValue value,
ScalarValue priorValue,
Scalar field)
decodeValue
public abstract ScalarValue decodeValue(ScalarValue newValue,
ScalarValue priorValue,
Scalar field)
isPresenceMapBitSet
public boolean isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
- Parameters:
encoding - The byte array that is being encodedfieldValue - The fieldValue object to check
- Returns:
- Returns true if the byte array has a length larger then zero
decodeEmptyValue
public abstract ScalarValue decodeEmptyValue(ScalarValue previousValue,
Scalar field)
usesPresenceMapBit
public boolean usesPresenceMapBit(boolean optional)
- Use this to show that there is a MapBit present
- Parameters:
optional - The Optional boolean
- Returns:
- Returns true
getValueToEncode
public ScalarValue getValueToEncode(ScalarValue value,
ScalarValue priorValue,
Scalar scalar,
BitVectorBuilder presenceMapBuilder)
- Parameters:
value - priorValue - scalar - presenceMapBuilder -
- Returns:
- the value that should be encoded given the previous value
getOperator
public Operator getOperator()
canEncode
public boolean canEncode(ScalarValue value,
Scalar field)
shouldDecodeType
public boolean shouldDecodeType()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.