Class 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
    • 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
    • Constructor Detail

      • WrsModificationCallback

        public WrsModificationCallback()
    • 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 class WriteProcessingCallback
      • 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 class WriteProcessingCallback
        Parameters:
        rowType - depending on the rowtype cValues and oValues change semantics, i.e: wrs:C in wrs:I vs wrs:C in wrs:M
        cValues - list of values of wrs:C columns
        oValues - 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
      • getBindingItemConfig

        protected java.util.Set<de.businesscode.bcdui.binding.write.BindingItemConfig> getBindingItemConfig()
        Returns:
        the list of binding item config items