|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ddlutils.model.Table
Represents a table in the database model.
Constructor Summary | |
Table()
|
Method Summary | |
void |
addColumn(Column column)
Adds the given column. |
void |
addColumn(int idx,
Column column)
Adds the given column at the specified position . |
void |
addColumns(Collection columns)
Adds the given columns. |
void |
addForeignKey(ForeignKey foreignKey)
Adds the given foreign key. |
void |
addForeignKey(int idx,
ForeignKey foreignKey)
Adds the given foreign key at the specified position. |
void |
addForeignKeys(Collection foreignKeys)
Adds the given foreign keys. |
void |
addIndex(Index index)
Adds the given index. |
void |
addIndex(int idx,
Index index)
Adds the given index at the specified position. |
void |
addIndices(Collection indices)
Adds the given indices. |
protected Object |
clone()
|
boolean |
equals(Object obj)
|
Column |
findColumn(String name)
Finds the column with the specified name, using case insensitive matching. |
Column |
findColumn(String name,
boolean caseSensitive)
Finds the column with the specified name, using case insensitive matching. |
ForeignKey |
findForeignKey(ForeignKey key)
Finds the foreign key in this table that is equal to the supplied foreign key. |
Index |
findIndex(String name)
Finds the index with the specified name, using case insensitive matching. |
Index |
findIndex(String name,
boolean caseSensitive)
Finds the index with the specified name, using case insensitive matching. |
Column[] |
getAutoIncrementColumns()
Returns the auto increment columns in this table. |
String |
getCatalog()
Returns the catalog of this table as read from the database. |
Column |
getColumn(int idx)
Returns the column at the specified position. |
int |
getColumnCount()
Returns the number of columns in this table. |
Column[] |
getColumns()
Returns the columns in this table. |
String |
getDescription()
Returns the description of the table. |
ForeignKey |
getForeignKey(int idx)
Returns the foreign key at the given position. |
int |
getForeignKeyCount()
Returns the number of foreign keys. |
ForeignKey[] |
getForeignKeys()
Returns the foreign keys of this table. |
Index |
getIndex(int idx)
Returns the index at the specified position. |
int |
getIndexCount()
Returns the number of indices. |
Index[] |
getIndices()
Returns the indices of this table. |
String |
getName()
Returns the name of the table. |
Index[] |
getNonUniqueIndices()
Gets a list of non-unique indices on this table. |
Column[] |
getPrimaryKeyColumns()
Returns the primary key columns of this table. |
String |
getSchema()
Returns the schema of this table as read from the database. |
String |
getType()
Returns the type of this table as read from the database. |
Index[] |
getUniqueIndices()
Gets a list of unique indices on this table. |
int |
hashCode()
|
boolean |
hasPrimaryKey()
Determines whether there is at least one primary key column on this table. |
void |
removeColumn(Column column)
Removes the given column. |
void |
removeColumn(int idx)
Removes the indicated column. |
void |
removeForeignKey(ForeignKey foreignKey)
Removes the given foreign key. |
void |
removeForeignKey(int idx)
Removes the indicated foreign key. |
void |
removeIndex(Index index)
Removes the given index. |
void |
removeIndex(int idx)
Removes the indicated index. |
void |
setCatalog(String catalog)
Sets the catalog of this table. |
void |
setDescription(String description)
Sets the description of the table. |
void |
setName(String name)
Sets the name of the table. |
void |
setSchema(String schema)
Sets the schema of this table. |
void |
setType(String type)
Sets the type of this table. |
String |
toString()
|
String |
toVerboseString()
Returns a verbose string representation of this table. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Table()
Method Detail |
public String getCatalog()
public void setCatalog(String catalog)
catalog
- The catalogpublic String getSchema()
public void setSchema(String schema)
schema
- The schemapublic String getType()
public void setType(String type)
type
- The typepublic String getName()
public void setName(String name)
name
- The namepublic String getDescription()
public void setDescription(String description)
description
- The descriptionpublic int getColumnCount()
public Column getColumn(int idx)
idx
- The column index
public Column[] getColumns()
public void addColumn(Column column)
column
- The columnpublic void addColumn(int idx, Column column)
idx
- The index where to add the columncolumn
- The columnpublic void addColumns(Collection columns)
columns
- The columnspublic void removeColumn(Column column)
column
- The column to removepublic void removeColumn(int idx)
idx
- The index of the column to removepublic int getForeignKeyCount()
public ForeignKey getForeignKey(int idx)
idx
- The foreign key index
public ForeignKey[] getForeignKeys()
public void addForeignKey(ForeignKey foreignKey)
foreignKey
- The foreign keypublic void addForeignKey(int idx, ForeignKey foreignKey)
idx
- The index to add the foreign key atforeignKey
- The foreign keypublic void addForeignKeys(Collection foreignKeys)
foreignKeys
- The foreign keyspublic void removeForeignKey(ForeignKey foreignKey)
foreignKey
- The foreign key to removepublic void removeForeignKey(int idx)
idx
- The index of the foreign key to removepublic int getIndexCount()
public Index getIndex(int idx)
idx
- The position
public void addIndex(Index index)
index
- The indexpublic void addIndex(int idx, Index index)
idx
- The position to add the index atindex
- The indexpublic void addIndices(Collection indices)
indices
- The indicespublic Index[] getIndices()
public Index[] getNonUniqueIndices()
public Index[] getUniqueIndices()
public void removeIndex(Index index)
index
- The index to removepublic void removeIndex(int idx)
idx
- The position of the index to removepublic boolean hasPrimaryKey()
true
if there are one or more primary key columnspublic Column findColumn(String name)
name
- The name of the column
null
if there is no such columnpublic Column findColumn(String name, boolean caseSensitive)
name
- The name of the columncaseSensitive
- Whether case matters for the names
null
if there is no such columnpublic Index findIndex(String name)
name
- The name of the index
null
if there is no such indexpublic Index findIndex(String name, boolean caseSensitive)
name
- The name of the indexcaseSensitive
- Whether case matters for the names
null
if there is no such indexpublic ForeignKey findForeignKey(ForeignKey key)
key
- The foreign key to search for
public Column[] getPrimaryKeyColumns()
public Column[] getAutoIncrementColumns()
protected Object clone() throws CloneNotSupportedException
CloneNotSupportedException
public boolean equals(Object obj)
public int hashCode()
public String toString()
public String toVerboseString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |