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>
colsmap
protected List<Column>
columns
protected Map<String,Index>
idxsmap
protected List<Index>
indexes
protected String
name
protected String[]
pkeys
protected Map<String,String>
properties
protected String
shortname
-
Constructor Summary
Constructors Constructor Description Table()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(Column column)
INTERNAL: Adds the column to the table definition.void
addIndex(Index index)
INTERNAL: Adds the index to the table definition.void
addProperty(String property, String value)
INTERNAL: Adds table property.Column
getColumnByName(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.String
getName()
INTERNAL: Gets the name of the table.String[]
getPrimaryKeys()
INTERNAL: Gets the primary key columns.Collection<String>
getProperties()
INTERNAL: Gets the table properties.String
getProperty(String property)
INTERNAL: Gets the property valueString
getShortName()
INTERNAL: Gets the short name of the table.void
removeColumn(Column column)
INTERNAL: Removes the column from the table definition.void
removeIndex(Index index)
INTERNAL: Removes the index from the table definition.void
removeProperty(String property, String value)
INTERNAL: Removes table property.void
setName(String name)
INTERNAL: Sets the name of the table.void
setPrimaryKeys(String[] pkeys)
INTERNAL: Sets the primary key columns.void
setShortName(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.
-
-