| java.lang.Object org.apache.torque.map.TableMap
Method Summary | |
public void | addColumn(ColumnMap cmap) Add a pre-created column to this table. | public void | addColumn(String columnName, Object type) Add a column to this table of a certain type. | public void | addColumn(String columnName, Object type, int size, int scale) Add a column to this table of a certain type, size, and scale. | public void | addColumn(String columnName, Object type, int size) Add a column to this table of a certain type and size. | public void | addForeignKey(String columnName, Object type, String fkTable, String fkColumn) Add a foreign key column to the table. | public void | addForeignKey(String columnName, Object type, String fkTable, String fkColumn, int size) Add a foreign key column to the table. | public void | addForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn) Add a foreign primary key column to the table. | public void | addForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn, int size) Add a foreign primary key column to the table. | public void | addPrimaryKey(String columnName, Object type) Add a primary key column to this Table. | public void | addPrimaryKey(String columnName, Object type, int size) Add a primary key column to this Table. | public boolean | containsColumn(ColumnMap column) Does this table contain the specified column?
Parameters: column - A ColumnMap. | public boolean | containsColumn(String name) Does this table contain the specified column?
Parameters: name - A String with the name of the column. | public boolean | containsObjectColumn() Returns true if this tableMap contains a column with object
data. | public ColumnMap | getColumn(String name) Get a ColumnMap for the named table.
Parameters: name - A String with the name of the table. | public ColumnMap[] | getColumns() Get a ColumnMap[] of the columns in this table. | public DatabaseMap | getDatabaseMap() Get the DatabaseMap containing this TableMap. | public DatabaseMap | getDbMap() Returns the database map for this table. | public String | getDescription() Returns the table description info. | public IdGenerator | getIdGenerator() Get the value of idGenerator. | public String | getJavaName() Get the Java name of the table as defined in XML. | public Class | getManagerClass() Returns the manager class for this table. | public String | getName() Get the name of the Table. | public Class | getOMClass() Returns the OM class for this table. | public Class | getPeerClass() Returns the Peer Class for this table. | public String | getPrefix() Get table prefix name. | public String | getPrimaryKeyMethod() Get the method used to generate primary keys for this table. | public Object | getPrimaryKeyMethodInfo() | public boolean | isUseInheritance() Returns whether this table uses inheritance. | public boolean | isUseManager() Returns whether managers are used for this table. | final public String | removeUnderScores(String data) Removes the PREFIX, removes the underscores and makes
first letter caps.
SCARAB_FOO_BAR becomes FooBar.
Parameters: data - A String. | public void | setDescription(String description) Sets the table description. | public void | setJavaName(String value) Set the Java name of the table as defined by generator/XML. | public void | setManagerClass(Class managerClass) Sets the manager class for this table. | public void | setOMClass(Class omClass) Sets the OM root class for this table. | public void | setPeerClass(Class peerClass) Sets the Peer class for this table. | public void | setPrefix(String prefix) Set table prefix name. | public void | setPrimaryKeyMethod(String method) Sets the method used to generate a key for this table. | public void | setPrimaryKeyMethodInfo(Object pkInfo) | public void | setUseInheritance(boolean useInheritance) Sets whether this table uses inheritance. | public void | setUseManager(boolean useManager) Sets whether managers are used for this table. |
VALID_ID_METHODS | final protected static String[] VALID_ID_METHODS(Code) | | The list of valid ID generation methods.
|
TableMap | public TableMap()(Code) | | Required by proxy. Not used.
|
TableMap | public TableMap(String tableName, int numberOfColumns, DatabaseMap containingDB)(Code) | | Constructor.
Parameters: tableName - The name of the table. Parameters: numberOfColumns - The number of columns in the table. Parameters: containingDB - A DatabaseMap that this table belongs to. |
TableMap | public TableMap(String tableName, DatabaseMap containingDB)(Code) | | Constructor.
Parameters: tableName - The name of the table. Parameters: containingDB - A DatabaseMap that this table belongs to. |
TableMap | public TableMap(String tableName, String prefix, DatabaseMap containingDB)(Code) | | Constructor.
Parameters: tableName - The name of the table. Parameters: prefix - The prefix for the table name (ie: SCARAB forSCARAB_PROJECT). Parameters: containingDB - A DatabaseMap that this table belongs to. |
addColumn | public void addColumn(ColumnMap cmap)(Code) | | Add a pre-created column to this table. It will replace any
existing column.
Parameters: cmap - A ColumnMap. |
addColumn | public void addColumn(String columnName, Object type)(Code) | | Add a column to this table of a certain type.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. |
addColumn | public void addColumn(String columnName, Object type, int size, int scale)(Code) | | Add a column to this table of a certain type, size, and scale.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: size - An int specifying the size. Parameters: scale - An int specifying the scale. |
addColumn | public void addColumn(String columnName, Object type, int size)(Code) | | Add a column to this table of a certain type and size.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: size - An int specifying the size. |
addForeignKey | public void addForeignKey(String columnName, Object type, String fkTable, String fkColumn)(Code) | | Add a foreign key column to the table.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: fkTable - A String with the foreign key table name. Parameters: fkColumn - A String with the foreign key column name. |
addForeignKey | public void addForeignKey(String columnName, Object type, String fkTable, String fkColumn, int size)(Code) | | Add a foreign key column to the table.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: fkTable - A String with the foreign key table name. Parameters: fkColumn - A String with the foreign key column name. Parameters: size - An int specifying the size. |
addForeignPrimaryKey | public void addForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn)(Code) | | Add a foreign primary key column to the table.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: fkTable - A String with the foreign key table name. Parameters: fkColumn - A String with the foreign key column name. |
addForeignPrimaryKey | public void addForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn, int size)(Code) | | Add a foreign primary key column to the table.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: fkTable - A String with the foreign key table name. Parameters: fkColumn - A String with the foreign key column name. Parameters: size - An int specifying the size. |
addPrimaryKey | public void addPrimaryKey(String columnName, Object type)(Code) | | Add a primary key column to this Table.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. |
addPrimaryKey | public void addPrimaryKey(String columnName, Object type, int size)(Code) | | Add a primary key column to this Table.
Parameters: columnName - A String with the column name. Parameters: type - An Object specifying the type. Parameters: size - An int specifying the size. |
containsColumn | public boolean containsColumn(ColumnMap column)(Code) | | Does this table contain the specified column?
Parameters: column - A ColumnMap. True if the table contains the column. |
containsColumn | public boolean containsColumn(String name)(Code) | | Does this table contain the specified column?
Parameters: name - A String with the name of the column. True if the table contains the column. |
containsObjectColumn | public boolean containsObjectColumn()(Code) | | Returns true if this tableMap contains a column with object
data. If the type of the column is not a string, a number or a
date, it is assumed that it is object data.
True if map contains a column with object data. |
getColumn | public ColumnMap getColumn(String name)(Code) | | Get a ColumnMap for the named table.
Parameters: name - A String with the name of the table. A ColumnMap. |
getColumns | public ColumnMap[] getColumns()(Code) | | Get a ColumnMap[] of the columns in this table.
A ColumnMap[]. |
getDatabaseMap | public DatabaseMap getDatabaseMap()(Code) | | Get the DatabaseMap containing this TableMap.
A DatabaseMap. |
getDbMap | public DatabaseMap getDbMap()(Code) | | Returns the database map for this table.
the database map for this table. |
getDescription | public String getDescription()(Code) | | Returns the table description info.
Returns the description. |
getIdGenerator | public IdGenerator getIdGenerator()(Code) | | Get the value of idGenerator.
value of idGenerator. |
getJavaName | public String getJavaName()(Code) | | Get the Java name of the table as defined in XML.
A String with the Java name of the table. |
getManagerClass | public Class getManagerClass()(Code) | | Returns the manager class for this table.
the managerClass. |
getName | public String getName()(Code) | | Get the name of the Table.
A String with the name of the table. |
getOMClass | public Class getOMClass()(Code) | | Returns the OM class for this table.
the OM class. |
getPeerClass | public Class getPeerClass()(Code) | | Returns the Peer Class for this table.
The peerClass for this table. |
getPrefix | public String getPrefix()(Code) | | Get table prefix name.
A String with the prefix. |
getPrimaryKeyMethod | public String getPrimaryKeyMethod()(Code) | | Get the method used to generate primary keys for this table.
A String with the method. |
getPrimaryKeyMethodInfo | public Object getPrimaryKeyMethodInfo()(Code) | | Get the information used to generate a primary key
An Object. |
isUseInheritance | public boolean isUseInheritance()(Code) | | Returns whether this table uses inheritance.
whether inheritance is used. |
isUseManager | public boolean isUseManager()(Code) | | Returns whether managers are used for this table.
whether managers are used for this table. |
removeUnderScores | final public String removeUnderScores(String data)(Code) | | Removes the PREFIX, removes the underscores and makes
first letter caps.
SCARAB_FOO_BAR becomes FooBar.
Parameters: data - A String. A String with data processed. |
setDescription | public void setDescription(String description)(Code) | | Sets the table description.
Parameters: description - The description to set. |
setJavaName | public void setJavaName(String value)(Code) | | Set the Java name of the table as defined by generator/XML.
Parameters: value - A String with the Java name of the table. |
setManagerClass | public void setManagerClass(Class managerClass)(Code) | | Sets the manager class for this table.
Parameters: managerClass - the manager class for this table. |
setOMClass | public void setOMClass(Class omClass)(Code) | | Sets the OM root class for this table.
Parameters: omClass - The OM root class for this table. |
setPeerClass | public void setPeerClass(Class peerClass)(Code) | | Sets the Peer class for this table.
Parameters: peerClass - The peerClass to set. |
setPrefix | public void setPrefix(String prefix)(Code) | | Set table prefix name.
Parameters: prefix - The prefix for the table name (ie: SCARAB forSCARAB_PROJECT). |
setPrimaryKeyMethod | public void setPrimaryKeyMethod(String method)(Code) | | Sets the method used to generate a key for this table. Valid
values are as specified in the
org.apache.torque.adapter.IDMethod interface.
Parameters: method - The ID generation method type name. |
setPrimaryKeyMethodInfo | public void setPrimaryKeyMethodInfo(Object pkInfo)(Code) | | Sets the pk information needed to generate a key
Parameters: pkInfo - information needed to generate a key |
setUseInheritance | public void setUseInheritance(boolean useInheritance)(Code) | | Sets whether this table uses inheritance.
Parameters: useInheritance - whether this table uses inheritance. |
setUseManager | public void setUseManager(boolean useManager)(Code) | | Sets whether managers are used for this table.
Parameters: useManager - whether managers are used for this table. |
|
|