public class NativeSequence extends QuerySequence
Purpose: Define a database's native sequencing mechanism.
Description Many databases have built in support for sequencing. This can be a SEQUENCE object such as in Oracle, or a auto-incrementing column such as the IDENTITY field in Sybase. For an auto-incrementing column the preallocation size is always 1. For a SEQUENCE object the preallocation size must match the SEQUENCE objects "increment by".
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
shouldUseIdentityIfPlatformSupports
true indicates that identity should be used - if the platform supports identity.
|
selectQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, updateQuery, wasSelectQueryCreated, wasUpdateQueryCreateddepth, initialValue, isCustomQualifier, name, platform, qualifier, shouldAlwaysOverrideExistingValue, size| Constructor and Description |
|---|
NativeSequence() |
NativeSequence(boolean shouldUseIdentityIfPlatformSupports) |
NativeSequence(java.lang.String name)
Create a new sequence with the name.
|
NativeSequence(java.lang.String name,
boolean shouldUseIdentityIfPlatformSupports) |
NativeSequence(java.lang.String name,
int size)
Create a new sequence with the name and sequence pre-allocation size.
|
NativeSequence(java.lang.String name,
int size,
boolean shouldUseIdentityIfPlatformSupports) |
NativeSequence(java.lang.String name,
int size,
int initialValue) |
NativeSequence(java.lang.String name,
int size,
int initialValue,
boolean shouldUseIdentityIfPlatformSupports) |
| Modifier and Type | Method and Description |
|---|---|
protected ValueReadQuery |
buildSelectQuery()
INTERNAL:
|
protected ValueReadQuery |
buildSelectQuery(java.lang.String seqName,
java.lang.Integer size)
INTERNAL:
|
ValueReadQuery |
buildSelectQueryForIdentity(java.lang.String seqName,
java.lang.Integer size)
INTERNAL:
Returns query used to read back the value generated by Identity.
|
boolean |
equals(java.lang.Object obj) |
boolean |
isNative() |
void |
onConnect()
INTERNAL:
|
void |
onDisconnect()
INTERNAL:
|
void |
setShouldUseIdentityIfPlatformSupports(boolean shouldUseIdentityIfPlatformSupports) |
boolean |
shouldUseIdentityIfPlatformSupports() |
buildUpdateQuery, buildUpdateQuery, createArguments, getSelectQuery, getUpdateQuery, select, setSelectQuery, setShouldAcquireValueAfterInsert, setShouldSelectBeforeUpdate, setShouldSkipUpdate, setShouldUseTransaction, setUpdateQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, update, updateAndSelectSequencecreateVector, getGeneratedValue, getGeneratedVector, setInitialValueclone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isTable, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setName, setPreallocationSize, setQualifier, setShouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldUsePreallocation, toString, verifyPlatformprotected boolean shouldUseIdentityIfPlatformSupports
public NativeSequence()
public NativeSequence(boolean shouldUseIdentityIfPlatformSupports)
public NativeSequence(java.lang.String name)
public NativeSequence(java.lang.String name,
boolean shouldUseIdentityIfPlatformSupports)
public NativeSequence(java.lang.String name,
int size)
public NativeSequence(java.lang.String name,
int size,
boolean shouldUseIdentityIfPlatformSupports)
public NativeSequence(java.lang.String name,
int size,
int initialValue)
public NativeSequence(java.lang.String name,
int size,
int initialValue,
boolean shouldUseIdentityIfPlatformSupports)
public void setShouldUseIdentityIfPlatformSupports(boolean shouldUseIdentityIfPlatformSupports)
public boolean shouldUseIdentityIfPlatformSupports()
public boolean equals(java.lang.Object obj)
equals in class QuerySequenceprotected ValueReadQuery buildSelectQuery()
buildSelectQuery in class QuerySequenceprotected ValueReadQuery buildSelectQuery(java.lang.String seqName, java.lang.Integer size)
buildSelectQuery in class QuerySequencepublic void onConnect()
onConnect in class QuerySequencepublic void onDisconnect()
onDisconnect in class QuerySequencepublic ValueReadQuery buildSelectQueryForIdentity(java.lang.String seqName, java.lang.Integer size)