public abstract class Field extends SimpleNode implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
id |
protected QName |
key |
protected boolean |
optional |
attributes, name
Constructor and Description |
---|
Field(QName name,
boolean optional)
Field Constructor
|
Field(QName name,
QName key,
boolean optional)
Field Constructor
|
Field(String name,
String key,
boolean optional,
String id)
Field Constructor
|
Modifier and Type | Method and Description |
---|---|
abstract FieldValue |
createValue(String value)
createValue method declaration
|
abstract FieldValue |
decode(InputStream in,
Group template,
Context context,
BitVectorReader presenceMapReader)
FieldValue decode method declaration
|
abstract byte[] |
encode(FieldValue value,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
byte[] encode method declaration
|
String |
getId()
Find the ID
|
QName |
getKey()
Find the key
|
String |
getName()
Find the name
|
QName |
getQName() |
MessageTemplate |
getTemplate() |
abstract String |
getTypeName()
getTypeName method declaration
|
abstract Class |
getValueType()
getValueType method declaration
|
boolean |
isOptional()
Check to see if the Field is required
|
abstract boolean |
isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
isPresenceMapBitSet method declaration
|
protected boolean |
isPresent(BitVectorReader presenceMapReader) |
void |
setId(String id)
Set the ID
|
void |
setKey(QName key)
Sets the passed key to the current field key
|
void |
setMessageTemplate(MessageTemplate template) |
abstract boolean |
usesPresenceMapBit()
usesPresenceMapBit method declaration
|
addNode, getAttribute, getAttributes, getChildren, getNodeName, getNodes, hasAttribute, hasChild, setAttribute
protected QName key
protected final boolean optional
protected String id
public Field(QName name, boolean optional)
name
- The name of the Field, a stringoptional
- Determines if the Field is required or not for the datapublic Field(QName name, QName key, boolean optional)
name
- The name of the Field, a stringkey
- The key of the Field, a stringoptional
- Determines if the Field is required or not for the datapublic String getName()
public QName getQName()
public boolean isOptional()
public QName getKey()
public void setKey(QName key)
key
- The key to be setpublic String getId()
public void setId(String id)
id
- The new ID to set the Field's ID toprotected boolean isPresent(BitVectorReader presenceMapReader)
public abstract byte[] encode(FieldValue value, Group template, Context context, BitVectorBuilder presenceMapBuilder)
value
- The FieldValue object to be encodedtemplate
- The Group object to be encodedcontext
- The previous object to keep the data in syncpresenceMapBuilder
- The BitVectorBuilder object to be encodedpublic abstract FieldValue decode(InputStream in, Group template, Context context, BitVectorReader presenceMapReader)
in
- The inputStream to be decodedtemplate
- The Group object to be decodedcontext
- The previous object to keep the data in syncpresent
- public abstract boolean usesPresenceMapBit()
public abstract boolean isPresenceMapBitSet(byte[] encoding, FieldValue fieldValue)
encoding
- The byte array to check if it is presentfieldValue
- The fieldValue objectpublic abstract Class getValueType()
public abstract FieldValue createValue(String value)
value
- The string of the FieldValue that is to be createdpublic abstract String getTypeName()
public MessageTemplate getTemplate()
public void setMessageTemplate(MessageTemplate template)
Copyright © 2006-2013 The LaSalle Technology Group, LLC. All Rights Reserved.