Purpose: Reference to the default sequence.
Description This sequence can be used to provide a sequence using the session's default sequencing mechanism but override the pre-allocation size.
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | DefaultSequence(String name, int size)
Create a new sequence with the name and sequence pre-allocation size. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides org. |
| public Sequence | |
| 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 int | |
| public int | |
| public int | hashCode()
Overrides org. |
| public boolean | |
| public boolean | isConnected()
Overrides org. |
| public void | onConnect()
Implements abstract org. |
| public void | onDisconnect()
Implements abstract org. |
| public void | setQualifier(String qualifier)
Overrides org. |
| public boolean | shouldAcquireValueAfterInsert()
Implements abstract org. |
| public boolean | shouldAlwaysOverrideExistingValue(String seqName)
Overrides org. |
| public boolean | shouldUsePreallocation()
Overrides org. |
| public boolean | shouldUseTransaction()
Implements abstract org. |
| DefaultSequence | back to summary |
|---|---|
| public DefaultSequence() | |
| DefaultSequence | back to summary |
|---|---|
| public DefaultSequence(String name) Create a new sequence with the name. | |
| DefaultSequence | back to summary |
|---|---|
| public DefaultSequence(String name, int size) Create a new sequence with the name and sequence pre-allocation size. | |
| DefaultSequence | back to summary |
|---|---|
| public DefaultSequence(String name, int size, int initialValue) | |
| 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. | |
| getDefaultSequence | back to summary |
|---|---|
| public Sequence getDefaultSequence() INTERNAL: Return the platform's default sequence. | |
| getGeneratedValue | back to summary |
|---|---|
| public Object getGeneratedValue(Accessor accessor, AbstractSession writeSession, String seqName) Implements abstract 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. 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).
| |
| getInitialValue | back to summary |
|---|---|
| public int getInitialValue() Overrides org.
| |
| getPreallocationSize | back to summary |
|---|---|
| public int getPreallocationSize() Overrides org.
| |
| 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
| |
| hasPreallocationSize | back to summary |
|---|---|
| public boolean hasPreallocationSize() | |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Overrides org. PUBLIC: Indicates that Sequence is connected.
| |
| onConnect | back to summary |
|---|---|
| public void onConnect() Implements abstract org. INTERNAL: This method is called when Sequencing object is created. It's a chance to do initialization.
| |
| onDisconnect | back to summary |
|---|---|
| public void onDisconnect() Implements abstract org. INTERNAL: This method is called when Sequencing object is destroyed.. It's a chance to do deinitialization.
| |
| setQualifier | back to summary |
|---|---|
| public void setQualifier(String qualifier) Overrides org. INTERNAL: Ignored, getDefaultSequence().getQualifier() used instead.
| |
| shouldAcquireValueAfterInsert | back to summary |
|---|---|
| public boolean shouldAcquireValueAfterInsert() Implements abstract 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.
| |
| shouldAlwaysOverrideExistingValue | back to summary |
|---|---|
| public boolean shouldAlwaysOverrideExistingValue(String seqName) Overrides org. INTERNAL: Indicates whether the existing pk value should always be overridden by the sequence.
| |
| shouldUsePreallocation | back to summary |
|---|---|
| public boolean shouldUsePreallocation() Overrides org. INTERNAL: Indicates whether several sequencing values should be acquired at a time and be kept by TopLink. This in only possible in case sequencing numbers should be acquired before insert (shouldAcquireValueAfterInsert()==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 boolean shouldUseTransaction() Implements abstract org. INTERNAL: Indicates whether EclipseLink should internally call beginTransaction() before getGeneratedValue/Vector, and commitTransaction after. In default implementation, it is true for table sequencing and false for native sequencing.
| |