Purpose: An abstract class providing default sequence behavior.
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected Vector | createVector(Number sequence, String
String is sequencing number field name seqName, int int size of Vector to create. size)INTERNAL: given sequence = 10, size = 5 will create Vector (6,7,8,9,10) |
| protected Vector | createVectorAtNextVal(Number sequence, String
String is sequencing number field name seqName, int int size of Vector to create. size)INTERNAL: given sequence = 10, size = 5 will create Vector (10,11,12,13,14) |
| public Object | getGeneratedValue(Accessor
Accessor is a separate sequencing accessor (may be null); accessor, AbstractSession Session is a Session used for writing (either ClientSession or DatabaseSession); writeSession, String String is sequencing number field name seqName)Implements abstract org. |
| public Vector | getGeneratedVector(Accessor
Accessor is a separate sequencing accessor (may be null); accessor, AbstractSession Session is a Session used for writing (either ClientSession or DatabaseSession); writeSession, String String is sequencing number field name seqName, int int number of values to preallocate (output Vector size). size)Implements abstract org. |
| public void | onConnect()
Implements abstract org. |
| public void | onDisconnect()
Implements abstract org. |
| public void | setInitialValue(int initialValue)
Overrides org. |
| public abstract boolean | shouldAcquireValueAfterInsert()
Implements abstract org. |
| public abstract boolean | shouldUseTransaction()
Implements abstract org. |
| protected abstract Number |
| StandardSequence | back to summary |
|---|---|
| protected StandardSequence() | |
| StandardSequence | back to summary |
|---|---|
| protected StandardSequence(String name) | |
| StandardSequence | back to summary |
|---|---|
| protected StandardSequence(String name, int size) | |
| StandardSequence | back to summary |
|---|---|
| protected StandardSequence(String name, int size, int initialValue) | |
| createVector | back to summary |
|---|---|
| protected Vector INTERNAL: given sequence = 10, size = 5 will create Vector (6,7,8,9,10)
| |
| createVectorAtNextVal | back to summary |
|---|---|
| protected Vector INTERNAL: given sequence = 10, size = 5 will create Vector (10,11,12,13,14)
| |
| getGeneratedValue | back to summary |
|---|---|
| public Object getGeneratedValue(Accessor accessor, AbstractSession writeSession, String seqName) Implements abstract org. Doc from org. INTERNAL: Return the newly-generated sequencing value. Used only in case preallocation is not used (shouldUsePreallocation()==false). Accessor may be non-null only in case shouldUseSeparateConnection()==true. Even in this case accessor could be null - if SequencingControl().shouldUseSeparateConnection()==false; Therefore in case shouldUseSeparateConnection()==true, implementation should handle both cases: use a separate connection if provided (accessor != null), or get by without it (accessor == null).
| |
| getGeneratedVector | back to summary |
|---|---|
| public Vector Implements abstract org. Doc from org. INTERNAL: Return a Vector of newly-generated sequencing values. Used only in case preallocation is used (shouldUsePreallocation()==true). Accessor may be non-null only in case shouldUseSeparateConnection()==true. Even in this case accessor could be null - if SequencingControl().shouldUseSeparateConnection()==false; Therefore in case shouldUseSeparateConnection()==true, implementation should handle both cases: use a separate connection if provided (accessor != null), or get by without it (accessor == null).
| |
| onConnect | back to summary |
|---|---|
| public void onConnect() Implements abstract org. Doc from org. INTERNAL: This method is called when Sequencing object is created. If it requires initialization, subclass should override this method.
| |
| onDisconnect | back to summary |
|---|---|
| public void onDisconnect() Implements abstract org. Doc from org. INTERNAL: This method is called when Sequencing object is destroyed. If it requires deinitialization, subclass should override this method.
| |
| setInitialValue | back to summary |
|---|---|
| public void setInitialValue(int initialValue) Overrides org.
| |
| shouldAcquireValueAfterInsert | back to summary |
|---|---|
| public abstract boolean shouldAcquireValueAfterInsert() Implements abstract org. Doc from org. INTERNAL: Indicates whether sequencing value should be acquired after INSERT. Note that preallocation could be used only in case sequencing values should be acquired before insert (this method returns false). In default implementation, it is true for table sequencing and native sequencing on Oracle platform, false for native sequencing on other platforms.
| |
| shouldUseTransaction | back to summary |
|---|---|
| public abstract boolean shouldUseTransaction() Implements abstract org. Doc from org. INTERNAL: Indicates whether TopLink should internally call beginTransaction() before getGeneratedValue/Vector, and commitTransaction after. In default implementation, it is true for table sequencing and false for native sequencing.
| |
| updateAndSelectSequence | back to summary |
|---|---|
| protected abstract Number updateAndSelectSequence(Accessor accessor, AbstractSession writeSession, String seqName, int size) | |