|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codestreet.messageforge.RFld
com.codestreet.messageforge.RFldNumeric
com.codestreet.messageforge.RFldI64
Class to represent a long field.
| Field Summary | |
protected java.lang.Long |
dataObj_
Data. |
protected static java.lang.String |
XML_TAG
XML tag for this element type. |
| Fields inherited from class com.codestreet.messageforge.RFld |
desc_, fieldId_, locked_, name_, optional_, propertyName_, tags_, transient_, valSet_ |
| Constructor Summary | |
RFldI64()
Default constructor. |
|
RFldI64(java.lang.String name,
int fieldId)
Constructor. |
|
RFldI64(java.lang.String name,
int fieldId,
java.lang.String desc)
Constructor. |
|
| Method Summary | |
boolean |
equals(java.lang.Object anObject)
Check if another field is equal to this field. |
java.lang.String |
getTag()
Get the XML tag for this field type. |
RFldType |
getType()
Get field type. |
long |
getValue()
Get data. |
java.util.Hashtable |
getValueAsHashtable()
Get the field value as a java.util.Hashtable. |
java.lang.Object |
getValueAsObject()
Get the field value as an object. |
java.lang.String |
getValueAsString()
Get the field value as a string. |
int |
hashCode()
Return the hash code value for the field. |
void |
reset()
Reset the field value. |
RFld |
set(org.jdom.Element elem)
Set the field value from a JDOM element. |
RFld |
set(long newData)
Set data. |
RFld |
set(java.lang.Long newData)
Set data. |
RFld |
set(java.lang.Object newData)
Set data. |
static void |
setTag(java.lang.String tag)
Set the XML tag for this field type. |
void |
validate()
Validate against constraints. |
void |
validate(RFld fld,
long newData)
Check if a new value will satifsy constraints. |
| Methods inherited from class com.codestreet.messageforge.RFldNumeric |
addConstraint, validType |
| Methods inherited from class com.codestreet.messageforge.RFld |
addConstraint, buildMinMaxConstraintKey, getConstraint, getConstraintCount, getDesc, getId, getName, getOptional, getPropertyName, getTags, getTransient, isConstrained, isLocked, isProperty, isValSet, marshal, marshal, setId, setLocked, setName, setOptional, setPropertyName, setTags, setTransient, setXmlAttrNames, setXmlTags |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static transient java.lang.String XML_TAG
protected java.lang.Long dataObj_
| Constructor Detail |
public RFldI64()
public RFldI64(java.lang.String name,
int fieldId)
name - Field name.fieldId - Field id. Field ids must be either 0
to indicate that there is no id on the field, or greater. In addition,
field ids must be unique within a messages - no two fields are allowed
to have the same field id.
public RFldI64(java.lang.String name,
int fieldId,
java.lang.String desc)
name - Field name.fieldId - Field id. Field ids must be either 0
to indicate that there is no id on the field, or greater. In addition,
field ids must be unique within a messages - no two fields are allowed
to have the same field id.desc - Field description.| Method Detail |
public final RFldType getType()
getType in interface RFldInterfacegetType in class RFldRFldTypepublic final boolean equals(java.lang.Object anObject)
equals in class RFldanObject - Another field.
public final int hashCode()
(int)(getValue()^(getValue()>>32))
hashCode in class RFld
public final void reset()
throws FieldValidationException
reset in class RFldFieldValidationExceptionRFld.isValSet()
public final RFld set(java.lang.Object newData)
throws FieldValidationException
set in interface RFldInterfaceset in class RFldnewData - New data.
FieldValidationException
public final RFld set(long newData)
throws FieldValidationException
newData - New data.
FieldValidationException
public final RFld set(org.jdom.Element elem)
throws FieldValidationException
set in interface RFldInterfaceset in class RFldelem - Field value as a JDOM element.
FieldValidationException
public final RFld set(java.lang.Long newData)
throws FieldValidationException
newData - New data.
java.lang.NullPointerException - if the new data is null.
FieldValidationException
public final void validate()
throws FieldValidationException
validate in class RFldFieldValidationException
public final void validate(RFld fld,
long newData)
throws FieldValidationException
newData - New value.
FieldValidationExceptionpublic final long getValue()
java.lang.NullPointerException - if the field valuehas not been set.public final java.lang.Object getValueAsObject()
public final java.lang.String getValueAsString()
getValueAsString in class RFldjava.lang.NullPointerException - if the field valuehas not been set.
public final java.util.Hashtable getValueAsHashtable()
throws FieldValidationException
FieldValidationExceptionpublic final java.lang.String getTag()
getTag in class RFldpublic static void setTag(java.lang.String tag)
tag - New XML tag for this field type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||