Unit 2 - Lesson 5 - Modifying data Flashcards
Describe MODIFY stereotype
Standard MODIFY operations modify a specific record on a database table.
Records identified using generated standard key struct, e.g. Bank AccountKey
Modified data is contained in a generated standard details struct e.g. BankAccountDtls
Used to update all attributes
NSMODIFY stereotype can be used to specify a subset of attributes to be updated
Supports optimistic locking
Parameter - none
Return value - none
Describe Optimistic Locking
Allows: Multiple users to access the same database table at the same time
Only one users can commit change to the table at any one time
To support:
Set Allow Optimistic Locking on the entity
Set Optimistic Locking on the modify operation
Once records was modified, second user can’t modify without re-reading the latest version of the record. RecordChangedException is thrown.
In curam optimistic locking is implemented via a version number column on the table
Describe SERVER_INTERFACE combining data-modification
Server-side functions can be called when page is loaded or when it is submitted. Page can have 2 separated SERVER_INTERFACE.
DISPLAY for read, ACTION for modify.
Describe multiple connections in a FIELD
A CONNECT element in a FIELD can only have either a SOURCE or a TARGET. Have 2 CONNECT elements instead, one with SOURCE and one with TARGET.
Also need CONNECT as a child of a PAGE to connect the PAGE_PARAMETER to the SERVER_INTERFACE. This time it can have both SOURCE and TARGET.
Create a screen to display and modify data
x
Which operations allow for OL
OL is only permitted on Entity classes - MODIFY, NKMODIFY, NSMODIFY operations.
Which operations are impacted by OL
INSERT and NSINSERT are affected by OL. INSERT automatically gets versionn number, while NSINSERT need to provide it.
Curam Modify data considerations.
2 calls to server. Read and write.
User must not modify primary keys.
Any FIELD with no target connection is automatically read only. They are still need to pass information to the modify method - to achieve this PAGE level CONNECT can be used:
Connect > SOURCE PROPERTY=”accountNumberParam” NAME=”PAGE”
TARGET PROPERTY=”accountNumber” NAME=”modifyAccountBean”