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 QuerySequence | delegateSequence
Allow sequencing to be delegated to another sequence if native sequencing is not supported. |
| protected boolean | shouldUseGeneratedKeysIfPlatformSupports
true indicates that identity is used and generatedKeys should be used - if the platform supports generatedKeys false indicates that identity is used and generatedKeys should not be used - if the platform does not support generatedKeys |
| protected boolean | shouldUseIdentityIfPlatformSupports
true indicates that identity should be used - if the platform supports identity. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | NativeSequence(String name, int size)
Create a new sequence with the name and sequence pre-allocation size. |
| public | |
| public | |
| public | NativeSequence(String name, int size, int initialValue, boolean shouldUseIdentityIfPlatformSupports)
|
| Modifier and Type | Method and Description |
|---|---|
| protected ValueReadQuery | buildSelectQuery()
Overrides org. |
| protected ValueReadQuery | buildSelectQuery(String seqName, Integer size)
Overrides org. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides org. |
| public QuerySequence | |
| public boolean | |
| public int | hashCode()
Overrides org. |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public boolean |
| delegateSequence | back to summary |
|---|---|
| protected QuerySequence delegateSequence Allow sequencing to be delegated to another sequence if native sequencing is not supported. | |
| shouldUseGeneratedKeysIfPlatformSupports | back to summary |
|---|---|
| protected boolean shouldUseGeneratedKeysIfPlatformSupports true indicates that identity is used and generatedKeys should be used - if the platform supports generatedKeys false indicates that identity is used and generatedKeys should not be used - if the platform does not support generatedKeys | |
| shouldUseIdentityIfPlatformSupports | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| public NativeSequence() | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(boolean shouldUseIdentityIfPlatformSupports) | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(String name) Create a new sequence with the name. | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(String name, boolean shouldUseIdentityIfPlatformSupports) | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(String name, int size) Create a new sequence with the name and sequence pre-allocation size. | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(String name, int size, boolean shouldUseIdentityIfPlatformSupports) | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(String name, int size, int initialValue) | |
| NativeSequence | back to summary |
|---|---|
| public NativeSequence(String name, int size, int initialValue, boolean shouldUseIdentityIfPlatformSupports) | |
| buildSelectQuery | back to summary |
|---|---|
| protected ValueReadQuery buildSelectQuery() Overrides org. INTERNAL:
| |
| buildSelectQuery | back to summary |
|---|---|
| protected ValueReadQuery buildSelectQuery(String seqName, Integer size) Overrides org. INTERNAL:
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDelegateSequence | back to summary |
|---|---|
| public QuerySequence getDelegateSequence() Return the sequence delegate. This is used when the platform does not support the native sequence type. | |
| hasDelegateSequence | back to summary |
|---|---|
| public boolean hasDelegateSequence() Return if the sequence should be replaced by another sequence implementation. This is used when the platform does not support the native sequence type. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isNative | back to summary |
|---|---|
| public boolean isNative() Overrides org.
| |
| onConnect | back to summary |
|---|---|
| public void onConnect() Overrides org. INTERNAL:
| |
| onDisconnect | back to summary |
|---|---|
| public void onDisconnect() Overrides org. INTERNAL:
| |
| setDelegateSequence | back to summary |
|---|---|
| public void setDelegateSequence(QuerySequence delegateSequence) Set the sequence delegate. This is used when the platform does not support the native sequence type. | |
| setShouldUseGeneratedKeysIfPlatformSupports | back to summary |
|---|---|
| public void setShouldUseGeneratedKeysIfPlatformSupports(boolean shouldUseGeneratedKeysIfPlatformSupports) | |
| setShouldUseIdentityIfPlatformSupports | back to summary |
|---|---|
| public void setShouldUseIdentityIfPlatformSupports(boolean shouldUseIdentityIfPlatformSupports) | |
| shouldUseGeneratedKeysIfPlatformSupports | back to summary |
|---|---|
| public boolean shouldUseGeneratedKeysIfPlatformSupports() | |
| shouldUseIdentityIfPlatformSupports | back to summary |
|---|---|
| public boolean shouldUseIdentityIfPlatformSupports() | |