Class DummyDataTableConfig

java.lang.Object
de.calamanari.adl.sql.config.DummyDataTableConfig
All Implemented Interfaces:
de.calamanari.adl.cnv.tps.ArgMetaInfoLookup, DataTableConfig, Serializable

public class DummyDataTableConfig extends Object implements DataTableConfig
This implementation is for testing and debugging, it returns a dummy table name and the argName
Author:
Karl Eilebrecht
See Also:
  • Method Details

    • getInstance

      public static DummyDataTableConfig getInstance()
    • contains

      public boolean contains(String argName)
      Specified by:
      contains in interface de.calamanari.adl.cnv.tps.ArgMetaInfoLookup
    • lookupAssignment

      public ArgColumnAssignment lookupAssignment(String argName, de.calamanari.adl.ProcessContext ctx)
      Description copied from interface: DataTableConfig
      Determines the column assignment for the given argName.
      Specified by:
      lookupAssignment in interface DataTableConfig
      Parameters:
      argName -
      ctx -
      Returns:
      the configured ArgColumnAssignment if ArgMetaInfoLookup.contains(String)=true, otherwise throws exception
    • numberOfTables

      public int numberOfTables()
      Description copied from interface: DataTableConfig
      Returns the total number of tables in this configuration
      Specified by:
      numberOfTables in interface DataTableConfig
      Returns:
      number of tables this config is based on, >=1
    • lookupTableMetaInfo

      public TableMetaInfo lookupTableMetaInfo(String argName, de.calamanari.adl.ProcessContext ctx)
      Description copied from interface: DataTableConfig
      Returns the table meta infos for the column that is mapped to the given argName
      Specified by:
      lookupTableMetaInfo in interface DataTableConfig
      Parameters:
      argName -
      ctx -
      Returns:
      meta data
    • allTableMetaInfos

      public List<TableMetaInfo> allTableMetaInfos()
      Description copied from interface: DataTableConfig
      Returns the meta information for all the tables in this configuration.

      Important: Although the order is not defined, best case the order in the list reflects the order of configuration.
      In any case it must be stable and it should be deterministic because this is the order the default implementations of several other methods relies on. If the result is composed from an underlying set, then the list should be sorted before returning to avoid indeterministic behavior like flaky tests or unexplainable variations when generating queries.

      Specified by:
      allTableMetaInfos in interface DataTableConfig
      Returns:
      all configured tables