org.hibernate.metamodel.relational
Class AbstractTableSpecification

java.lang.Object
  extended by org.hibernate.metamodel.relational.AbstractTableSpecification
All Implemented Interfaces:
Loggable, TableSpecification, ValueContainer
Direct Known Subclasses:
InLineView, Table

public abstract class AbstractTableSpecification
extends Object
implements TableSpecification

Convenience base class for implementing the ValueContainer contract centralizing commonality between modeling tables, views and inline views.


Constructor Summary
AbstractTableSpecification()
           
 
Method Summary
 ForeignKey createForeignKey(TableSpecification targetTable, String name)
           
 Tuple createTuple(String name)
          Factory method for creating a Column associated with this container.
 Iterable<ForeignKey> getForeignKeys()
           
 PrimaryKey getPrimaryKey()
          Get the primary key definition for this table spec.
 int getTableNumber()
          Get the table number.
 Column locateOrCreateColumn(String name)
          Factory method for creating a Column associated with this container.
 DerivedValue locateOrCreateDerivedValue(String fragment)
          Factory method for creating a DerivedValue associated with this container.
 Iterable<SimpleValue> values()
          Obtain an iterator over this containers current set of value definitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.metamodel.relational.TableSpecification
addCheckConstraint, addComment, getCheckConstraints, getComments, getIndexes, getOrCreateIndex, getOrCreateUniqueKey, getQualifiedName, getSchema, getUniqueKeys
 
Methods inherited from interface org.hibernate.metamodel.relational.ValueContainer
getLoggableValueQualifier
 
Methods inherited from interface org.hibernate.metamodel.relational.Loggable
toLoggableString
 

Constructor Detail

AbstractTableSpecification

public AbstractTableSpecification()
Method Detail

getTableNumber

public int getTableNumber()
Description copied from interface: TableSpecification
Get the table number.

Specified by:
getTableNumber in interface TableSpecification
Returns:
the table number.

values

public Iterable<SimpleValue> values()
Description copied from interface: ValueContainer
Obtain an iterator over this containers current set of value definitions.

Specified by:
values in interface ValueContainer
Returns:
Iterator over value definitions.

locateOrCreateColumn

public Column locateOrCreateColumn(String name)
Description copied from interface: TableSpecification
Factory method for creating a Column associated with this container.

Specified by:
locateOrCreateColumn in interface TableSpecification
Parameters:
name - The column name
Returns:
The generated column

locateOrCreateDerivedValue

public DerivedValue locateOrCreateDerivedValue(String fragment)
Description copied from interface: TableSpecification
Factory method for creating a DerivedValue associated with this container.

Specified by:
locateOrCreateDerivedValue in interface TableSpecification
Parameters:
fragment - The value expression
Returns:
The generated value.

createTuple

public Tuple createTuple(String name)
Description copied from interface: TableSpecification
Factory method for creating a Column associated with this container.

Specified by:
createTuple in interface TableSpecification
Parameters:
name - The column name
Returns:
The generated column

getForeignKeys

public Iterable<ForeignKey> getForeignKeys()
Specified by:
getForeignKeys in interface TableSpecification

createForeignKey

public ForeignKey createForeignKey(TableSpecification targetTable,
                                   String name)
Specified by:
createForeignKey in interface TableSpecification

getPrimaryKey

public PrimaryKey getPrimaryKey()
Description copied from interface: TableSpecification
Get the primary key definition for this table spec.

Specified by:
getPrimaryKey in interface TableSpecification
Returns:
The PK definition.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.