Skip navigation links
org.eclipse.persistence.sequencing
Class NativeSequence
java.lang.Object
org.eclipse.persistence.sequencing.Sequence
org.eclipse.persistence.sequencing.StandardSequence
org.eclipse.persistence.sequencing.QuerySequence
org.eclipse.persistence.sequencing.NativeSequence
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
-
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".
- See Also:
- Serialized Form
Constructor Summary |
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)
|
Methods inherited from class org.eclipse.persistence.sequencing.QuerySequence |
buildUpdateQuery, buildUpdateQuery, createArguments, getSelectQuery, getUpdateQuery, select, setSelectQuery, setShouldAcquireValueAfterInsert, setShouldSelectBeforeUpdate, setShouldSkipUpdate, setShouldUseTransaction, setUpdateQuery, shouldAcquireValueAfterInsert, shouldSelectBeforeUpdate, shouldSkipUpdate, shouldUseTransaction, update, updateAndSelectSequence |
Methods inherited from class org.eclipse.persistence.sequencing.Sequence |
clone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isTable, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setName, setPreallocationSize, setQualifier, setShouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldUsePreallocation, toString, verifyPlatform |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
shouldUseIdentityIfPlatformSupports
protected boolean shouldUseIdentityIfPlatformSupports
- true indicates that identity should be used - if the platform supports identity. false indicates that sequence objects should be used - if the platform supports sequence objects.
NativeSequence
public NativeSequence()
NativeSequence
public NativeSequence(boolean shouldUseIdentityIfPlatformSupports)
NativeSequence
public NativeSequence(java.lang.String name)
- Create a new sequence with the name.
NativeSequence
public NativeSequence(java.lang.String name,
boolean shouldUseIdentityIfPlatformSupports)
NativeSequence
public NativeSequence(java.lang.String name,
int size)
- Create a new sequence with the name and sequence pre-allocation size.
NativeSequence
public NativeSequence(java.lang.String name,
int size,
boolean shouldUseIdentityIfPlatformSupports)
NativeSequence
public NativeSequence(java.lang.String name,
int size,
int initialValue)
NativeSequence
public NativeSequence(java.lang.String name,
int size,
int initialValue,
boolean shouldUseIdentityIfPlatformSupports)
isNative
public boolean isNative()
-
- Overrides:
isNative
in class Sequence
setShouldUseIdentityIfPlatformSupports
public void setShouldUseIdentityIfPlatformSupports(boolean shouldUseIdentityIfPlatformSupports)
shouldUseIdentityIfPlatformSupports
public boolean shouldUseIdentityIfPlatformSupports()
equals
public boolean equals(java.lang.Object obj)
-
- Overrides:
equals
in class QuerySequence
buildSelectQuery
protected ValueReadQuery buildSelectQuery()
- INTERNAL:
-
- Overrides:
buildSelectQuery
in class QuerySequence
buildSelectQuery
protected ValueReadQuery buildSelectQuery(java.lang.String seqName,
java.lang.Integer size)
- INTERNAL:
-
- Overrides:
buildSelectQuery
in class QuerySequence
onConnect
public void onConnect()
- INTERNAL:
-
- Overrides:
onConnect
in class QuerySequence
onDisconnect
public void onDisconnect()
- INTERNAL:
-
- Overrides:
onDisconnect
in class QuerySequence
Skip navigation links