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.
Modifier and Type | Field and Description |
---|---|
protected String |
counterFieldName
Hold the name of the column in the sequence table which specifies the sequence numeric value
|
static String |
defaultTableName
Deprecated.
Use an empty string as a default sequence table name instead,
that triggers usage of platform.getDefaultSequenceTableName() when the sequence is connected.
|
protected 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
|
selectQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, updateQuery, wasSelectQueryCreated, wasUpdateQueryCreated
depth, initialValue, isCustomQualifier, name, platform, qualifier, shouldAlwaysOverrideExistingValue, size
Constructor and Description |
---|
TableSequence() |
TableSequence(String name)
Create a new sequence with the name.
|
TableSequence(String name,
int size)
Create a new sequence with the name and sequence pre-allocation size.
|
TableSequence(String name,
int size,
int initialValue) |
TableSequence(String name,
int size,
String tableName) |
TableSequence(String name,
int size,
String tableName,
String nameFieldName,
String counterFieldName) |
TableSequence(String name,
String tableName)
Create a new sequence with the name, and the sequence table name.
|
TableSequence(String name,
String tableName,
String nameFieldName,
String counterFieldName)
Create a new sequence with the name, and the sequence table information.
|
Modifier and Type | Method and Description |
---|---|
protected ValueReadQuery |
buildSelectQuery()
INTERNAL:
|
protected DataModifyQuery |
buildUpdateQuery()
INTERNAL:
|
boolean |
equals(Object obj) |
String |
getCounterFieldName() |
String |
getNameFieldName() |
String |
getQualifiedTableName() |
org.eclipse.persistence.internal.helper.DatabaseTable |
getTable() |
List<IndexDefinition> |
getTableIndexes() |
String |
getTableName() |
int |
hashCode() |
boolean |
isTable() |
void |
onConnect()
INTERNAL:
|
void |
setCounterFieldName(String name) |
void |
setNameFieldName(String name) |
void |
setTable(org.eclipse.persistence.internal.helper.DatabaseTable table) |
void |
setTableName(String name) |
buildSelectQuery, buildUpdateQuery, createArguments, getSelectQuery, getUpdateQuery, onDisconnect, select, setSelectQuery, setShouldAcquireValueAfterInsert, setShouldSelectBeforeUpdate, setShouldSkipUpdate, setShouldUseTransaction, setUpdateQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, update, updateAndSelectSequence
createVector, createVectorAtNextVal, getGeneratedValue, getGeneratedVector, setInitialValue
clone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isNative, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setName, setPreallocationSize, setQualifier, setShouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldUsePreallocation, toString, verifyPlatform
@Deprecated public static final String defaultTableName
protected org.eclipse.persistence.internal.helper.DatabaseTable table
protected String counterFieldName
protected String nameFieldName
public TableSequence()
public TableSequence(String name)
public TableSequence(String name, int size)
public TableSequence(String name, int size, int initialValue)
public TableSequence(String name, String tableName)
public TableSequence(String name, String tableName, String nameFieldName, String counterFieldName)
public boolean equals(Object obj)
equals
in class QuerySequence
public int hashCode()
hashCode
in class QuerySequence
public String getCounterFieldName()
public void setCounterFieldName(String name)
public String getNameFieldName()
public void setNameFieldName(String name)
public org.eclipse.persistence.internal.helper.DatabaseTable getTable()
public List<IndexDefinition> getTableIndexes()
public String getTableName()
public String getQualifiedTableName()
public void setTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
public void setTableName(String name)
public void onConnect()
QuerySequence
onConnect
in class QuerySequence
protected ValueReadQuery buildSelectQuery()
QuerySequence
buildSelectQuery
in class QuerySequence
protected DataModifyQuery buildUpdateQuery()
QuerySequence
buildUpdateQuery
in class QuerySequence
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.