|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.sequencing.Sequence org.eclipse.persistence.sequencing.StandardSequence
public abstract class StandardSequence
Purpose: An abstract class providing default sequence behavior.
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.sequencing.Sequence |
---|
depth, initialValue, isCustomQualifier, name, platform, qualifier, shouldAlwaysOverrideExistingValue, size |
Constructor Summary | |
---|---|
StandardSequence()
|
|
StandardSequence(java.lang.String name)
|
|
StandardSequence(java.lang.String name,
int size)
|
|
StandardSequence(java.lang.String name,
int size,
int initialValue)
|
Method Summary | |
---|---|
protected java.util.Vector |
createVector(java.lang.Number sequence,
java.lang.String seqName,
int size)
INTERNAL: given sequence = 10, size = 5 will create Vector (6,7,8,9,10) |
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. |
void |
onConnect()
INTERNAL: This method is called when Sequencing object is created. |
void |
onDisconnect()
INTERNAL: This method is called when Sequencing object is destroyed. |
void |
setInitialValue(int initialValue)
|
abstract boolean |
shouldAcquireValueAfterInsert()
INTERNAL: Indicates whether sequencing value should be acquired after INSERT. |
abstract boolean |
shouldUseTransaction()
INTERNAL: Indicates whether TopLink should internally call beginTransaction() before getGeneratedValue/Vector, and commitTransaction after. |
protected abstract java.lang.Number |
updateAndSelectSequence(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession writeSession,
java.lang.String seqName,
int size)
|
Methods inherited from class org.eclipse.persistence.sequencing.Sequence |
---|
clone, equalNameAndSize, equals, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isNative, 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 |
Constructor Detail |
---|
public StandardSequence()
public StandardSequence(java.lang.String name)
public StandardSequence(java.lang.String name, int size)
public StandardSequence(java.lang.String name, int size, int initialValue)
Method Detail |
---|
public void onConnect()
Sequence
onConnect
in class Sequence
public void onDisconnect()
Sequence
onDisconnect
in class Sequence
protected abstract java.lang.Number updateAndSelectSequence(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, java.lang.String seqName, int size)
public abstract boolean shouldAcquireValueAfterInsert()
Sequence
shouldAcquireValueAfterInsert
in class Sequence
public abstract boolean shouldUseTransaction()
Sequence
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)
Sequence
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)
Sequence
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 java.util.Vector createVector(java.lang.Number sequence, java.lang.String seqName, int size)
seqName
- String is sequencing number field namesize
- int size of Vector to create.public void setInitialValue(int initialValue)
setInitialValue
in class Sequence
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |