addField
public final void addField(Field field)
Add given field to list of fields.
field
- Field to add to list of fields.
addForeignKey
public final void addForeignKey(ForeignKey foreignKey)
Add given foreign key to list of foreign keys.
foreignKey
- Foreign key to add to list of foreign keys.
addIndex
public final void addIndex(Index index)
Add given index to list of indices.
index
- Index to add to list of indices.
equals
public final boolean equals(Object other)
fields
protected final void fields(DDLWriter writer)
throws GeneratorException
Concatenate all fields names delimited by line separator.
writer
- DDLWriter to write schema objects to.
getField
public final Field getField(String name)
Get field with given name.
name
- Name of field to return.
getField
public final Field getField(int index)
Get field at given index.
index
- Index of field to return.
getFieldCount
public final int getFieldCount()
Get number of fields.
getForeignKey
public final ForeignKey getForeignKey(int index)
Get foreign key at given index.
index
- Index of foreign key to return.
- Foreign key at given index.
getForeignKeyCount
public final int getForeignKeyCount()
Get number of foreign keys.
getIndex
public final Index getIndex(int index)
Get index at given index.
index
- Index of index to return.
getIndexCount
public final int getIndexCount()
Get number of indices.
getKeyGenerator
public final KeyGenerator getKeyGenerator()
Get key generator used for identities of this table.
- Key generator used for identities of this table.
getPrimaryKey
public final PrimaryKey getPrimaryKey()
Get primary key with identities of this table.
- Primary key with identities of this table.
getSchema
public final Schema getSchema()
Get schema this table belongs to.
- Schema this table belongs to.
hashCode
public final int hashCode()
merge
public final void merge(Table table)
throws GeneratorException
Check if given table can be merged with this one.
table
- Table to check if it is able to be merged.
setKeyGenerator
public final void setKeyGenerator(KeyGenerator keyGenerator)
Set key generator used for identities of this table.
keyGenerator
- Key generator used for identities of this table.
setPrimaryKey
public final void setPrimaryKey(PrimaryKey primaryKey)
Set primary key with identities of this table.
primaryKey
- Primary key with identities of this table.
setSchema
public final void setSchema(Schema schema)
Set schema this table belongs to.
schema
- Schema this table belongs to.