Segment update bean

This bean is the primary facility for applying changes to a segment in the Transaction Server.

The payload class name of the segment update bean is com.ibm.paydir.ima.txacc.app.bridge.SegmentUpdateBean.

Use the bean to modify the segment record error flag or update the user field.
Note: The update segment request fails if the specified segment is absent.
When queried, the segment update bean returns UPDATE_SEGMENT as its update code. It can be queried for the segment ID that is affected by the update by using the following accessor method:
public  long  getSegmentId()
The caller can use the mutator methods that are shown in the following table to configure the segment update bean.
Table 1. UPDATE_SEGMENT request
Method name Takes data type Description
setRecordError Boolean Updates the segment record error flag.
setDuplicate Boolean Updates the segment is a duplicate flag.
setUserField String Updates the user field.
In addition, the user can add their own fields to the segment user table. The user fields can have any of the primary database types.
Note: The segment user table has a foreign key to the segment table, which might restrict the fields that can be added.
The segment update bean supports updating the user fields by these methods:
  • setUserData ( String name, Timestamp val )
  • setUserData ( String name, short val )
  • setUserData ( String name, byte val )
  • setUserData ( String name, char val )
  • setUserData ( String name, Object val )

The setUserData Java™ method is overloaded to accept the various data types for the user field value. The value supplied for a user field must use the data type that conforms to its database definition. For example, to update a field with the database data type SMALLINT, use the method that accepts a short.

Use the method that accepts an Object as the value to update user field with data types not supported by the methods listed. For example, to update a field with the database data type BIGINT, call setUserData with the Java primitive type of long. The long primitive value is converted to an Object.

For segment table updates, the Transaction Server generates an SQL statement based on the collection and attempts to update the segment as specified. Updating total counts and amounts is not supported.