Interface ConfigBuilderInterfaces.SingleTableDataColumnStep1

Enclosing class:
ConfigBuilderInterfaces

public static interface ConfigBuilderInterfaces.SingleTableDataColumnStep1
Fluent API to build a SingleTableConfig

Follow the method chain to finally obtain the result with ConfigBuilderInterfaces.SingleTableAddColumnOrExit.get().

Author:
Karl Eilebrecht
  • Method Details

    • mappedToArgName

      ConfigBuilderInterfaces.SingleTableDataColumnStep2 mappedToArgName(String argName, de.calamanari.adl.cnv.tps.AdlType argType)
      Maps the column to an attribute (argName) of the logical data model.
      You can map the same column to multiple attributes but not vice-versa.

      This method is meant for setting up the logical and physical data model at the same time.

      The preferred way should be first setting up an ArgMetaInfoLookup with the argName's meta data and configuring the table with mappedToArgName(String).

      Parameters:
      argName - name of the attribute used in expressions that should be mapped to the column
      argType -
      Returns:
      builder
    • mappedToArgName

      Maps the column to an attribute (argName) of the logical data model which has been configured in advance.
      You can map the same column to multiple attributes but not vice-versa.
      Parameters:
      argName - name of the attribute used in expressions that should be mapped to the column
      Returns:
      builder
    • autoMapped

      ConfigBuilderInterfaces.SingleTableDataColumnStep2 autoMapped(DefaultAutoMappingPolicy.LocalArgNameExtractor extractor, de.calamanari.adl.cnv.tps.AdlType argType)
      Maps the column to every attribute (argName) the given extractor can extract a local argName from (not null).

      In other words: The extractor is an UnaryOperator that at runtime takes the argName as input and either returns null (not applicable) or the extracted local name of the attribute. This value will then be stored as a variable in the settings and can be references as ${argName.local} in a filter column definition.

      Example: You have a number of attributes and the argName follows the pattern section.identifier.int, and you want to map them to column TBL.XYZ of type INTEGER with the filter column F17 set to the the value of identifier.
      In this case you can specify the an extractor function that either returns null (not applicable, do not map) or the value of the identifier.
      E.g.: argName -> argName.endsWith(".int") ? argName.substring(argName.indexOf('.') + 1, argName.length-4) : null would return 47118 for section.47118.int. This value will automatically be assigned to the variable argName.local. Now create a filter-column condition for column F17 and specify ${argName.local} as its value.
      Any argName that is not explicitly mapped and that complies to the extractor will now be mapped to the given column with the filter condition derived from the argName.

      Explicitly mapped argNames always take precedence over auto-mapped argNames.

      Should multiple policies be applicable to the same argName, then the first will win (order in the configuration).

      Parameters:
      extractor - custom function to extract the local argName from the argName
      argType -
      Returns:
      builder
      See Also:
    • autoMapped

      Maps the column to every attribute (argName) the given policy covers.

      Explicitly mapped argNames always take precedence over auto-mapped argNames.

      Should multiple policies be applicable to the same argName, then the first will win (order in the configuration).

      Parameters:
      policyCreator - a function that will be called to create the policy for a given column
      Returns:
      builder
      See Also: