com.im.commons.db 5.9.2

com.im.commons.db.ddl.tablesets
Class TableSetInfo

java.lang.Object
  extended by com.im.commons.db.ddl.tablesets.TableSetInfo
All Implemented Interfaces:
AbstractInfo, Serializable
Direct Known Subclasses:
AbstractJChemTableSetInfo, JChemPropertyTableSetInfo, StandardTableSetInfo

public abstract class TableSetInfo
extends Object
implements AbstractInfo, 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.

See Also:
Serialized Form

Field Summary
protected  DBTableInfo[] tableInfos
           
 
Constructor Summary
protected TableSetInfo()
           
 
Method Summary
 void addToModel(String parentID, DBItemsCache cache)
           
abstract  TableSetInfo clone()
           
abstract  SQLJoin[] getJoins()
          The joins for each of the tables used by this set of tables.
 DBTableInfo[] getTableInfos()
          Get all the DFTableInfos that are part of this table cluster.
 SchemaQualifiedName[] getTableNames()
          The names of the "tables" used by this cluster.
abstract  String getType()
          A string that identifies the table type.
 void removeFromModel(String parentID, DBItemsCache cache)
           
 String schemaPlusTable()
           
 void updateLazyTableInfos()
          Load full info if DBTableInfo is lazy
 TableSetInfo updateTableInfos(DBTableInfo... tInfos)
           
 TableSetInfo updateTableInfosRemoveProxies()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableInfos

protected DBTableInfo[] tableInfos
Constructor Detail

TableSetInfo

protected TableSetInfo()
Method Detail

schemaPlusTable

public String schemaPlusTable()

getType

public abstract 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

updateTableInfos

public TableSetInfo updateTableInfos(DBTableInfo... tInfos)

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 Object

addToModel

public void addToModel(String parentID,
                       DBItemsCache cache)
Specified by:
addToModel in interface AbstractInfo

removeFromModel

public void removeFromModel(String parentID,
                            DBItemsCache cache)
Specified by:
removeFromModel in interface AbstractInfo

com.im.commons.db 5.9.2