ID_BROKER, NATIVE, NO_ID_METHOD| 构造器和说明 |
|---|
Table()
Default Constructor
|
Table(java.lang.String name)
Constructs a table object with a name
|
| 限定符和类型 | 方法和说明 |
|---|---|
Column |
addColumn(org.xml.sax.Attributes attrib)
A utility function to create a new column from attrib and add it to this
table.
|
void |
addColumn(Column col)
Adds a new column to the column list and set the
parent table of the column to the current table
|
ForeignKey |
addForeignKey(org.xml.sax.Attributes attrib)
A utility function to create a new foreign key
from attrib and add it to this table.
|
void |
addForeignKey(ForeignKey fk)
Adds a new FK to the FK list and set the
parent table of the column to the current table
|
IdMethodParameter |
addIdMethodParameter(org.xml.sax.Attributes attrib)
A utility function to create a new id method parameter
from attrib and add it to this table.
|
void |
addIdMethodParameter(IdMethodParameter imp)
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.Attributes attrib)
A utility function to create a new index
from attrib and add it to this table.
|
void |
addIndex(Index index)
Adds a new index to the index list and set the
parent table of the column to the current table
|
void |
addReferrer(ForeignKey fk)
Adds the foreign key from another table that refers to this table.
|
Unique |
addUnique(org.xml.sax.Attributes attrib)
A utility function to create a new Unique
from attrib and add it to this table.
|
void |
addUnique(Unique unique)
Adds a new Unique to the Unique list and set the
parent table of the column to the current table
|
int |
compareTo(java.lang.Object o) |
boolean |
containsColumn(Column col)
Returns true if the table contains a specified column
|
boolean |
containsColumn(java.lang.String name)
Returns true if the table contains a specified column
|
void |
doFinalInitialization()
A hook for the SAX XML parser to call when this table has
been fully loaded from the XML, and all nested elements have
been processed.
|
boolean |
equals(java.lang.Object table) |
java.lang.String |
getAlias()
JavaName of om object this entry references.
|
java.lang.String |
getBaseClass()
Gets the value of base class for classes produced from this table.
|
java.lang.String |
getBasePeer()
Get the value of basePeer.
|
Column |
getChildrenColumn()
Gets the column that subclasses of the class representing this
table can be produced from.
|
java.util.List |
getChildrenNames()
Get the objects that can be created from this table.
|
Column |
getColumn(java.lang.String name)
Returns a specified column.
|
Column |
getColumnByJavaName(java.lang.String javaName)
Returns a specified column.
|
java.util.List |
getColumns()
Returns a List containing all the columns in the table
|
boolean |
getContainsForeignPK()
Determine if this table contains a foreign PK
|
Database |
getDatabase()
Get the parent of the table
|
java.lang.String |
getDescription()
Get the description for the Table
|
ForeignKey |
getForeignKey(java.lang.String col)
Return the first foreign key that includes col in it's list
of local columns.
|
java.util.List |
getForeignKeys()
Returns a List containing all the FKs in the table
|
java.util.List |
getForeignTableNames()
A list of tables referenced by foreign keys in this table
|
java.lang.String |
getIdMethod()
Get the method for generating pk's
|
java.util.List |
getIdMethodParameters()
Returns a Collection of parameters relevant for the chosen
id generation method.
|
java.util.List |
getIndices()
Returns a List containing all the indices in the table
|
java.lang.String |
getInterface()
Interface which objects for this table will implement
|
java.lang.String |
getJavaName()
Get name to use in Java sources
|
java.lang.String |
getName()
Get the name of the Table
|
int |
getNumColumns()
Utility method to get the number of columns in this table
|
java.lang.String |
getPackage()
Get the value of package.
|
java.util.List |
getPrimaryKey()
Returns the collection of Columns which make up the single primary
key for this table.
|
java.util.List |
getReferrers()
Get list of references to this table.
|
java.lang.String |
getSequenceName()
A name to use for creating a sequence if one is not specified.
|
java.util.List |
getUnices()
Returns a List containing all the UKs in the table
|
boolean |
hasPrimaryKey()
Determine whether this table has a primary key.
|
boolean |
isAbstract()
When a table is abstract, it marks the business object class that is
generated as being abstract.
|
boolean |
isAlias()
Is this table specified in the schema or is there just
a foreign key reference to it.
|
boolean |
isForReferenceOnly()
Flag to determine if code/sql gets created for this table.
|
boolean |
isSkipSql()
Skip generating sql for this table (in the event it should
not be created from scratch).
|
void |
loadFromXML(org.xml.sax.Attributes attrib,
java.lang.String defaultIdMethod)
Load the table object from an xml tag.
|
java.lang.String |
printPrimaryKey()
Returns all parts of the primary key, separated by commas.
|
boolean |
requiresTransactionInPostgres()
Return true if the column requires a transaction in Postgres
|
void |
setAbstract(boolean v)
When a table is abstract, it marks the business object
class that is generated as being abstract.
|
void |
setAlias(java.lang.String v)
Set whether this table specified in the schema or is there just
a foreign key reference to it.
|
void |
setBaseClass(java.lang.String v)
Set the value of baseClass.
|
void |
setBasePeer(java.lang.String v)
Set the value of basePeer.
|
void |
setContainsForeignPK(boolean b)
Set whether this table contains a foreign PK
|
void |
setCorrectGetters(java.lang.Boolean value)
Force all columns to set the correctGetters property.
|
void |
setDatabase(Database parent)
Set the parent of the table
|
void |
setDescription(java.lang.String newDescription)
Set the description for the Table
|
void |
setForReferenceOnly(boolean v)
Flag to determine if code/sql gets created for this table.
|
void |
setIdMethod(java.lang.String idMethod)
Set the method for generating pk's
|
void |
setInterface(java.lang.String v)
Interface which objects for this table will implement
|
void |
setJavaName(java.lang.String javaName)
Set name to use in Java sources
|
void |
setName(java.lang.String newName)
Set the name of the Table
|
void |
setPackage(java.lang.String v)
Set the value of package.
|
void |
setSkipSql(boolean v)
Set whether this table should have its creation sql generated.
|
java.lang.String |
toString()
Returns a XML representation of this table.
|
public Table()
public Table(java.lang.String name)
name - table namepublic void loadFromXML(org.xml.sax.Attributes attrib,
java.lang.String defaultIdMethod)
attrib - xml attributesdefaultIdMethod - defined at db levelpublic boolean equals(java.lang.Object table)
equals 在类中 java.lang.Objectpublic void doFinalInitialization()
A hook for the SAX XML parser to call when this table has been fully loaded from the XML, and all nested elements have been processed.
Performs heavy indexing and naming of elements which weren't provided with a name.
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.Attributes attrib)
attrib - xml attributes for the column to addpublic void addColumn(Column col)
col - the column to addpublic ForeignKey addForeignKey(org.xml.sax.Attributes attrib)
attrib - the xml attributespublic Column getChildrenColumn()
public java.util.List getChildrenNames()
public void addReferrer(ForeignKey fk)
fk - A foreign key refering to this tablepublic java.util.List getReferrers()
public void setContainsForeignPK(boolean b)
b - public boolean getContainsForeignPK()
public java.util.List getForeignTableNames()
public void addForeignKey(ForeignKey fk)
fk - A foreign keypublic boolean requiresTransactionInPostgres()
public IdMethodParameter addIdMethodParameter(org.xml.sax.Attributes 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.Attributes attrib)
public void addUnique(Unique unique)
public Unique addUnique(org.xml.sax.Attributes attrib)
attrib - the xml attributespublic java.lang.String getName()
public void setName(java.lang.String newName)
public java.lang.String getDescription()
public void setDescription(java.lang.String newDescription)
newDescription - description for the Tablepublic 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 java.lang.String getInterface()
public void setInterface(java.lang.String v)
v - Value to assign to interface.public boolean isAbstract()
public abstract class Foo
This helps support class hierarchiespublic void setAbstract(boolean v)
public abstract class Foo
This helps support class hierarchiesv - Value to assign to abstractValue.public java.lang.String getPackage()
public void setPackage(java.lang.String v)
v - Value to assign to package.public java.util.List getColumns()
public int getNumColumns()
public java.util.List getForeignKeys()
public java.util.List getIdMethodParameters()
public java.lang.String getSequenceName()
public java.util.List getIndices()
public java.util.List getUnices()
public Column getColumn(java.lang.String name)
name - name of the columnpublic Column getColumnByJavaName(java.lang.String javaName)
javaName - java name of the columnpublic ForeignKey getForeignKey(java.lang.String col)
col - column name included in the keypublic boolean containsColumn(Column col)
col - the columnpublic boolean containsColumn(java.lang.String name)
name - name of the columnpublic void setDatabase(Database parent)
parent - the parant databasepublic Database getDatabase()
public boolean isForReferenceOnly()
public void setForReferenceOnly(boolean v)
v - Value to assign to forReferenceOnly.public java.lang.String toString()
toString 在类中 java.lang.Objectpublic java.util.List getPrimaryKey()
public boolean hasPrimaryKey()
public java.lang.String printPrimaryKey()
public void setCorrectGetters(java.lang.Boolean value)
correctGetters - The new value of the correctGetters property.public int compareTo(java.lang.Object o)
compareTo 在接口中 java.lang.Comparable