com.codestreet.messageforge
Class RFldBean

java.lang.Object
  extended bycom.codestreet.messageforge.RFld
      extended bycom.codestreet.messageforge.RFldBean
All Implemented Interfaces:
RFldInterface, java.io.Serializable

public class RFldBean
extends RFld

See Also:
Serialized Form

Field Summary
protected  java.lang.Class cls_
           
protected  java.lang.Object dataObj_
           
 
Fields inherited from class com.codestreet.messageforge.RFld
desc_, fieldId_, locked_, name_, optional_, propertyName_, tags_, transient_, valSet_
 
Constructor Summary
RFldBean()
           
RFldBean(java.lang.String name, int fieldId, java.lang.String className)
           
RFldBean(java.lang.String name, int fieldId, java.lang.String desc, java.lang.String className)
           
 
Method Summary
 boolean equals(java.lang.Object anObject)
          Check if another field is equal to this field.
 java.lang.Class getClassType()
           
 int GetHashCode()
           
 java.lang.String getTag()
          Get the XML tag for this field type.
 RFldType getType()
          Get field type.
 java.lang.Object getValue()
           
 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(java.util.Hashtable newData)
           
 RFld set(java.lang.Object newData)
          Set the value of the field from an Object.
 void validate()
          Validate against constraints.
 void validate(java.lang.Object newData)
           
 
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

dataObj_

protected java.lang.Object dataObj_

cls_

protected java.lang.Class cls_
Constructor Detail

RFldBean

public RFldBean()

RFldBean

public RFldBean(java.lang.String name,
                int fieldId,
                java.lang.String className)

RFldBean

public RFldBean(java.lang.String name,
                int fieldId,
                java.lang.String desc,
                java.lang.String className)
Method Detail

getType

public RFldType getType()
Description copied from class: RFld
Get field type.

Specified by:
getType in interface RFldInterface
Specified by:
getType in class RFld
Returns:
Field type.
See Also:
RFldType

getValue

public java.lang.Object getValue()

getClassType

public java.lang.Class getClassType()

getValueAsObject

public java.lang.Object getValueAsObject()
Description copied from interface: RFldInterface
Get the field value as an object.

Returns:
Field value as an object. Returns null if the field value is not set.

getValueAsString

public java.lang.String getValueAsString()
Description copied from class: RFld
Get the field value as a string.

Specified by:
getValueAsString in class RFld
Returns:
Field value as a string. Returns null if the field value is not set.

getValueAsHashtable

public java.util.Hashtable getValueAsHashtable()
Description copied from interface: RFldInterface
Get the field value as a java.util.Hashtable. Every field type that is not directly supported within Tibrv - every field with type greater than or equal to RFldType.USER_FIRST - and including fields of type TibrvMsg will implement this method.

Returns:
Field value as java.util.Hashtable.

getTag

public java.lang.String getTag()
Description copied from class: RFld
Get the XML tag for this field type.

Specified by:
getTag in class RFld
Returns:
XML tag for this field type.

equals

public boolean equals(java.lang.Object anObject)
Description copied from class: RFld
Check if another field is equal to this field. Equality is defined as the fields having the same value.

Specified by:
equals in class RFld
Parameters:
anObject - Another object.
Returns:
true if another message is equal to this message. Otherwise, returns false.

hashCode

public final int hashCode()
Return the hash code value for the field.

Specified by:
hashCode in class RFld
Returns:
a hash code value for the field, equal to the integer value represented by this field.

GetHashCode

public int GetHashCode()

reset

public void reset()
           throws FieldValidationException
Description copied from class: RFld
Reset the field value.

Specified by:
reset in class RFld
Throws:
FieldValidationException
See Also:
RFld.isValSet()

set

public RFld set(java.lang.Object newData)
         throws FieldValidationException
Description copied from class: RFld
Set the value of the field from an Object.

Specified by:
set in interface RFldInterface
Specified by:
set in class RFld
Parameters:
newData - New field value.
Returns:
Reference to self so method chaining can be used.
Throws:
FieldValidationException

set

public RFld set(java.util.Hashtable newData)
         throws FieldValidationException
Throws:
FieldValidationException

set

public final RFld set(org.jdom.Element elem)
               throws FieldValidationException
Set the field value from a JDOM element.

Specified by:
set in interface RFldInterface
Specified by:
set in class RFld
Parameters:
elem - Field value as a JDOM element.
Returns:
Reference to self so method chaining can be used.
Throws:
FieldValidationException

validate

public void validate()
              throws FieldValidationException
Description copied from class: RFld
Validate against constraints. A field is valid if either it's value is set and satisfies all constraints, or the the field is optional.

Specified by:
validate in class RFld
Throws:
FieldValidationException

validate

public void validate(java.lang.Object newData)
              throws FieldValidationException
Throws:
FieldValidationException


Copyright © 2003-2006 CodeStreet. All Rights Reserved.