TibrvMsg.getField()
Method
Declaration
TibrvMsgFieldgetField
(
java.lang.String fieldName)
throws TibrvException
TibrvMsgFieldgetField
(
int fieldId)
throws TibrvException
TibrvMsgFieldgetField
(
java.lang.String fieldName,
int fieldId)
throws TibrvException
Purpose
Get a specified field from a message.
Remarks
Programs specify the field to retrieve using the fieldName
and fieldId
parameters.
The method takes a snapshot of the field, and returns that information as a field object.
Programs can use a related method to loop through all the fields of a message; to retrieve each field by its integer index number, see TibrvMsg.getFieldByIndex().
Parameter |
Description |
|
Get a field with this name. |
|
Get the field with this identifier. |
Method Forms
With only a field name, find the field by name. If the field name is not present in the message, return null
. If several fields with that name are present in the message, this method returns the first one that it finds.
With only a field identifier, find the field with that identifier (since identifiers are unique, the message can contain at most one such field). If the identifier is not present in the message, return null
.
With both a field name and a field identifier, search first by identifier, and then by field name. If neither are present in the message, return null
.