Class TableSetInfo

  • All Implemented Interfaces:
    AbstractInfo, java.io.Serializable
    Direct Known Subclasses:
    AbstractJChemTableSetInfo, JChemPropertyTableSetInfo, StandardTableSetInfo

    public abstract class TableSetInfo
    extends java.lang.Object
    implements AbstractInfo, java.io.Serializable
    Describes a set of tables. Often there is just a single table, but when a number of tables form a functional unit they are collected into a single TableSetInfo. An example is a JChem Base table that has an associated _UL table.
    Author:
    Martin Adamek
    See Also:
    Serialized Form
    • Constructor Detail

      • TableSetInfo

        protected TableSetInfo()
      • TableSetInfo

        protected TableSetInfo​(DBTableInfo... tableInfos)
    • Method Detail

      • schemaPlusTable

        public java.lang.String schemaPlusTable()
      • getType

        public abstract java.lang.String getType()
        A string that identifies the table type. The value will be one of the TABLE_TYPE_* constants
        Returns:
        The table type
      • getTableNames

        public SchemaQualifiedName[] getTableNames()
        The names of the "tables" used by this cluster. Usually just a single table. See @{link #getTableInfos} for more details.
        Returns:
        The table names
      • getTableInfos

        public final DBTableInfo[] getTableInfos()
        Get all the DFTableInfos that are part of this table cluster. In simple cases this will just be the main table (the tableName property), but other more complex TableSetInfos can use multiple tables. The main table will always be the first table. The term "table" is used in the generic sense and can include views etc. See @{link com.im.commons.db.ddl.DBTableInfo} for more details.
        Returns:
        The table infos
      • updateLazyTableInfos

        public void updateLazyTableInfos()
        Load full info if DBTableInfo is lazy.
      • updateTableInfosRemoveProxies

        public TableSetInfo updateTableInfosRemoveProxies()
      • getJoins

        public abstract SQLJoin[] getJoins()
        The joins for each of the tables used by this set of tables. The joins information must be supplied in the same order as the tables in getTableNames() e.g. the second element in the list of joins corresponds to the join between the master table and the second element in the getTableNames() list. Join information allows data (e.g. a field) to be present in a separate table and provides the information necessary to retreive that information By definition the join for the first element must be a SQLJoin with has a zero length path (e.g. new SQLJoin(new SQLJoin.Path[0]) ), but joins for the other tables can optionally be defined. A join will be defined where the row(s) in the secondary table can be related to those in the master table by means of a join. Not all tables will have such a join, and in these cases the list should contain null for that element in the list.
        Returns:
        SQLJoin array
      • clone

        public abstract TableSetInfo clone()
        Overrides:
        clone in class java.lang.Object
      • buildToString

        protected void buildToString​(java.lang.StringBuilder builder)
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object