public class Table extends Object
Constructor and Description |
---|
Table() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(Column column) |
void |
addImportedKey(ImportedKey importedKey)
Add real constraints, coming from the database.
|
void |
addIndex(Index index) |
void |
addPrimaryKey(String columnName) |
boolean |
alreadyPresent(ImportedKey importedKey)
Check if the passed importedKey is already present or not in a existing ForeignKey of size 1.
|
void |
cleanup() |
Column |
getColumnByName(String name) |
List<Column> |
getColumns()
Describes all the columns metadata for this table
|
Map<String,Column> |
getColumnsByName() |
ForeignKey |
getForeignKeyByName(String name) |
Collection<ForeignKey> |
getForeignKeys() |
Map<String,ForeignKey> |
getForeignKeysByName() |
List<ImportedKey> |
getImportedKeys()
Describes all the imported keys for this table
|
List<Index> |
getIndexes()
Describes all the indexes for this table
|
IndexHolder |
getIndexHolderByName(String indexName) |
Map<String,IndexHolder> |
getIndexHoldersByName() |
String |
getName()
This table name
Example: USER |
String |
getNameEscaped() |
String |
getPrimaryKey() |
List<String> |
getPrimaryKeys()
Describes all the primary keys for this table
|
String |
getRemarks()
Documentation for this table
Example: Table containing all the user related information |
TableType |
getType()
Type of the table
|
List<IndexHolder> |
getUniqueIndexHolders()
Returns the Index List that represent unique constraints.
|
boolean |
hasCompositePrimaryKey() |
boolean |
hasH2IdentityPk()
Should the PK be created with IDENTITY?
|
boolean |
hasPk() |
boolean |
hasSimplePrimaryKey() |
boolean |
isUnique(String columnName)
Determine if the passed column is part of a unique index that has only 1 element, the passed column.
|
void |
putIndexInIndexHoldersByName(Index i) |
void |
setColumns(List<Column> columns) |
void |
setColumnsByName(Map<String,Column> columnsByName) |
void |
setForeignKeysByName(Map<String,ForeignKey> foreignKeysByName) |
void |
setImportedKeys(List<ImportedKey> importedKeys) |
void |
setIndexes(List<Index> indexes) |
void |
setIndexHoldersByName(Map<String,IndexHolder> indexHoldersByName) |
void |
setName(String name) |
void |
setPrimaryKeys(List<String> primaryKeys) |
void |
setRemarks(String remarks) |
void |
setType(TableType type) |
public Map<String,IndexHolder> getIndexHoldersByName()
public void setIndexHoldersByName(Map<String,IndexHolder> indexHoldersByName)
public Map<String,ForeignKey> getForeignKeysByName()
public void setForeignKeysByName(Map<String,ForeignKey> foreignKeysByName)
public String getName()
public String getNameEscaped()
public String getRemarks()
public TableType getType()
public void addColumn(Column column)
public void addIndex(Index index)
public void putIndexInIndexHoldersByName(Index i)
public List<IndexHolder> getUniqueIndexHolders()
public IndexHolder getIndexHolderByName(String indexName)
public boolean isUnique(String columnName)
public List<ImportedKey> getImportedKeys()
public void setImportedKeys(List<ImportedKey> importedKeys)
public void addImportedKey(ImportedKey importedKey)
public boolean alreadyPresent(ImportedKey importedKey)
public ForeignKey getForeignKeyByName(String name)
public Collection<ForeignKey> getForeignKeys()
public void addPrimaryKey(String columnName)
public boolean hasH2IdentityPk()
public boolean hasPk()
public boolean hasSimplePrimaryKey()
public boolean hasCompositePrimaryKey()
public String getPrimaryKey()
public void cleanup()
public void setName(String name)
public void setRemarks(String remarks)
public void setType(TableType type)
Copyright © 2005-2013 JAXIO S.A.R.L. - All Rights Reserved.