de.mguennewig.pobjects.metadata
Class Sequence

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Sequence
All Implemented Interfaces:
SqlEntity

public class Sequence
extends java.lang.Object
implements SqlEntity

Provides the parameters needed to maintain an automatically generated primary key for the table rows.

Id's are generated from sequences and are never reused. That is, for a given table an id value identifies exactly one row, even past the lifetime of the row.

Multiple class definitions may use the same sequence.

Author:
Michael Günnewig
See Also:
IdField

Constructor Summary
Sequence(java.lang.String schemaName)
          Creates a new Sequence.
 
Method Summary
 boolean equals(java.lang.Object o)
          
 Module getModule()
          Returns the module in which the SQL entity occurs.
 java.lang.String getSchemaName()
          Returns the name of the sequence used in the database schema.
 int hashCode()
          
 void setModule(Module module)
          Sets the owning module of this SQL entity.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sequence

public Sequence(java.lang.String schemaName)
Creates a new Sequence.

Method Detail

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

getModule

public final Module getModule()
Returns the module in which the SQL entity occurs.

Specified by:
getModule in interface SqlEntity

setModule

public void setModule(Module module)
Sets the owning module of this SQL entity.

Specified by:
setModule in interface SqlEntity

getSchemaName

public final java.lang.String getSchemaName()
Returns the name of the sequence used in the database schema.

Specified by:
getSchemaName in interface SqlEntity