Package org.apache.openjpa.kernel
Class DelegatingSeq
java.lang.Object
org.apache.openjpa.kernel.DelegatingSeq
Delegating sequence that can also perform exception translation for use
in facades.
- Author:
- Abe White
-
Field Summary
Fields inherited from interface org.apache.openjpa.kernel.Seq
TYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL
-
Constructor Summary
ConstructorDescriptionDelegatingSeq
(Seq seq) Constructor; supply delegate.DelegatingSeq
(Seq seq, RuntimeExceptionTranslator trans) Constructor; supply delegate and exception translator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(int additional, StoreContext ctx, ClassMetaData meta) Allocate additional values efficiently.void
close()
Free resources used by this sequence.current
(StoreContext ctx, ClassMetaData meta) Return the current value of the sequence, or null if not available.boolean
Return the direct delegate.Return the native delegate.int
hashCode()
next
(StoreContext ctx, ClassMetaData meta) Return the next value in the sequence.void
setType
(int type) Set the type of sequence.protected RuntimeException
Translate the OpenJPA exception.
-
Constructor Details
-
DelegatingSeq
Constructor; supply delegate. -
DelegatingSeq
Constructor; supply delegate and exception translator.
-
-
Method Details
-
getDelegate
Return the direct delegate. -
getInnermostDelegate
Return the native delegate. -
hashCode
public int hashCode() -
equals
-
translate
Translate the OpenJPA exception. -
setType
public void setType(int type) Description copied from interface:Seq
Set the type of sequence. -
next
Description copied from interface:Seq
Return the next value in the sequence. -
current
Description copied from interface:Seq
Return the current value of the sequence, or null if not available. -
allocate
Description copied from interface:Seq
Allocate additional values efficiently. -
close
public void close()Description copied from interface:Seq
Free resources used by this sequence.
-