Package org.apache.openjpa.kernel
Interface Seq
-
- All Superinterfaces:
Closeable
- All Known Subinterfaces:
JDBCSeq
- All Known Implementing Classes:
AbstractJDBCSeq,ClassTableJDBCSeq,DelegatingSeq,NativeJDBCSeq,TableJDBCSeq,TimeSeededSeq,UUIDHexSeq,UUIDStringSeq,UUIDType4HexSeq,UUIDType4StringSeq,ValueTableJDBCSeq
public interface Seq extends Closeable
Internal OpenJPA sequence interface.- Author:
- Abe White
-
-
Field Summary
Fields Modifier and Type Field Description static intTYPE_CONTIGUOUSstatic intTYPE_DEFAULTstatic intTYPE_NONTRANSACTIONALstatic intTYPE_TRANSACTIONAL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidallocate(int additional, StoreContext ctx, ClassMetaData cls)Allocate additional values efficiently.voidclose()Free resources used by this sequence.java.lang.Objectcurrent(StoreContext ctx, ClassMetaData cls)Return the current value of the sequence, or null if not available.java.lang.Objectnext(StoreContext ctx, ClassMetaData cls)Return the next value in the sequence.voidsetType(int type)Set the type of sequence.
-
-
-
Field Detail
-
TYPE_DEFAULT
static final int TYPE_DEFAULT
- See Also:
- Constant Field Values
-
TYPE_NONTRANSACTIONAL
static final int TYPE_NONTRANSACTIONAL
- See Also:
- Constant Field Values
-
TYPE_TRANSACTIONAL
static final int TYPE_TRANSACTIONAL
- See Also:
- Constant Field Values
-
TYPE_CONTIGUOUS
static final int TYPE_CONTIGUOUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setType
void setType(int type)
Set the type of sequence.
-
next
java.lang.Object next(StoreContext ctx, ClassMetaData cls)
Return the next value in the sequence.- Parameters:
ctx- the current contextcls- if this is a datastore identity sequence, the persistent class the identity value is for; else null
-
current
java.lang.Object current(StoreContext ctx, ClassMetaData cls)
Return the current value of the sequence, or null if not available.- Parameters:
ctx- the current contextcls- if this is a datastore identity sequence, the persistent class the identity value is for; else null
-
allocate
void allocate(int additional, StoreContext ctx, ClassMetaData cls)Allocate additional values efficiently.- Parameters:
ctx- the current contextcls- if this is a datastore identity sequence, the persistent class the identity value is for; else null
-
-