com.im.commons.db.ddl
Class DBTableInfoProxy
java.lang.Object
com.im.commons.db.ddl.DBTableInfoProxy
- All Implemented Interfaces:
- DBTableInfo, Serializable
public class DBTableInfoProxy
- extends Object
- implements DBTableInfo
- See Also:
- Serialized Form
DBTableInfoProxy
public DBTableInfoProxy(DBTableInfoImpl impl,
LazyLoader lazyLoader)
getImpl
public DBTableInfoImpl getImpl()
isLazy
public boolean isLazy()
loadIfLazy
public void loadIfLazy()
getType
public DBTableInfo.Type getType()
- Specified by:
getType in interface DBTableInfo
getName
public String getName()
- Specified by:
getName in interface DBTableInfo
getSchema
public String getSchema()
- Specified by:
getSchema in interface DBTableInfo
- Returns:
- The schema this item belongs to.
schemaPlusTable
public String schemaPlusTable()
- Specified by:
schemaPlusTable in interface DBTableInfo
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly in interface DBTableInfo
copy
public DBTableInfo copy()
- Specified by:
copy in interface DBTableInfo
getSQL
public String getSQL()
- Getter for SQL that defines this view if it is a view, otherwise null.
- Specified by:
getSQL in interface DBTableInfo
- Returns:
- Value of property sql.
findUniqueConstraintNameForColumns
public DBConstraintInfo findUniqueConstraintNameForColumns(String[] columns)
- Description copied from interface:
DBTableInfo
- Retrieves constraint name for the named columns. The method will return
name of the unique constraint for the given set of columns. The constraint name
may be
DatabasePlatform.NAME_PRIMARY_KEY_CONSTRAINT,
which may be handled differently in some databases - for drop, use
DatabasePlatform.sqlDropPrimaryConstraint(String, String, String[]).
- Specified by:
findUniqueConstraintNameForColumns in interface DBTableInfo
- Parameters:
columns - DB columns
- Returns:
- The constraint, or
null if there's no unique constraint.
getColumn
public DBColInfo getColumn(String name)
- Specified by:
getColumn in interface DBTableInfo
getColumnNamesAsArray
public String[] getColumnNamesAsArray()
- Description copied from interface:
DBTableInfo
- Convenience method to get the column names as an array.
- Specified by:
getColumnNamesAsArray in interface DBTableInfo
- Returns:
- The names of the columns.
getColumnNamesAsList
public List<String> getColumnNamesAsList()
- Description copied from interface:
DBTableInfo
- Convenience method to get the column names as a list.
- Specified by:
getColumnNamesAsList in interface DBTableInfo
- Returns:
- The names of the columns.
getColumns
public List<DBColInfo> getColumns()
- Description copied from interface:
DBTableInfo
- Getter for property columns.
- Specified by:
getColumns in interface DBTableInfo
- Returns:
- Value of property columns.
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime in interface DBTableInfo
getExportedFKInfo
public List<DBForeignKeyInfo> getExportedFKInfo()
- Description copied from interface:
DBTableInfo
- Get the foreign keys that involve this table but are defined in a foreign key
constraint definition that is defined in another table (though possibly this table).
e.g. the keys in this table that are referred to in a foreign key constraint
definition somewhere.
- Specified by:
getExportedFKInfo in interface DBTableInfo
- Returns:
- A list of foreign keys
getImportedFKInfo
public List<DBForeignKeyInfo> getImportedFKInfo()
- Description copied from interface:
DBTableInfo
- Get the foreign keys that this table defines. e.g. the primary keys of other
tables (or possibly this table) that are referred to in a foreign key constraint
definition.
- Specified by:
getImportedFKInfo in interface DBTableInfo
- Returns:
- A list of foreign keys
getIndexInfo
public List<DBIndexInfo> getIndexInfo()
- Specified by:
getIndexInfo in interface DBTableInfo
getPrimaryKeyColumns
public List<String> getPrimaryKeyColumns()
- Description copied from interface:
DBTableInfo
- Get the value of primary key columns for the table.
- Specified by:
getPrimaryKeyColumns in interface DBTableInfo
- Returns:
- The primary key columns for the table in the order that they are defined
getTriggerInfo
public List<DBTriggerInfo> getTriggerInfo()
- Specified by:
getTriggerInfo in interface DBTableInfo
getUniqueConstraints
public List<DBConstraintInfo> getUniqueConstraints()
- Specified by:
getUniqueConstraints in interface DBTableInfo
updateColumns
public DBTableInfo updateColumns(List<DBColInfo> cols)
- Specified by:
updateColumns in interface DBTableInfo
updateImportedForeignKeys
public DBTableInfo updateImportedForeignKeys(List<DBForeignKeyInfo> pkKeys)
- Specified by:
updateImportedForeignKeys in interface DBTableInfo
updateExportedForeignKeys
public DBTableInfo updateExportedForeignKeys(List<DBForeignKeyInfo> fkKeys)
- Specified by:
updateExportedForeignKeys in interface DBTableInfo
updateIndexInfos
public DBTableInfo updateIndexInfos(List<DBIndexInfo> indexes)
- Specified by:
updateIndexInfos in interface DBTableInfo
updateUniqueConstraintInfos
public DBTableInfo updateUniqueConstraintInfos(List<DBConstraintInfo> constraints)
- Specified by:
updateUniqueConstraintInfos in interface DBTableInfo
toString
public String toString()
- Overrides:
toString in class Object