BBjTriggerData::getExpectedDiskData
Description
In BBj 6.00 and higher and in an Update Trigger, this method returns the expected record value currently on disk before the update occurs. The expected disk data must match the actual data on disk or an error is generated when the file system attempts to update the record on disk.
This value is empty for Triggers fired by a WRITE RECORD call in the language. The value is only relevant during SQL UPDATE statements and calls to the update() methods on JLIB FilePosition instances.
Syntax
Return Value |
Method |
---|---|
byte[] |
getExpectedDiskData() |
Parameters
None.
Return Values
Returns the byte string passed in as the expected disk data.
Remarks
If there is a Read Trigger that manipulates the read buffer, it is likely the developer will need to reverse the operation on the expectedDiskData.
Methods that return byte[] can usually be treated as if they returned string, because BBj automatically handles the conversion. However, when that byte[] value is directly assigned to an object variable or passed to a Java method, BBj skips the conversion and the raw internal byte[] format is used. You can always use the STR() function to explicitly convert the byte[] value to a string.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.