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
Internal OpenJPA sequence interface.
- Author:
- Abe White
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(int additional, StoreContext ctx, ClassMetaData cls) Allocate additional values efficiently.void
close()
Free resources used by this sequence.current
(StoreContext ctx, ClassMetaData cls) Return the current value of the sequence, or null if not available.next
(StoreContext ctx, ClassMetaData cls) Return the next value in the sequence.void
setType
(int type) Set the type of sequence.
-
Field Details
-
TYPE_DEFAULT
static final int TYPE_DEFAULT- See Also:
-
TYPE_NONTRANSACTIONAL
static final int TYPE_NONTRANSACTIONAL- See Also:
-
TYPE_TRANSACTIONAL
static final int TYPE_TRANSACTIONAL- See Also:
-
TYPE_CONTIGUOUS
static final int TYPE_CONTIGUOUS- See Also:
-
-
Method Details
-
setType
void setType(int type) Set the type of sequence. -
next
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
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
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
-
close
void close()Free resources used by this sequence.
-