|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sequencing.Sequence
org.eclipse.persistence.sequencing.DefaultSequence
public class DefaultSequence
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.
Field Summary | |
---|---|
protected Sequence |
defaultSequence
|
Fields inherited from class org.eclipse.persistence.sequencing.Sequence |
---|
depth, initialValue, name, platform, size |
Constructor Summary | |
---|---|
DefaultSequence()
|
|
DefaultSequence(java.lang.String name)
Create a new sequence with the name. |
|
DefaultSequence(java.lang.String name,
int size)
Create a new sequence with the name and sequence pre-allocation size. |
|
DefaultSequence(java.lang.String name,
int size,
int initialValue)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
Sequence |
getDefaultSequence()
INTERNAL: Return the platform's default sequence. |
java.lang.Object |
getGeneratedValue(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession writeSession,
java.lang.String seqName)
INTERNAL: Return the newly-generated sequencing value. |
java.util.Vector |
getGeneratedVector(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession writeSession,
java.lang.String seqName,
int size)
INTERNAL: Return a Vector of newly-generated sequencing values. |
int |
getInitialValue()
|
int |
getPreallocationSize()
|
boolean |
hasPreallocationSize()
|
protected void |
onConnect()
INTERNAL: This method is called when Sequencing object is created. |
void |
onDisconnect()
INTERNAL: This method is called when Sequencing object is destroyed.. |
boolean |
shouldAcquireValueAfterInsert()
INTERNAL: Indicates whether sequencing value should be acquired after INSERT. |
boolean |
shouldUseTransaction()
INTERNAL: Indicates whether EclipseLink should internally call beginTransaction() before getGeneratedValue/Vector, and commitTransaction after. |
Methods inherited from class org.eclipse.persistence.sequencing.Sequence |
---|
clone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getName, isConnected, isNative, isTable, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setInitialValue, setName, setPreallocationSize, shouldUsePreallocation, verifyPlatform |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Sequence defaultSequence
Constructor Detail |
---|
public DefaultSequence()
public DefaultSequence(java.lang.String name)
public DefaultSequence(java.lang.String name, int size)
public DefaultSequence(java.lang.String name, int size, int initialValue)
Method Detail |
---|
public Sequence getDefaultSequence()
public boolean hasPreallocationSize()
public int getPreallocationSize()
getPreallocationSize
in class Sequence
public int getInitialValue()
getInitialValue
in class Sequence
public boolean equals(java.lang.Object obj)
equals
in class Sequence
public boolean shouldAcquireValueAfterInsert()
shouldAcquireValueAfterInsert
in class Sequence
public boolean shouldUseTransaction()
shouldUseTransaction
in class Sequence
public java.lang.Object getGeneratedValue(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, java.lang.String seqName)
getGeneratedValue
in class Sequence
accessor
- Accessor is a separate sequencing accessor (may be null);writeSession
- Session is a Session used for writing (either ClientSession or DatabaseSession);seqName
- String is sequencing number field namepublic java.util.Vector getGeneratedVector(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, java.lang.String seqName, int size)
getGeneratedVector
in class Sequence
accessor
- Accessor is a separate sequencing accessor (may be null);writeSession
- Session is a Session used for writing (either ClientSession or DatabaseSession);seqName
- String is sequencing number field namesize
- int number of values to preallocate (output Vector size).protected void onConnect()
onConnect
in class Sequence
public void onDisconnect()
onDisconnect
in class Sequence
|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |