public class DefaultSequence extends Sequence
Purpose: Reference to the default sequence
Modifier and Type | Field and Description |
---|---|
protected Sequence |
defaultSequence |
Constructor and Description |
---|
DefaultSequence() |
DefaultSequence(String name) |
DefaultSequence(String name,
int size) |
DefaultSequence(String name,
int size,
int initialValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Sequence |
getDefaultSequence() |
Object |
getGeneratedValue(Accessor accessor,
AbstractSession writeSession,
String seqName)
INTERNAL:
Return the newly-generated sequencing value.
|
Vector |
getGeneratedVector(Accessor accessor,
AbstractSession writeSession,
String name,
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 |
shouldOverrideExistingValue(String seqName,
Object existingValue)
INTERNAL:
Indicates whether existing attribute value should be overridden.
|
boolean |
shouldUseTransaction()
INTERNAL:
Indicates whether TopLink should internally call beginTransaction() before
getGeneratedValue/Vector, and commitTransaction after.
|
clone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getName, isConnected, onConnect, onDisconnect, setDatasourcePlatform, setInitialValue, setName, setPreallocationSize, shouldOverrideExistingValue, shouldUsePreallocation, verifyPlatform
protected Sequence defaultSequence
public DefaultSequence()
public DefaultSequence(String name)
public DefaultSequence(String name, int size)
public DefaultSequence(String name, int size, int initialValue)
public Sequence getDefaultSequence()
public boolean hasPreallocationSize()
public int getPreallocationSize()
getPreallocationSize
in class Sequence
public int getInitialValue()
getInitialValue
in class Sequence
public boolean shouldAcquireValueAfterInsert()
shouldAcquireValueAfterInsert
in class Sequence
public boolean shouldUseTransaction()
shouldUseTransaction
in class Sequence
public boolean shouldOverrideExistingValue(String seqName, Object existingValue)
shouldOverrideExistingValue
in class Sequence
seqName
- String is sequencing number field nameexistingValue
- Object is a non-null value of PK-mapped attribute.public Object getGeneratedValue(Accessor accessor, AbstractSession writeSession, 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 Vector getGeneratedVector(Accessor accessor, AbstractSession writeSession, String name, 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()
public void onDisconnect()
onDisconnect
in class Sequence
Copyright © 2024. All rights reserved.