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".
| 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 |
|---|---|
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() |
getSelectQuery, getUpdateQuery, setSelectQuery, setShouldAcquireValueAfterInsert, setShouldSelectBeforeUpdate, setShouldSkipUpdate, setShouldUseTransaction, setUpdateQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransactiongetGeneratedValue, getGeneratedVector, setInitialValueclone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isTable, isUnaryTable, onConnect, onDisconnect, setName, setPreallocationSize, setQualifier, setShouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldUsePreallocation, toStringpublic 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 QuerySequencepublic void onConnect()
onConnect in class QuerySequencepublic void onDisconnect()
onDisconnect in class QuerySequencepublic ValueReadQuery buildSelectQueryForIdentity(java.lang.String seqName, java.lang.Integer size)