|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clazzes.jdbc2xml.schema.TableInfo
public class TableInfo
This class hold everything we need to known about a database table.
| Constructor Summary | |
|---|---|
TableInfo()
Default constructor |
|
TableInfo(java.lang.String name)
Constructor with table name. |
|
| Method Summary | |
|---|---|
void |
addColumn(ColumnInfo ci)
Add a column to our list of column descriptions. |
void |
addForeignKey(ForeignKeyInfo fki)
Add a foreign key to our list of foreign key descriptions. |
void |
addIndex(IndexInfo indexInfo)
Add an index to the list of indices. |
void |
addIndex(java.lang.String indexName,
java.lang.String indexColumns,
boolean unique,
java.lang.String filterCondition)
Add an index to the list of indices. |
ColumnInfo |
getColumnInfo(java.lang.String columnName)
Return the column info for the given column name. |
java.util.List<ColumnInfo> |
getColumns()
|
java.lang.String |
getComment()
|
ForeignKeyInfo |
getForeignKeyInfo(java.lang.String fkName)
Get a ForeignKeyInfo for a specified foreign-key-name. |
java.util.List<ForeignKeyInfo> |
getForeignKeys()
|
IndexInfo |
getIndexInfo(java.lang.String idxName)
Get a IndexInfo for a specified foreign-key-name. |
java.util.List<IndexInfo> |
getIndices()
|
java.lang.String |
getName()
|
PrimaryKeyInfo |
getPrimaryKey()
|
boolean |
indexContainsNullableColumns(IndexInfo indexInfo)
Investigates if an IndexInfo contains a NULLable column |
void |
removeColumnInfo(java.lang.String columnName)
Remove a defined ColumnInfo. |
void |
removeForeignKey(java.lang.String fkName)
Remove a defined ForeignKeyInfo. |
void |
removeIndex(java.lang.String indexName)
Remove a defined indexInfo. |
void |
replaceColumnInfo(java.lang.String columnName,
ColumnInfo newColumnInfo)
Replace a defined ColumnInfo by another one. |
void |
setColumns(java.util.List<ColumnInfo> columns)
|
void |
setComment(java.lang.String comment)
|
void |
setForeignKeys(java.util.List<ForeignKeyInfo> foreignKeys)
|
void |
setIndices(java.util.List<IndexInfo> indices)
|
void |
setName(java.lang.String name)
|
void |
setPrimaryKey(PrimaryKeyInfo primaryKey)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableInfo()
public TableInfo(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - the name to setpublic java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - the comment to setpublic java.util.List<ColumnInfo> getColumns()
public void setColumns(java.util.List<ColumnInfo> columns)
columns - the columns to setpublic void addColumn(ColumnInfo ci)
ci - The ColumnInfo to add.public ColumnInfo getColumnInfo(java.lang.String columnName)
columnName - The name of the column to seek for.
public void replaceColumnInfo(java.lang.String columnName,
ColumnInfo newColumnInfo)
ColumnInfo by another one.
If not found, nothing happens.
columnName - Name of the column to replace.newColumnInfo - The new ColumnInfo for the specified column.public void removeColumnInfo(java.lang.String columnName)
ColumnInfo.
If not found, nothing happens.
columnName - Name of the column to remove.public void removeIndex(java.lang.String indexName)
indexInfo.
If not found, nothing happens.
indexName - Name of the index to remove.public PrimaryKeyInfo getPrimaryKey()
public void setPrimaryKey(PrimaryKeyInfo primaryKey)
primaryKey - The primary key to set.public java.util.List<ForeignKeyInfo> getForeignKeys()
public void setForeignKeys(java.util.List<ForeignKeyInfo> foreignKeys)
foreignKeys - the foreignKeys to setpublic void addForeignKey(ForeignKeyInfo fki)
fki - The PrimaryKeyInfo to add.public ForeignKeyInfo getForeignKeyInfo(java.lang.String fkName)
ForeignKeyInfo for a specified foreign-key-name.
fkName - Name of the foreign key to get.
ForeignKeyInfo found, or null if not found.public IndexInfo getIndexInfo(java.lang.String idxName)
IndexInfo for a specified foreign-key-name.
idxName - Name of the index to get.
IndexInfo found, or null if not found.public void removeForeignKey(java.lang.String fkName)
ForeignKeyInfo.
If not found, nothing happens.
fkName - Name of the foreign key to remove.public java.util.List<IndexInfo> getIndices()
public void setIndices(java.util.List<IndexInfo> indices)
indices - The list of indices to set.public void addIndex(IndexInfo indexInfo)
indexInfo - The index to add.
public void addIndex(java.lang.String indexName,
java.lang.String indexColumns,
boolean unique,
java.lang.String filterCondition)
indexName - name of the indexindexColumns - column listunique - if the index should be uniquefilterCondition - public boolean indexContainsNullableColumns(IndexInfo indexInfo)
indexInfo - the Index to investigate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||