com.codestreet.messageforge
Interface RFldInterface

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
RFld

public interface RFldInterface
extends java.io.Serializable

Interface implemented by RFld and subclasses.

Author:
Jawaid Hakim.

Method Summary
 java.lang.String getDesc()
          Get message description.
 int getId()
          Get field id.
 java.lang.String getName()
          Get field name.
 java.lang.String getPropertyName()
          Get property name.
 RFldType getType()
          Get field type.
 java.util.Hashtable getValueAsHashtable()
          Get the field value as a java.util.Hashtable.
 java.lang.Object getValueAsObject()
          Get the field value as an object.
 boolean isConstrained()
          Check if field value has constrained.
 boolean isLocked()
          Check if field is locked.
 boolean isProperty()
          Check if this field is a property.
 boolean isValSet()
          Check if field value has been set.
 void marshal(java.io.Writer writer, int indentLevel, java.lang.String indent, boolean newLines, boolean expandEmptyElem)
          Marshall the field as XML to target writer.
 RFld set(org.jdom.Element newData)
          Set data from JDOM element.
 RFld set(java.lang.Object fld)
          Set state from an Object.
 

Method Detail

getName

public java.lang.String getName()
Get field name.

Returns:
Field name.

getId

public int getId()
Get field id.

Returns:
Field id.

getDesc

public java.lang.String getDesc()
Get message description.

Returns:
Message description.

getType

public RFldType getType()
Get field type.

Returns:
Field type.
See Also:
RFldType

isValSet

public boolean isValSet()
Check if field value has been set.

Returns:
true if field value has been set. Othewrwise, return false.

isConstrained

public boolean isConstrained()
Check if field value has constrained.

Returns:
true if field value has constrained. Othewrwise, return false.

isLocked

public boolean isLocked()
Check if field is locked.

Returns:
true if field value is locked. Othewrwise, return false.

isProperty

public boolean isProperty()
Check if this field is a property.

Returns:
Returns true if this field is a property.
See Also:
getPropertyName()

getPropertyName

public java.lang.String getPropertyName()
Get property name.

Returns:
Returns property name if this field is a property. Returns null if this field is not a property.
See Also:
isProperty()

set

public RFld set(java.lang.Object fld)
         throws FieldValidationException
Set state from an Object.

Parameters:
fld - Source object.
Returns:
Reference to self so method chaining can be used.
Throws:
FieldValidationException

set

public RFld set(org.jdom.Element newData)
         throws FieldValidationException
Set data from JDOM element.

Parameters:
newData - New data.
Returns:
Reference to self so method chaining can be used.
Throws:
FieldValidationException

getValueAsObject

public java.lang.Object getValueAsObject()
Get the field value as an object.

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

getValueAsHashtable

public java.util.Hashtable getValueAsHashtable()
                                        throws FieldValidationException
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.
Throws:
FieldValidationException

marshal

public void marshal(java.io.Writer writer,
                    int indentLevel,
                    java.lang.String indent,
                    boolean newLines,
                    boolean expandEmptyElem)
             throws ConverterException
Marshall the field as XML to target writer.

Parameters:
writer - Output target.
indent - Indentation.
newLines - Newlines are inserted after each element if true.
expandEmptyElem - Empty elements - elements with no content - are expanded if true.
Throws:
ConverterException


Copyright © 2003-2006 CodeStreet. All Rights Reserved.