public class Table extends Object
| Constructor and Description |
|---|
Table() |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column column) |
void |
addForeignKey(Column col) |
void |
addImportedKey(Column column) |
void |
addManyToManyKey(Column fk,
Column pk) |
void |
addPrimaryKey(Column column) |
int |
countColumns() |
int |
countForeignKeys() |
int |
countImportedKeys() |
int |
countPrimaryKeys() |
String |
getCatalog() |
Column |
getColumn(String name) |
Column[] |
getColumns() |
Column[] |
getColumnsFor(String type) |
Column |
getForeignKeyFor(Table pTable)
Return the imported key pointing to the passed table.
|
Column[] |
getForeignKeys() |
Table[] |
getForeignTables() |
Column[] |
getImportedKeys() |
Table[] |
getImportedTables() |
String[] |
getLinkedPackages() |
Table[] |
getLinkedTables() |
Column[][] |
getManyToManyKeys()
Returns a 2-D array of the keys in this table that form a many
to many relationship.
|
String |
getName() |
String |
getPackage() |
String |
getPackagePath() |
Column[] |
getPrimaryKeys() |
String |
getRemarks() |
String |
getSchema() |
String |
getType() |
boolean |
hasForeignKeys() |
boolean |
hasImportedKeys() |
boolean |
hasPrimaryKey() |
boolean |
isForeignKey(Column col) |
boolean |
isRelationTable() |
Table[] |
linkedTables(Database pDatabase,
Table pTable)
Return, beside the passed table, the tables this table points to.
|
boolean |
relationConnectsTo(Table otherTable)
Tells whether if one of this table's columns (imported key)
points to one of the otherTable's pk.
|
void |
removeColumn(Column column) |
void |
setCatalog(String catalog) |
void |
setDatabase(Database db) |
void |
setName(String name) |
void |
setRemarks(String remarks) |
void |
setSchema(String schema) |
void |
setType(String type) |
public boolean isRelationTable()
public boolean relationConnectsTo(Table otherTable)
public Table[] linkedTables(Database pDatabase, Table pTable)
public Column getForeignKeyFor(Table pTable)
public void setDatabase(Database db)
public void setCatalog(String catalog)
public void setSchema(String schema)
public void setName(String name)
public void setType(String type)
public void setRemarks(String remarks)
public String getCatalog()
public String getSchema()
public String getName()
public String getType()
public String getRemarks()
public Column[] getColumns()
public void addColumn(Column column)
public void removeColumn(Column column)
public Column[] getPrimaryKeys()
public void addPrimaryKey(Column column)
public Column[] getImportedKeys()
public void addImportedKey(Column column)
public Column[][] getManyToManyKeys()
public int countColumns()
public int countPrimaryKeys()
public boolean hasPrimaryKey()
public int countImportedKeys()
public boolean hasImportedKeys()
public int countForeignKeys()
public boolean hasForeignKeys()
public void addForeignKey(Column col)
public Column[] getForeignKeys()
public boolean isForeignKey(Column col)
public Table[] getLinkedTables()
public Table[] getImportedTables()
public Table[] getForeignTables()
public String[] getLinkedPackages()
public String getPackage()
public String getPackagePath()
Copyright © 2014. All Rights Reserved.