Skip navigation links
oracle.toplink.sequencing
Class Sequence
java.lang.Object
oracle.toplink.sequencing.Sequence
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- DefaultSequence, StandardSequence
- public abstract class Sequence
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
Purpose: Define an interface for sequencing customization.
Description: Customary sequencing behavior could be achieved by implementing this interface and passing the instance to DatabaseSession.getSequencingControl().setValueGenerationPolicy(..). TopLink internally uses the same method to set its default implementation of this interface, which provides native sequencing and table sequencing. Note that the following methods: shouldAcquireValueAfterInsert(); shouldUsePreallocation(); shouldUseSeparateConnection(); shouldUseTransaction(); are called only once - during creation of the sequencing object. Therefore during the lifetime of sequencing object these methods should return the same values as when called for the first time. If this is not true - resetSequencing (call SequencingControl.resetSequencing()).
Responsibilities:
- Define the APIs for customary sequencing.
- See Also:
SequencingControl
, Serialized Form
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sequence
public Sequence()
Sequence
public Sequence(java.lang.String name)
Sequence
public Sequence(java.lang.String name,
int size)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getPreallocationSize
public int getPreallocationSize()
setPreallocationSize
public void setPreallocationSize(int size)
clone
public java.lang.Object clone()
equals
public boolean equals(java.lang.Object obj)
equalNameAndSize
public static boolean equalNameAndSize(Sequence seq1,
Sequence seq2)
getDatasourcePlatform
public Platform getDatasourcePlatform()
isConnected
public boolean isConnected()
- PUBLIC: Indicates that Sequence is connected.
Skip navigation links