Class WrsModificationCallback
java.lang.Object
de.businesscode.bcdui.binding.write.WriteProcessingCallback
de.businesscode.bcdui.binding.write.WrsModificationCallback
- Direct Known Subclasses:
WrsModificationLog
preserves the update information on a record, takes following configuration parameters:
the default values are marked with asterix (*), all parameters which have no default values are required.
- bindingItemId
- the binding item id this parameter is defined for
- expression
- the EL expression to be evaluated on the server, or constant string, allowing directives: ${} the bean in scope is named 'bcdBean'
- ignore
-
never*: never ignores processing
update: processing ignored on wrs:M
- isCoalesce
-
true*: the value written to database is evaluated from given expression on the server in following cases: either wrs:C for this bindingItemId is wrs:null OR this bindingItemId is entirely missing in processing WRS
false: always writes value from expression evaluated on the server, no matter whether it been sent along with WRS or not
-
Nested Class Summary
Nested classes/interfaces inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
WriteProcessingCallback.ROW_TYPE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<BindingItem>
protected List<BindingItem>
protected final org.apache.logging.log4j.Logger
Fields inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
bindingSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
endDataRow
(WriteProcessingCallback.ROW_TYPE rowType, List<String> cValues, List<String> oValues) ignores wrs:D if binding items are not located in WRS we augment itvoid
endHeader
(List<BindingItem> columns, List<Integer> columnTypes, Collection<String> keyColumnNames) is called once WRS header has been read, the implementation may modify either data provided, at this point the serverSideValueBean and bindingSet are already initializedprotected String
evalValue
(de.businesscode.bcdui.binding.write.BindingItemConfig item) evaluates the value of given itemprotected Set<de.businesscode.bcdui.binding.write.BindingItemConfig>
void
perform initialization, read params, etc prior to callWriteProcessingCallback.endHeader(List, List, Collection)
orWriteProcessingCallback.endDataRow(ROW_TYPE, List, List)
, at this point any other configurations members are already setMethods inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
getParams, getValueBean, indexOf, setBindingSet, setParams, setValueBean
-
Field Details
-
log
protected final org.apache.logging.log4j.Logger log -
columns
-
columnsOrig
-
columnTypes
-
bindingItemIdMap
-
-
Constructor Details
-
WrsModificationCallback
public WrsModificationCallback()
-
-
Method Details
-
endHeader
public void endHeader(List<BindingItem> columns, List<Integer> columnTypes, Collection<String> keyColumnNames) Description copied from class:WriteProcessingCallback
is called once WRS header has been read, the implementation may modify either data provided, at this point the serverSideValueBean and bindingSet are already initialized- Overrides:
endHeader
in classWriteProcessingCallback
-
endDataRow
public void endDataRow(WriteProcessingCallback.ROW_TYPE rowType, List<String> cValues, List<String> oValues) ignores wrs:D if binding items are not located in WRS we augment it- Overrides:
endDataRow
in classWriteProcessingCallback
- Parameters:
rowType
- depending on the rowtype cValues and oValues change semantics, i.e: wrs:C in wrs:I vs wrs:C in wrs:McValues
- list of values of wrs:C columnsoValues
- list of values of wrs:O columns
-
evalValue
evaluates the value of given item- Parameters:
item
-- Returns:
- either a constant or evaluated expression
-
initialize
public void initialize()Description copied from class:WriteProcessingCallback
perform initialization, read params, etc prior to callWriteProcessingCallback.endHeader(List, List, Collection)
orWriteProcessingCallback.endDataRow(ROW_TYPE, List, List)
, at this point any other configurations members are already set- Overrides:
initialize
in classWriteProcessingCallback
-
getBindingItemConfig
- Returns:
- the list of binding item config items
-