EclipseLink 1.2.0, build 'v20091016-r5565' API Reference

org.eclipse.persistence.sequencing
Class TableSequence

java.lang.Object
  extended by org.eclipse.persistence.sequencing.Sequence
      extended by org.eclipse.persistence.sequencing.StandardSequence
          extended by org.eclipse.persistence.sequencing.QuerySequence
              extended by org.eclipse.persistence.sequencing.TableSequence
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TableSequence
extends QuerySequence

Purpose: Defines sequencing through using a SEQUENCE table.

Description This is the default sequencing mechanism. A table defaulting to SEQUENCE is used to generate unique ids. The table has a name field (SEQ_NAME) storing each sequences name, and a counter (SEQ_COUNT) storing the last sequence id generated. There will be a row in the table for each sequence object.

See Also:
Serialized Form

Field Summary
protected  java.lang.String counterFieldName
          Hold the name of the column in the sequence table which specifies the sequence numeric value
static java.lang.String defaultTableName
          Default sequence table name
protected  java.lang.String nameFieldName
          Hold the name of the column in the sequence table which specifies the sequence name
protected  org.eclipse.persistence.internal.helper.DatabaseTable table
          Hold the database table
 
Fields inherited from class org.eclipse.persistence.sequencing.QuerySequence
selectQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, updateQuery, wasSelectQueryCreated, wasUpdateQueryCreated
 
Fields inherited from class org.eclipse.persistence.sequencing.Sequence
depth, initialValue, isCustomQualifier, name, platform, qualifier, size
 
Constructor Summary
TableSequence()
           
TableSequence(java.lang.String name)
          Create a new sequence with the name.
TableSequence(java.lang.String name, int size)
          Create a new sequence with the name and sequence pre-allocation size.
TableSequence(java.lang.String name, int size, int initialValue)
           
TableSequence(java.lang.String name, int size, java.lang.String tableName)
           
TableSequence(java.lang.String name, int size, java.lang.String tableName, java.lang.String nameFieldName, java.lang.String counterFieldName)
           
TableSequence(java.lang.String name, java.lang.String tableName)
          Create a new sequence with the name, and the sequence table name.
TableSequence(java.lang.String name, java.lang.String tableName, java.lang.String nameFieldName, java.lang.String counterFieldName)
          Create a new sequence with the name, and the sequence table information.
 
Method Summary
protected  ValueReadQuery buildSelectQuery()
          INTERNAL:
protected  DataModifyQuery buildUpdateQuery()
          INTERNAL:
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCounterFieldName()
           
 java.lang.String getNameFieldName()
           
 java.lang.String getQualifiedTableName()
           
 org.eclipse.persistence.internal.helper.DatabaseTable getTable()
           
 java.lang.String getTableName()
           
 boolean isTable()
           
 void setCounterFieldName(java.lang.String name)
           
 void setNameFieldName(java.lang.String name)
           
 void setTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
           
 void setTableName(java.lang.String name)
           
 
Methods inherited from class org.eclipse.persistence.sequencing.QuerySequence
buildSelectQuery, buildUpdateQuery, createArguments, getSelectQuery, getUpdateQuery, onConnect, onDisconnect, select, setSelectQuery, setShouldAcquireValueAfterInsert, setShouldSelectBeforeUpdate, setShouldSkipUpdate, setShouldUseTransaction, setUpdateQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, update, updateAndSelectSequence
 
Methods inherited from class org.eclipse.persistence.sequencing.StandardSequence
createVector, getGeneratedValue, getGeneratedVector, setInitialValue
 
Methods inherited from class org.eclipse.persistence.sequencing.Sequence
clone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isNative, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setName, setPreallocationSize, setQualifier, shouldUsePreallocation, verifyPlatform
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultTableName

public static final java.lang.String defaultTableName
Default sequence table name

See Also:
Constant Field Values

table

protected org.eclipse.persistence.internal.helper.DatabaseTable table
Hold the database table


counterFieldName

protected java.lang.String counterFieldName
Hold the name of the column in the sequence table which specifies the sequence numeric value


nameFieldName

protected java.lang.String nameFieldName
Hold the name of the column in the sequence table which specifies the sequence name

Constructor Detail

TableSequence

public TableSequence()

TableSequence

public TableSequence(java.lang.String name)
Create a new sequence with the name.


TableSequence

public TableSequence(java.lang.String name,
                     int size)
Create a new sequence with the name and sequence pre-allocation size.


TableSequence

public TableSequence(java.lang.String name,
                     int size,
                     int initialValue)

TableSequence

public TableSequence(java.lang.String name,
                     java.lang.String tableName)
Create a new sequence with the name, and the sequence table name.


TableSequence

public TableSequence(java.lang.String name,
                     java.lang.String tableName,
                     java.lang.String nameFieldName,
                     java.lang.String counterFieldName)
Create a new sequence with the name, and the sequence table information.


TableSequence

public TableSequence(java.lang.String name,
                     int size,
                     java.lang.String tableName)

TableSequence

public TableSequence(java.lang.String name,
                     int size,
                     java.lang.String tableName,
                     java.lang.String nameFieldName,
                     java.lang.String counterFieldName)
Method Detail

isTable

public boolean isTable()
Overrides:
isTable in class Sequence

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class QuerySequence

getCounterFieldName

public java.lang.String getCounterFieldName()

setCounterFieldName

public void setCounterFieldName(java.lang.String name)

getNameFieldName

public java.lang.String getNameFieldName()

setNameFieldName

public void setNameFieldName(java.lang.String name)

getTable

public org.eclipse.persistence.internal.helper.DatabaseTable getTable()

getTableName

public java.lang.String getTableName()

getQualifiedTableName

public java.lang.String getQualifiedTableName()

setTable

public void setTable(org.eclipse.persistence.internal.helper.DatabaseTable table)

setTableName

public void setTableName(java.lang.String name)

buildSelectQuery

protected ValueReadQuery buildSelectQuery()
Description copied from class: QuerySequence
INTERNAL:

Overrides:
buildSelectQuery in class QuerySequence

buildUpdateQuery

protected DataModifyQuery buildUpdateQuery()
Description copied from class: QuerySequence
INTERNAL:

Overrides:
buildUpdateQuery in class QuerySequence

EclipseLink 1.2.0, build 'v20091016-r5565' API Reference