com.jgpruitt.datamodeler.core
Class SchemaBuilder

java.lang.Object
  extended by com.jgpruitt.datamodeler.core.SchemaBuilder

public class SchemaBuilder
extends java.lang.Object

A Fluent Builder class for constructing Schema objects

Author:
John Pruitt
See Also:
Schema

Field Summary
protected  ModelBuilder modelBuilder
           
protected  Schema schema
           
 
Constructor Summary
protected SchemaBuilder(java.lang.String name, ModelBuilder modelBuilder)
          Constructor.
 
Method Summary
 ModelBuilder done()
          Gets the ModelBuilder
 TableBuilder table(java.lang.String name)
          Adds a Table to the Schema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schema

protected final Schema schema

modelBuilder

protected final ModelBuilder modelBuilder
Constructor Detail

SchemaBuilder

protected SchemaBuilder(java.lang.String name,
                        ModelBuilder modelBuilder)
Constructor.

Parameters:
name - The name of the new Schema
modelBuilder - the ModelBuilder of the Model to which the Schema should be added
Method Detail

done

public ModelBuilder done()
Gets the ModelBuilder

Returns:
the ModelBuilder

table

public TableBuilder table(java.lang.String name)
Adds a Table to the Schema

Parameters:
name - the name of the new Table to create
Returns:
a TableBuilder used to create the table