Interface ConfigBuilderInterfaces.MultiTableStep3

All Known Subinterfaces:
ConfigBuilderInterfaces.MultiTableStep1, ConfigBuilderInterfaces.MultiTableStep2
Enclosing class:
ConfigBuilderInterfaces

public static interface ConfigBuilderInterfaces.MultiTableStep3
Fluent API to build a MultiTableConfig

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

Author:
Karl Eilebrecht
  • Method Details

    • idColumn

      Configures the id-column of the table for joining and result retrieval.

      • Every table in a setup must have a single id-column.
      • The ID-columns of all tables within a setup must be of the same SQL-type.
      • The concrete type of the ID-column is not relevant and thus not specified here.
      Parameters:
      idColumnName - sql column name
      Returns:
      builder
    • filteredBy

      ConfigBuilderInterfaces.MultiTableStep3 filteredBy(String columnName, AdlSqlType columnType, String value)
      Defines an extra column filter to be applied to each query on this table.

      This filter affects all data columns added later on. Just in case the table acts as the base query and none of its attributes is part of the where clause then the filter will be added to the global where clause to ensure no record can be selected if it does not match this table condition.

      Example: Let TBL_BASE be a base table that acts as the primary table, and only this table has a TENANT-column that isolated data spaces from each other. Then you can add a column filter to this table and run all your queries with ConversionDirective.ENFORCE_PRIMARY_TABLE.
      This will guarantee that no query can ever select any record not related to this tenant, because every query will start selecting from TBL_BASE filtered by the given filter.

      The same filter column can either be specified here for the whole table or for a particular column. You cannot define a filter column on table level and specify the same column name again on data column level.

      Note: The actual value (either hard-coded or from a variable) must be an ADL-value.

      Example:

      • correct: filteredBy("ACTIVE", SQL_BOOLEAN, "1")
      • incorrect: filteredBy("ACTIVE", SQL_BOOLEAN, "TRUE")
      Parameters:
      columnName - name of another column of the same table to be tested for a fixed value
      columnType - type of the filter column for sql generation
      value - the filter, a fixed value or variable placeholder ${varName} to include into any query related to the data column to filter the results
      Returns:
      builder
      See Also: