|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgpruitt.datamodeler.core.ForeignKeyBuilder
public class ForeignKeyBuilder
Fluent Builder class for creating ForeignKeys.
ForeignKey
Field Summary | |
---|---|
protected ForeignKey |
foreignKey
|
protected ModelBuilder |
modelBuilder
|
Constructor Summary | |
---|---|
protected |
ForeignKeyBuilder(java.lang.String name,
ModelBuilder modelBuilder)
Constructor. |
Method Summary | |
---|---|
ForeignKeyBuilder |
comment(java.lang.String comment)
Sets the comment on the ForeignKey |
ForeignKeyBuilder |
constrain(java.lang.String tableName,
java.lang.String... columns)
Sets the constrained Table and Columns |
ModelBuilder |
done()
Gets the ModelBuilder |
ForeignKeyBuilder |
reference(java.lang.String tableName,
java.lang.String... columns)
Sets the referenced Table and Columns |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ForeignKey foreignKey
protected final ModelBuilder modelBuilder
Constructor Detail |
---|
protected ForeignKeyBuilder(java.lang.String name, ModelBuilder modelBuilder)
name
- The name of the ForeignKey to createmodelBuilder
- The ModelBuilder to which the ForeignKeys will be added.ModelBuilder
Method Detail |
---|
public ModelBuilder done()
ModelBuilder
public ForeignKeyBuilder comment(java.lang.String comment)
comment
- The comment describing the ForeignKey
public ForeignKeyBuilder constrain(java.lang.String tableName, java.lang.String... columns)
tableName
- The name of the Table being constrained by this ForeignKeycolumns
- The names of the Columns being constrained by this ForeignKey
public ForeignKeyBuilder reference(java.lang.String tableName, java.lang.String... columns)
tableName
- The name of the Table being referenced by this ForeignKeycolumns
- The names of the Columns being referenced by this ForeignKey
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |