|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.ddlgen.schemaobject.AbstractSchemaObject
org.castor.ddlgen.schemaobject.Table
public abstract class Table
Abstract base class of all table implementations.
Field Summary |
---|
Fields inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject |
---|
HASHFACTOR |
Constructor Summary | |
---|---|
Table()
|
Method Summary | |
---|---|
void |
addField(Field field)
Add given field to list of fields. |
void |
addForeignKey(ForeignKey foreignKey)
Add given foreign key to list of foreign keys. |
void |
addIndex(Index index)
Add given index to list of indices. |
boolean |
equals(java.lang.Object other)
|
protected void |
fields(DDLWriter writer)
Concatenate all fields names delimited by line separator. |
Field |
getField(int index)
Get field at given index. |
Field |
getField(java.lang.String name)
Get field with given name. |
int |
getFieldCount()
Get number of fields. |
ForeignKey |
getForeignKey(int index)
Get foreign key at given index. |
int |
getForeignKeyCount()
Get number of foreign keys. |
Index |
getIndex(int index)
Get index at given index. |
int |
getIndexCount()
Get number of indices. |
KeyGenerator |
getKeyGenerator()
Get key generator used for identities of this table. |
PrimaryKey |
getPrimaryKey()
Get primary key with identities of this table. |
Schema |
getSchema()
Get schema this table belongs to. |
int |
hashCode()
|
void |
merge(Table table)
Check if given table can be merged with this one. |
void |
setKeyGenerator(KeyGenerator keyGenerator)
Set key generator used for identities of this table. |
void |
setPrimaryKey(PrimaryKey primaryKey)
Set primary key with identities of this table. |
void |
setSchema(Schema schema)
Set schema this table belongs to. |
Methods inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject |
---|
equals, getConfiguration, getName, setConfiguration, setName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.castor.ddlgen.schemaobject.SchemaObject |
---|
toCreateDDL, toDropDDL |
Constructor Detail |
---|
public Table()
Method Detail |
---|
public final void addIndex(Index index)
index
- Index to add to list of indices.public final int getIndexCount()
public final Index getIndex(int index)
index
- Index of index to return.
public final void addForeignKey(ForeignKey foreignKey)
foreignKey
- Foreign key to add to list of foreign keys.public final int getForeignKeyCount()
public final ForeignKey getForeignKey(int index)
index
- Index of foreign key to return.
public final void addField(Field field)
field
- Field to add to list of fields.public final int getFieldCount()
public final Field getField(int index)
index
- Index of field to return.
public final Field getField(java.lang.String name)
name
- Name of field to return.
public final void setKeyGenerator(KeyGenerator keyGenerator)
keyGenerator
- Key generator used for identities of this table.public final KeyGenerator getKeyGenerator()
public final void setPrimaryKey(PrimaryKey primaryKey)
primaryKey
- Primary key with identities of this table.public final PrimaryKey getPrimaryKey()
public final void setSchema(Schema schema)
schema
- Schema this table belongs to.public final Schema getSchema()
protected final void fields(DDLWriter writer) throws GeneratorException
writer
- DDLWriter to write schema objects to.
GeneratorException
- If generation of the script failed or is not supported.public final void merge(Table table) throws GeneratorException
table
- Table to check if it is able to be merged.
GeneratorException
- If tables cannot be merged.public final boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |