|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.torque.engine.database.model.Table
Data about a table used in an application.
Field Summary | |
private boolean |
abstractValue
Deprecated. |
private java.lang.String |
alias
Deprecated. |
private java.lang.String |
baseClass
Deprecated. |
private java.lang.String |
basePeer
Deprecated. |
private java.util.List |
columnList
Deprecated. |
private java.util.Hashtable |
columnsByJavaName
Deprecated. |
private java.util.Hashtable |
columnsByName
Deprecated. |
private boolean |
containsForeignPK
Deprecated. |
private java.util.List |
foreignKeys
Deprecated. |
private java.util.List |
foreignTableNames
Deprecated. |
private java.lang.String |
idMethod
Deprecated. |
private java.util.List |
idMethodParameters
Deprecated. |
private java.util.List |
indices
Deprecated. |
private Column |
inheritanceColumn
Deprecated. |
private java.lang.String |
javaName
Deprecated. |
private java.lang.String |
name
Deprecated. |
private java.util.List |
referrers
Deprecated. |
private boolean |
skipSql
Deprecated. |
private Database |
tableParent
Deprecated. |
private java.util.List |
unices
Deprecated. |
Fields inherited from interface org.apache.turbine.util.db.map.IDMethod |
AUTO_INCREMENT, AUTOINCREMENT, ID_BROKER, IDBROKERTABLE, NATIVE, NO_ID_METHOD, SEQUENCE |
Constructor Summary | |
Table()
Deprecated. Default Constructor |
|
Table(java.lang.String name)
Deprecated. Constructs a table object with a name |
Method Summary | |
Column |
addColumn(org.xml.sax.AttributeList attrib)
Deprecated. A utility function to create a new column from attrib and add it to this table. |
void |
addColumn(Column col)
Deprecated. Adds a new column to the column vector and set the parent table of the column to the current table |
ForeignKey |
addForeignKey(org.xml.sax.AttributeList attrib)
Deprecated. A utility function to create a new foreign key from attrib and add it to this table. |
void |
addForeignKey(ForeignKey fk)
Deprecated. Adds a new FK to the FK vector and set the parent table of the column to the current table |
IdMethodParameter |
addIdMethodParameter(org.xml.sax.AttributeList attrib)
Deprecated. A utility function to create a new id method parameter from attrib and add it to this table. |
void |
addIdMethodParameter(IdMethodParameter imp)
Deprecated. Adds a new ID method parameter to the list and sets the parent table of the column associated with the supplied parameter to this table. |
Index |
addIndex(org.xml.sax.AttributeList attrib)
Deprecated. A utility function to create a new index from attrib and add it to this table. |
void |
addIndex(Index index)
Deprecated. Adds a new index to the index vector and set the parent table of the column to the current table |
void |
addReferrer(ForeignKey fk)
Deprecated. Adds the foreign key from another table that refers to this table. |
Unique |
addUnique(org.xml.sax.AttributeList attrib)
Deprecated. A utility function to create a new Unique from attrib and add it to this table. |
void |
addUnique(Unique unique)
Deprecated. Adds a new Unique to the Unique vector and set the parent table of the column to the current table |
boolean |
containsColumn(Column col)
Deprecated. Returns true if the table contains a spesified column |
boolean |
containsColumn(java.lang.String name)
Deprecated. Returns true if the table contains a spesified column |
java.util.List |
getAdditionalIndicesForPrimaryKey()
Deprecated. Returns a list of CSV strings for a primary key composed of multiple parts to create extra indices for. |
java.lang.String |
getAlias()
Deprecated. JavaName of om object this entry references. |
java.lang.String |
getBaseClass()
Deprecated. Get the value of baseClass. |
java.lang.String |
getBasePeer()
Deprecated. Get the value of basePeer. |
Column |
getChildrenColumn()
Deprecated. |
java.util.List |
getChildrenNames()
Deprecated. Get the objects that can be created from this table. |
Column |
getColumn(java.lang.String name)
Deprecated. Returns a specified column. |
Column |
getColumnByJavaName(java.lang.String javaName)
Deprecated. Returns a specified column. |
Column[] |
getColumns()
Deprecated. Returns an Array containing all the columns in the table |
boolean |
getContainsForeignPK()
Deprecated. Determine if this table contains a foreign PK |
Database |
getDatabase()
Deprecated. Get the parent of the table |
ForeignKey |
getForeignKey(java.lang.String col)
Deprecated. Return the first foreign key that includes col in it's list of local columns. |
ForeignKey[] |
getForeignKeys()
Deprecated. Returns an Array containing all the FKs in the table |
java.util.List |
getForeignTableNames()
Deprecated. A list of tables referenced by foreign keys in this table |
java.lang.String |
getIdMethod()
Deprecated. Get the method for generating pk's |
java.util.List |
getIdMethodParameters()
Deprecated. Returns a Collection of parameters relevant for the chosen id generation method. |
Index[] |
getIndices()
Deprecated. Returns an Array containing all the FKs in the table |
java.lang.String |
getJavaName()
Deprecated. Get name to use in Java sources |
java.lang.String |
getName()
Deprecated. Get the name of the Table |
int |
getNumColumns()
Deprecated. Utility method to get the number of columns in this table |
java.util.List |
getPrimaryKey()
Deprecated. Returns the collection of Columns which make up the single primary key for this table. |
java.util.ArrayList |
getPrimaryKeys()
Deprecated. Use getPrimaryKey() instead. |
java.util.List |
getReferrers()
Deprecated. Get list of references to this table. |
java.lang.String |
getSequenceName()
Deprecated. A name to use for creating a sequence if one is not specified. |
Unique[] |
getUnices()
Deprecated. Returns an Array containing all the UKs in the table |
boolean |
hasPrimaryKey()
Deprecated. Determine whether this table has a primary key. |
boolean |
isAbstract()
Deprecated. When a table is abstract, it marks the business object class that is generated as being abstract. |
boolean |
isAlias()
Deprecated. Is this table specified in the schema or is there just a foreign key reference to it. |
boolean |
isSkipSql()
Deprecated. Skip generating sql for this table (in the event it should not be created from scratch). |
void |
loadFromXML(org.xml.sax.AttributeList attrib,
java.lang.String defaultIdMethod)
Deprecated. Load the table object from an xml tag. |
private java.lang.String |
printList(java.util.List list)
Deprecated. Returns the elements of the list, separated by commas. |
java.lang.String |
printPrimaryKey()
Deprecated. Returns all parts of the primary key, separated by commas. |
java.lang.String |
printPrimaryKeys()
Deprecated. Use printPrimaryKey() instead. |
void |
setAbstract(boolean v)
Deprecated. When a table is abstract, it marks the business object class that is generated as being abstract. |
void |
setAlias(java.lang.String v)
Deprecated. Set whether this table specified in the schema or is there just a foreign key reference to it. |
void |
setBaseClass(java.lang.String v)
Deprecated. Set the value of baseClass. |
void |
setBasePeer(java.lang.String v)
Deprecated. Set the value of basePeer. |
void |
setContainsForeignPK(boolean b)
Deprecated. Set whether this table contains a foreign PK |
void |
setDatabase(Database parent)
Deprecated. Set the parent of the table |
void |
setIdMethod(java.lang.String idMethod)
Deprecated. Set the method for generating pk's |
void |
setJavaName(java.lang.String javaName)
Deprecated. Set name to use in Java sources |
void |
setName(java.lang.String newName)
Deprecated. Set the name of the Table |
void |
setSkipSql(boolean v)
Deprecated. Set whether this table should have its creation sql generated. |
java.lang.String |
toString()
Deprecated. Returns a XML representation of this table. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.List columnList
private java.util.List foreignKeys
private java.util.List indices
private java.util.List unices
private java.util.List idMethodParameters
private java.lang.String name
private java.lang.String javaName
private java.lang.String idMethod
private Database tableParent
private java.util.List referrers
private java.util.List foreignTableNames
private boolean containsForeignPK
private Column inheritanceColumn
private boolean skipSql
private boolean abstractValue
private java.lang.String alias
private java.lang.String baseClass
private java.lang.String basePeer
private java.util.Hashtable columnsByName
private java.util.Hashtable columnsByJavaName
Constructor Detail |
public Table()
public Table(java.lang.String name)
Method Detail |
public void loadFromXML(org.xml.sax.AttributeList attrib, java.lang.String defaultIdMethod)
public java.lang.String getBaseClass()
public void setBaseClass(java.lang.String v)
v
- Value to assign to baseClass.public java.lang.String getBasePeer()
public void setBasePeer(java.lang.String v)
v
- Value to assign to basePeer.public Column addColumn(org.xml.sax.AttributeList attrib)
public void addColumn(Column col)
public ForeignKey addForeignKey(org.xml.sax.AttributeList attrib)
public Column getChildrenColumn()
public java.util.List getChildrenNames()
public void addReferrer(ForeignKey fk)
public java.util.List getReferrers()
public void setContainsForeignPK(boolean b)
public boolean getContainsForeignPK()
public java.util.List getForeignTableNames()
public void addForeignKey(ForeignKey fk)
public IdMethodParameter addIdMethodParameter(org.xml.sax.AttributeList attrib)
public void addIdMethodParameter(IdMethodParameter imp)
imp
- The column to add as an ID method parameter.public void addIndex(Index index)
public Index addIndex(org.xml.sax.AttributeList attrib)
public void addUnique(Unique unique)
public Unique addUnique(org.xml.sax.AttributeList attrib)
public java.lang.String getName()
public void setName(java.lang.String newName)
public java.lang.String getJavaName()
public void setJavaName(java.lang.String javaName)
public java.lang.String getIdMethod()
public void setIdMethod(java.lang.String idMethod)
public boolean isSkipSql()
public void setSkipSql(boolean v)
v
- Value to assign to skipSql.public java.lang.String getAlias()
public boolean isAlias()
public void setAlias(java.lang.String v)
v
- Value to assign to alias.public boolean isAbstract()
public void setAbstract(boolean v)
v
- Value to assign to abstractValue.public Column[] getColumns()
public int getNumColumns()
public ForeignKey[] getForeignKeys()
public java.util.List getIdMethodParameters()
public java.lang.String getSequenceName()
public Index[] getIndices()
public Unique[] getUnices()
public Column getColumn(java.lang.String name)
public Column getColumnByJavaName(java.lang.String javaName)
public ForeignKey getForeignKey(java.lang.String col)
public boolean containsColumn(Column col)
public boolean containsColumn(java.lang.String name)
public void setDatabase(Database parent)
public Database getDatabase()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List getPrimaryKey()
public final java.util.ArrayList getPrimaryKeys()
public boolean hasPrimaryKey()
public java.lang.String printPrimaryKey()
public final java.lang.String printPrimaryKeys()
private java.lang.String printList(java.util.List list)
public java.util.List getAdditionalIndicesForPrimaryKey()
PRIMARY KEY (FOO_ID, BAR_ID)
,
FOO_ID
must be the first element used in
the where
clause of the SQL query used against
this table for the primary key index to be used. This feature
could cause problems under MySQL with heavily indexed tables,
as MySQL currently only supports 16 indices per table (i.e. it
might cause too many indices to be created).
See the manual for a better description of this issue.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |