public class EntityTable extends AbstractTable
| Constructor and Description |
|---|
EntityTable(EntityTypeImpl<?> entity,
TableMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(AbstractColumn column)
Adds the column to the table
|
boolean |
addIndex(String name,
BasicColumn... columns)
Adds the index to table.
|
EntityTypeImpl<?> |
getEntity()
Returns the entity of the EntityTable.
|
HashMap<AbstractColumn,String> |
getIdFields()
Returns the id fields of the table.
|
Map<String,BasicColumn[]> |
getIndexes()
Returns the indexes of the table.
|
protected JdbcAdaptor |
getJdbcAdaptor()
Returns the jdbcAdaptor of the EntityTable.
|
Set<String> |
getPkColumnNames()
Returns the set of primary key column names.
|
Collection<AbstractColumn> |
getPkColumns()
Returns the pkColumns of the EntityTable.
|
void |
performInsert(Connection connection,
ManagedInstance<?>[] managedInstances,
int size)
Performs inserts to the table for the managed instance or joins.
|
void |
performRemove(Connection connection,
ManagedInstance<?>[] managedInstances,
int size)
Performs removes from the table for the managed instance or joins.
|
Object |
performSelectVersion(Connection connection,
ManagedInstance<?> managedInstance)
Selects the version from the table.
|
void |
performUpdate(Connection connection,
ManagedInstance<?> managedInstance)
Performs update to the table for the managed instance or joins.
|
boolean |
performUpdateWithUpdatability(Connection connection,
ManagedInstance<?> managedInstance)
Performs update to the table for the managed instance or joins.
|
void |
performVersionUpdate(Connection connection,
ManagedInstance<?> managedInstance)
Performs version update to the table.
|
String |
toString() |
addForeignKey, getCatalog, getColumnMap, getColumnNames, getColumns, getForeignKeys, getInsertColumns, getInsertSql, getLocator, getName, getQName, getSchema, getSelectVersionColumns, getSelectVersionSql, getUniqueConstraints, getUpdateColumns, getUpdateSql, getVersionUpdateColumns, getVersionUpdateSql, setNamepublic EntityTable(EntityTypeImpl<?> entity, TableMetadata metadata)
entity - the entitymetadata - the table metadatapublic void addColumn(AbstractColumn column)
addColumn in class AbstractTablecolumn - the column to addpublic boolean addIndex(String name, BasicColumn... columns)
name - the name of the indexcolumns - the columnsname already existed, false otherwisepublic EntityTypeImpl<?> getEntity()
public HashMap<AbstractColumn,String> getIdFields()
public Map<String,BasicColumn[]> getIndexes()
protected JdbcAdaptor getJdbcAdaptor()
public Set<String> getPkColumnNames()
getPkColumnNames in class AbstractTablepublic Collection<AbstractColumn> getPkColumns()
public void performInsert(Connection connection, ManagedInstance<?>[] managedInstances, int size) throws SQLException
connection - the connection to usemanagedInstances - the managed instances to perform insert forsize - the size of the batchSQLException - thrown in case of underlying SQLExceptionpublic void performRemove(Connection connection, ManagedInstance<?>[] managedInstances, int size) throws SQLException
connection - the connection to usemanagedInstances - the managed instance to perform remove forsize - the size of the batchSQLException - thrown in case of underlying SQLExceptionpublic Object performSelectVersion(Connection connection, ManagedInstance<?> managedInstance) throws SQLException
connection - the connection to usemanagedInstance - the managed instance to perform select forSQLException - thrown in case of underlying SQLExceptionpublic void performUpdate(Connection connection, ManagedInstance<?> managedInstance) throws SQLException
connection - the connection to usemanagedInstance - the managed instance to perform update forSQLException - thrown in case of underlying SQLExceptionpublic boolean performUpdateWithUpdatability(Connection connection, ManagedInstance<?> managedInstance) throws SQLException
connection - the connection to usemanagedInstance - the managed instance to perform update forSQLException - thrown in case of underlying SQLExceptionpublic void performVersionUpdate(Connection connection, ManagedInstance<?> managedInstance) throws SQLException
connection - the connection to usemanagedInstance - the managed instance to perform version update forSQLException - thrown in case of underlying SQLExceptionCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.