public abstract class AbstractTable extends Object
| Constructor and Description |
|---|
AbstractTable(String defaultName,
TableMetadata metadata) |
AbstractTable(TableMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(AbstractColumn column)
Adds the column to the table
|
void |
addForeignKey(ForeignKey foreignKey)
Adds a foreign key to the table.
|
String |
getCatalog()
Returns the catalog.
|
Set<String> |
getColumnNames()
Returns the set of column names.
|
Collection<AbstractColumn> |
getColumns()
Returns the collection of basicColumns of the table.
|
List<ForeignKey> |
getForeignKeys()
Returns the foreign keys of the table.
|
protected AbstractColumn[] |
getInsertColumns(EntityTypeImpl<?> entity)
Returns the columns for the insert.
|
protected String |
getInsertSql(EntityTypeImpl<?> entity)
Returns the insert statement for the table specifically.
|
AbstractLocator |
getLocator()
Returns the locator.
|
String |
getName()
Returns the name.
|
Set<String> |
getPkColumnNames()
Returns the set of primary key column names.
|
String |
getQName()
Returns the qualified name of the table.
|
String |
getSchema()
Returns the schema.
|
AbstractColumn[] |
getSelectVersionColumns()
Returns the select version columns.
|
protected String |
getSelectVersionSql(Map<String,AbstractColumn> pkColumns)
Returns the version select statement for the table specifically.
|
Map<String,String[]> |
getUniqueConstraints()
Returns the unique constraints.
|
protected AbstractColumn[] |
getUpdateColumns(EntityTypeImpl<?> entity)
Returns the columns for the update.
|
protected String |
getUpdateSql(EntityTypeImpl<?> entity,
Map<String,AbstractColumn> pkColumns)
Returns the update statement for the table specifically.
|
AbstractColumn[] |
getVersionUpdateColumns()
Returns the version update columns.
|
protected String |
getVersionUpdateSql(Map<String,AbstractColumn> pkColumns)
Returns the version update statement for the table specifically.
|
protected void |
setName(String name)
Updates the name of the table.
|
public AbstractTable(String defaultName, TableMetadata metadata)
defaultName - the default name for the tablemetadata - the metadatapublic AbstractTable(TableMetadata metadata)
metadata - the metadatapublic void addColumn(AbstractColumn column)
column - the column to addpublic void addForeignKey(ForeignKey foreignKey)
foreignKey - the foreign key to addpublic String getCatalog()
public Set<String> getColumnNames()
public Collection<AbstractColumn> getColumns()
public List<ForeignKey> getForeignKeys()
protected AbstractColumn[] getInsertColumns(EntityTypeImpl<?> entity)
entity - the entity to returns columns for or null for generic columnsprotected String getInsertSql(EntityTypeImpl<?> entity)
entity - the entity to return insert statement for or null for generic SQLpublic AbstractLocator getLocator()
public String getName()
public Set<String> getPkColumnNames()
public String getQName()
public String getSchema()
public AbstractColumn[] getSelectVersionColumns()
protected String getSelectVersionSql(Map<String,AbstractColumn> pkColumns)
pkColumns - the primary key columnspublic Map<String,String[]> getUniqueConstraints()
protected AbstractColumn[] getUpdateColumns(EntityTypeImpl<?> entity)
entity - the entity to returns columns for or null for generic columnsprotected String getUpdateSql(EntityTypeImpl<?> entity, Map<String,AbstractColumn> pkColumns)
entity - the entity to return update statement for or null for generic SQLpkColumns - the primary key columnspublic AbstractColumn[] getVersionUpdateColumns()
protected String getVersionUpdateSql(Map<String,AbstractColumn> pkColumns)
pkColumns - the primary key columnsprotected void setName(String name)
name - the name of the tableCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.