org.castor.ddlgen.schemaobject

Class PrimaryKey

Implemented Interfaces:
SchemaObject
Known Direct Subclasses:
Db2PrimaryKey, DefaultPrimaryKey, HsqlPrimaryKey, MssqlPrimaryKey, PointBasePrimaryKey

public abstract class PrimaryKey
extends AbstractSchemaObject

Abstract base class for all primary keys.
Version:
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Authors:
Le Duc Bao
Ralf Joachim
Since:
1.1

Field Summary

Fields inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject

HASHFACTOR

Method Summary

void
addField(Field field)
Add given field to list of primary key fields.
boolean
equals(Object other)
protected void
fieldNames(DDLWriter writer)
Concatenate all field names delimited by field delimiter and whitespace.
Field
getField(int index)
Get primary key field at given index.
int
getFieldCount()
Get number of primary key fields.
Table
getTable()
Get table the primary key is used for.
int
hashCode()
void
setTable(Table table)
Set table the primary key is used for.
void
toDropDDL(DDLWriter writer)

Methods inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject

equals, getConfiguration, getName, setConfiguration, setName

Method Details

addField

public final void addField(Field field)
Add given field to list of primary key fields.
Parameters:
field - Field to add to list of primary key fields.

equals

public final boolean equals(Object other)

fieldNames

protected final void fieldNames(DDLWriter writer)
Concatenate all field names delimited by field delimiter and whitespace.
Parameters:
writer - DDLWriter to write schema objects to.

getField

public final Field getField(int index)
Get primary key field at given index.
Parameters:
index - Index of primary key field to return.
Returns:
Primary key field at given index.

getFieldCount

public final int getFieldCount()
Get number of primary key fields.
Returns:
Number of primary key fields.

getTable

public final Table getTable()
Get table the primary key is used for.
Returns:
Table the primary key is used for.

hashCode

public final int hashCode()

setTable

public final void setTable(Table table)
Set table the primary key is used for.
Parameters:
table - Table the primary key is used for.

toDropDDL

public final void toDropDDL(DDLWriter writer)
Specified by:
toDropDDL in interface SchemaObject

Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com