BrFieldList Class

The class contains a list of BrField objects.

insertField

BrField  insertField(String  name)
BrField  insertField(byte[]  name)
insertField creates and retrieves the field for the name provided. If it is not present in the list, it is added with no data.
Note: The returned BrField is a reference to the one in the collection. Any changes to this object also change the copy in the collection.

getField

BrField  getField(String  name)
BrField  getField(byte[]  name)
getField retrieves the field for the name provided. Unlike insertField, which will create the field if it doesn’t exist, getField returns null if the field is not found.
Note: The returned BrField is a reference to the one in the collection. Any changes to this object also changes the copy in the collection.

updateField

void  updateField(BrField brField)

The updateField routine locates the field in the collection and copies the data into it. If the field in not present in the list, it is appended. If the BrField is returned by one of the insertField or getField functions, it is assumed the data has already been updated and no action is taken.

length

int  length()

length returns the number of fields in the collection.

clear

void  clear()

clear clears the data is fresh flag for all fields. When the API returns data from the Business Rules Server or one of the BrField.setData functions is called, a flag is set to indicate the data is fresh. The BrField.isNewData function returns the state of this flag. Between decision messages, clear is called after the client processes the returned data and before populating the next set of fields to send to the Business Rules Server.

reset

int  reset()

reset deletes all fields from the collection.