raccoon.tibco.tibrv.message
Class RvField

java.lang.Object
  extended by com.tibco.tibrv.TibrvMsgField
      extended by raccoon.tibco.tibrv.message.RvField
All Implemented Interfaces:
IField

public class RvField
extends com.tibco.tibrv.TibrvMsgField
implements IField

The TIB/Rendezvous implementation of IField

Since:
Raccoon v1.0
Version:
$Id:$
Author:
Cedric ROUVRAIS

Field Summary
static java.lang.String NULL_STRING
          A string constant indicating a null value
 
Fields inherited from class com.tibco.tibrv.TibrvMsgField
data, id, name, type
 
Fields inherited from interface raccoon.api.eai.message.IField
FIELD_DATA_NOT_NULL, FIELD_NAME_NOT_NULL
 
Constructor Summary
RvField()
          Default constructor, required for dynamic instanciation
RvField(IField pField)
          Creates a new instance of this object using the given IField instance.
RvField(java.lang.String pFieldName, java.lang.Object pFieldData)
          Creates a new field instance with a name and it's data.
RvField(java.lang.String pFieldName, java.lang.Object pFieldData, int pFieldType)
          Creates a new field instance with a name and it's data.
RvField(java.lang.String pFieldName, java.lang.Object pFieldData, int pFieldType, int pFieldId)
          Creates a new instance of this object and assigns the relevant data.
RvField(com.tibco.tibrv.TibrvMsgField pTibrvMsgField)
          Creates a new instance of this object using the given TibrvMsgField instance.
 
Method Summary
 java.lang.Object getData()
          Retrieves the data associated to this field instance
 int getId()
          Retrieves the id of this field
 java.lang.String getName()
          Retrieves the name of this field.
 int getType()
          Returns the type of the object
 void setData(java.lang.Object pData)
          Defines the data associated to this field instance
 void setId(int pId)
          Defines the id of this field.
 void setName(java.lang.String pFieldName)
          Defines the name of this field
 void setType(int pType)
          Defines the type of the object.
 java.lang.String toString()
          Generates a string representation for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_STRING

public static final java.lang.String NULL_STRING
A string constant indicating a null value

Constructor Detail

RvField

public RvField()
Default constructor, required for dynamic instanciation


RvField

public RvField(java.lang.String pFieldName,
               java.lang.Object pFieldData)
        throws java.lang.IllegalArgumentException
Creates a new field instance with a name and it's data.

Parameters:
pFieldName - the name of the field
pFieldData - the data of the field
Throws:
java.lang.IllegalArgumentException - if pFieldName is null
java.lang.IllegalArgumentException - if pFieldData is null

RvField

public RvField(java.lang.String pFieldName,
               java.lang.Object pFieldData,
               int pFieldType)
        throws java.lang.IllegalArgumentException
Creates a new field instance with a name and it's data.

Parameters:
pFieldName - the name of the field
pFieldData - the data of the field
pFieldType - the type of the data attached to this field
Throws:
java.lang.IllegalArgumentException - if pFieldName is null
java.lang.IllegalArgumentException - if pFieldData is null
java.lang.IllegalArgumentException - if pFieldType is invalid.

RvField

public RvField(java.lang.String pFieldName,
               java.lang.Object pFieldData,
               int pFieldType,
               int pFieldId)
        throws java.lang.IllegalArgumentException
Creates a new instance of this object and assigns the relevant data.

Parameters:
pFieldName - the name of this field
pFieldData - the data of this field
pFieldType - the type of the data attached to this field
pFieldId - the id of this field
Throws:
java.lang.IllegalArgumentException - if pFieldName is null
java.lang.IllegalArgumentException - if pFieldData is null
java.lang.IllegalArgumentException - if pFieldType is invalid.

RvField

public RvField(IField pField)
        throws java.lang.IllegalArgumentException
Creates a new instance of this object using the given IField instance. This constructor will retrieve only the none null data from the given field.

Parameters:
pField - the field from which the contents are to be taken.
Throws:
java.lang.IllegalArgumentException - if pFieldType is invalid.

RvField

public RvField(com.tibco.tibrv.TibrvMsgField pTibrvMsgField)
Creates a new instance of this object using the given TibrvMsgField instance.

Parameters:
pTibrvMsgField - the field from the data of this instance is to be taken from
Method Detail

setName

public void setName(java.lang.String pFieldName)
             throws java.lang.IllegalArgumentException
Defines the name of this field

Specified by:
setName in interface IField
Parameters:
pFieldName - the name of this field
Throws:
java.lang.IllegalArgumentException - if pFieldName is null

getName

public java.lang.String getName()
Retrieves the name of this field.

Specified by:
getName in interface IField
Returns:
the name of this field

setData

public void setData(java.lang.Object pData)
             throws java.lang.IllegalArgumentException
Defines the data associated to this field instance

Specified by:
setData in interface IField
Parameters:
pData - the payload of this field.
Throws:
java.lang.IllegalArgumentException - if pData is null

getData

public java.lang.Object getData()
Retrieves the data associated to this field instance

Specified by:
getData in interface IField
Returns:
the payload of this field

setId

public void setId(int pId)
Defines the id of this field. Default value should be 0

Specified by:
setId in interface IField
Parameters:
pId - the id of this field, should be unique per message if different from zero.

getId

public int getId()
Retrieves the id of this field

Specified by:
getId in interface IField
Returns:
the id of this field

setType

public void setType(int pType)
             throws java.lang.IllegalArgumentException
Defines the type of the object.

Specified by:
setType in interface IField
Parameters:
pType - the object type.
Throws:
java.lang.IllegalArgumentException - if the type is invalid.

getType

public int getType()
Returns the type of the object

Specified by:
getType in interface IField
Returns:
the object type

toString

public java.lang.String toString()
Generates a string representation for this object.

Overrides:
toString in class com.tibco.tibrv.TibrvMsgField
Returns:
the contents of this object in a string format.


Copyright null null. All Rights Reserved.