Class TableSetInfoProvider.Context

  • Enclosing interface:
    TableSetInfoProvider

    public static final class TableSetInfoProvider.Context
    extends java.lang.Object
    The context of the provider, contains informations about the schema.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String calcBaseTableName​(com.im.commons.db.ddl.DBTableInfo table, java.lang.String suffix)
      Calculates the base table name.
      static TableSetInfoProvider.Context create​(java.util.Map<java.lang.String,​com.im.commons.db.ddl.DBTableInfo> tables, java.util.Map<java.lang.String,​com.im.commons.db.ddl.tablesets.TableSetInfo> involvedTables)
      Creates context.
      com.im.commons.db.ddl.DBTableInfo get​(java.lang.String name)
      Returns the DBTableInfo from the context with the name.
      java.util.Map<java.lang.String,​com.im.commons.db.ddl.tablesets.TableSetInfo> getInvolvedTables()
      Returns a map of involved TableSetInfos in the view.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static TableSetInfoProvider.Context create​(java.util.Map<java.lang.String,​com.im.commons.db.ddl.DBTableInfo> tables,
                                                          java.util.Map<java.lang.String,​com.im.commons.db.ddl.tablesets.TableSetInfo> involvedTables)
        Creates context.
        Parameters:
        tables - Map of tables.
        involvedTables - The TableSetInfos involved in view.
        Returns:
        New context from a map of tables.
      • calcBaseTableName

        public static java.lang.String calcBaseTableName​(com.im.commons.db.ddl.DBTableInfo table,
                                                         java.lang.String suffix)
        Calculates the base table name. E.g. if the table's name is "schema.tablename_suffix" and the suffix is "_suffix" the result will be "schema.tablename".
        Parameters:
        table - The table.
        suffix - The suffix of the table.
        Returns:
        The base table name including the schema name.
      • get

        public com.im.commons.db.ddl.DBTableInfo get​(java.lang.String name)
        Returns the DBTableInfo from the context with the name. The method is case insensitive.
        Parameters:
        name - The name of the table including the schema name. It
        Returns:
        The DBTableInfo with name name or null if no table has the name name.
      • getInvolvedTables

        public java.util.Map<java.lang.String,​com.im.commons.db.ddl.tablesets.TableSetInfo> getInvolvedTables()
        Returns a map of involved TableSetInfos in the view.
        Returns:
        The keys are the names of involved tables a thalues are the TableSetInfos created for the key.