Class WrsModificationCallback
- java.lang.Object
-
- de.businesscode.bcdui.binding.write.WriteProcessingCallback
-
- de.businesscode.bcdui.binding.write.WrsModificationCallback
-
- Direct Known Subclasses:
WrsModificationLog
public class WrsModificationCallback extends WriteProcessingCallback
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
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,de.businesscode.bcdui.binding.write.BindingItemConfig>
bindingItemIdMap
protected java.util.ArrayList<java.lang.Integer>
columnIndexI
protected java.util.ArrayList<java.lang.Integer>
columnIndexM
protected java.util.ArrayList<java.lang.Integer>
columnIndexRD
protected java.util.List<BindingItem>
columns
protected java.util.ArrayList<BindingItem>
columnsI
protected java.util.ArrayList<BindingItem>
columnsM
protected java.util.ArrayList<BindingItem>
columnsRD
protected java.util.List<java.lang.Integer>
columnTypes
protected java.util.ArrayList<java.lang.Integer>
columnTypesI
protected java.util.ArrayList<java.lang.Integer>
columnTypesM
protected java.util.ArrayList<java.lang.Integer>
columnTypesRD
protected org.apache.logging.log4j.Logger
log
-
Fields inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
bindingSet
-
-
Constructor Summary
Constructors Constructor Description WrsModificationCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDataRow(WriteProcessingCallback.ROW_TYPE rowType, java.util.List<java.lang.String> cValues, java.util.List<java.lang.String> oValues)
ignores wrs:D if binding items are not located in WRS we augment itvoid
endHeader(java.util.List<BindingItem> columns, java.util.List<java.lang.Integer> columnTypes, java.util.Collection<java.lang.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 java.lang.String
evalValue(de.businesscode.bcdui.binding.write.BindingItemConfig item)
evaluates the value of given itemprotected java.util.Set<de.businesscode.bcdui.binding.write.BindingItemConfig>
getBindingItemConfig()
void
initialize()
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-
Methods inherited from class de.businesscode.bcdui.binding.write.WriteProcessingCallback
getParams, getValueBean, indexOf, setBindingSet, setParams, setValueBean
-
-
-
-
Field Detail
-
log
protected final org.apache.logging.log4j.Logger log
-
columns
protected java.util.List<BindingItem> columns
-
columnTypes
protected java.util.List<java.lang.Integer> columnTypes
-
columnsRD
protected java.util.ArrayList<BindingItem> columnsRD
-
columnTypesRD
protected java.util.ArrayList<java.lang.Integer> columnTypesRD
-
columnIndexRD
protected java.util.ArrayList<java.lang.Integer> columnIndexRD
-
columnsI
protected java.util.ArrayList<BindingItem> columnsI
-
columnTypesI
protected java.util.ArrayList<java.lang.Integer> columnTypesI
-
columnIndexI
protected java.util.ArrayList<java.lang.Integer> columnIndexI
-
columnsM
protected java.util.ArrayList<BindingItem> columnsM
-
columnTypesM
protected java.util.ArrayList<java.lang.Integer> columnTypesM
-
columnIndexM
protected java.util.ArrayList<java.lang.Integer> columnIndexM
-
bindingItemIdMap
protected final java.util.HashMap<java.lang.String,de.businesscode.bcdui.binding.write.BindingItemConfig> bindingItemIdMap
-
-
Method Detail
-
endHeader
public void endHeader(java.util.List<BindingItem> columns, java.util.List<java.lang.Integer> columnTypes, java.util.Collection<java.lang.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, java.util.List<java.lang.String> cValues, java.util.List<java.lang.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
protected java.lang.String evalValue(de.businesscode.bcdui.binding.write.BindingItemConfig item)
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
protected java.util.Set<de.businesscode.bcdui.binding.write.BindingItemConfig> getBindingItemConfig()
- Returns:
- the list of binding item config items
-
-