public class Scalar extends Field
attributes, name| Constructor and Description |
|---|
Scalar(QName name,
Type type,
OperatorCodec operatorCodec,
ScalarValue defaultValue,
boolean optional)
Scalar constructor - sets the dictionary as global and validates the
entries
|
Scalar(QName name,
Type type,
Operator operator,
ScalarValue defaultValue,
boolean optional) |
Scalar(String name,
Type type,
Operator operator,
ScalarValue defaultValue,
boolean optional)
Scalar constructor - sets the dictionary as global and validates the
entries
|
| Modifier and Type | Method and Description |
|---|---|
FieldValue |
createValue(String value)
createValue method declaration
|
FieldValue |
decode(InputStream in,
Group template,
Context context,
BitVectorReader presenceMapReader)
FieldValue decode method declaration
|
ScalarValue |
decode(ScalarValue previousValue) |
ScalarValue |
decodeValue(ScalarValue newValue,
ScalarValue previousValue) |
byte[] |
encode(FieldValue fieldValue,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
byte[] encode method declaration
|
boolean |
equals(Object other) |
ScalarValue |
getBaseValue() |
ScalarValue |
getDefaultValue() |
String |
getDictionary() |
Operator |
getOperator() |
OperatorCodec |
getOperatorCodec() |
Type |
getType() |
TypeCodec |
getTypeCodec() |
String |
getTypeName()
getTypeName method declaration
|
Class |
getValueType()
getValueType method declaration
|
int |
hashCode() |
boolean |
isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
isPresenceMapBitSet method declaration
|
String |
serialize(ScalarValue value) |
void |
setDictionary(String dictionary)
Sets the dictionary to the passed string
|
String |
toString() |
boolean |
usesPresenceMapBit()
usesPresenceMapBit method declaration
|
getId, getKey, getName, getQName, getTemplate, isOptional, isPresent, setId, setKey, setMessageTemplateaddNode, getAttribute, getAttributes, getChildren, getNodeName, getNodes, hasAttribute, hasChild, setAttributepublic Scalar(String name, Type type, Operator operator, ScalarValue defaultValue, boolean optional)
name - The name of Scalar as a stringtype - The type of this Scalaroperator - Which operator object is being useddefaultValue - The default value of the ScalarValueoptional - Determines if the Scalar is required or not for the datapublic Scalar(QName name, Type type, Operator operator, ScalarValue defaultValue, boolean optional)
public Scalar(QName name, Type type, OperatorCodec operatorCodec, ScalarValue defaultValue, boolean optional)
name - The name of Scalar as a stringtype - The type of the scalar fieldoperatorCodec - Which operatorCodec object is being useddefaultValue - The default value of the ScalarValueoptional - Determines if the Scalar is required or not for the datapublic Type getType()
public OperatorCodec getOperatorCodec()
public Operator getOperator()
public byte[] encode(FieldValue fieldValue, Group template, Context context, BitVectorBuilder presenceMapBuilder)
Fieldencode in class FieldfieldValue - The Field valuetemplate - The Group objectcontext - The previous object to keep the data in syncpresenceMapBuilder - The BitVector builderThrows - RuntimeException if the encoding fails - will print to
console the name of the scalar to failpublic String getDictionary()
public ScalarValue decodeValue(ScalarValue newValue, ScalarValue previousValue)
newValue - previousValue - the previous value that was decodedpublic ScalarValue getDefaultValue()
public ScalarValue decode(ScalarValue previousValue)
previousValue - The previousValue of the ScalarValuepublic boolean usesPresenceMapBit()
FieldusesPresenceMapBit in class Fieldpublic boolean isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
FieldisPresenceMapBitSet in class Fieldencoding - The byte array to check if it is presentfieldValue - The fieldValue objectpublic FieldValue decode(InputStream in, Group template, Context context, BitVectorReader presenceMapReader)
Fielddecode in class Fieldin - The InputStream to be decodedtemplate - The Group objectcontext - The previous object to keep the data in syncpresenceMapReader - public void setDictionary(String dictionary)
dictionary - The string to be stored as the dictionarypublic String toString()
public Class getValueType()
FieldgetValueType in class Fieldpublic FieldValue createValue(String value)
FieldcreateValue in class Fieldvalue - Creates a FieldValue of the passed valuepublic String getTypeName()
FieldgetTypeName in class Fieldpublic ScalarValue getBaseValue()
public TypeCodec getTypeCodec()
public String serialize(ScalarValue value)
Copyright © 2006-2013 The LaSalle Technology Group, LLC. All Rights Reserved.