Package net.ontopia.persistence.rdbms
Class Table
- java.lang.Object
-
- net.ontopia.persistence.rdbms.Table
-
public class Table extends Object
INTERNAL: Represents the definition of a relational database table.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Column>colsmapprotected List<Column>columnsprotected Map<String,Index>idxsmapprotected List<Index>indexesprotected Stringnameprotected String[]pkeysprotected Map<String,String>propertiesprotected Stringshortname
-
Constructor Summary
Constructors Constructor Description Table()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddColumn(Column column)INTERNAL: Adds the column to the table definition.voidaddIndex(Index index)INTERNAL: Adds the index to the table definition.voidaddProperty(String property, String value)INTERNAL: Adds table property.ColumngetColumnByName(String name)INTERNAL: Gets a column by name.List<Column>getColumns()INTERNAL: Gets all the columns in the table.List<Index>getIndexes()INTERNAL: Gets all the indexes in the table.StringgetName()INTERNAL: Gets the name of the table.String[]getPrimaryKeys()INTERNAL: Gets the primary key columns.Collection<String>getProperties()INTERNAL: Gets the table properties.StringgetProperty(String property)INTERNAL: Gets the property valueStringgetShortName()INTERNAL: Gets the short name of the table.voidremoveColumn(Column column)INTERNAL: Removes the column from the table definition.voidremoveIndex(Index index)INTERNAL: Removes the index from the table definition.voidremoveProperty(String property, String value)INTERNAL: Removes table property.voidsetName(String name)INTERNAL: Sets the name of the table.voidsetPrimaryKeys(String[] pkeys)INTERNAL: Sets the primary key columns.voidsetShortName(String shortname)INTERNAL: Sets the short name of the table.
-
-
-
Method Detail
-
getName
public String getName()
INTERNAL: Gets the name of the table.
-
setName
public void setName(String name)
INTERNAL: Sets the name of the table.
-
getShortName
public String getShortName()
INTERNAL: Gets the short name of the table.
-
setShortName
public void setShortName(String shortname)
INTERNAL: Sets the short name of the table.
-
getProperties
public Collection<String> getProperties()
INTERNAL: Gets the table properties.
-
removeProperty
public void removeProperty(String property, String value)
INTERNAL: Removes table property.
-
addColumn
public void addColumn(Column column)
INTERNAL: Adds the column to the table definition.
-
removeColumn
public void removeColumn(Column column)
INTERNAL: Removes the column from the table definition.
-
addIndex
public void addIndex(Index index)
INTERNAL: Adds the index to the table definition.
-
removeIndex
public void removeIndex(Index index)
INTERNAL: Removes the index from the table definition.
-
getPrimaryKeys
public String[] getPrimaryKeys()
INTERNAL: Gets the primary key columns.
-
setPrimaryKeys
public void setPrimaryKeys(String[] pkeys)
INTERNAL: Sets the primary key columns.
-
-