|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.kernel.DelegatingSeq
public class DelegatingSeq
Delegating sequence that can also perform exception translation for use in facades.
Field Summary |
---|
Fields inherited from interface org.apache.openjpa.kernel.Seq |
---|
TYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL |
Constructor Summary | |
---|---|
DelegatingSeq(Seq seq)
Constructor; supply delegate. |
|
DelegatingSeq(Seq seq,
RuntimeExceptionTranslator trans)
Constructor; supply delegate and exception translator. |
Method Summary | |
---|---|
void |
allocate(int additional,
StoreContext ctx,
ClassMetaData meta)
Allocate additional values efficiently. |
void |
close()
Free resources used by this sequence. |
Object |
current(StoreContext ctx,
ClassMetaData meta)
Return the current value of the sequence, or null if not available. |
boolean |
equals(Object other)
|
Seq |
getDelegate()
Return the direct delegate. |
Seq |
getInnermostDelegate()
Return the native delegate. |
int |
hashCode()
|
Object |
next(StoreContext ctx,
ClassMetaData meta)
Return the next value in the sequence. |
void |
setType(int type)
Set the type of sequence. |
protected RuntimeException |
translate(RuntimeException re)
Translate the OpenJPA exception. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingSeq(Seq seq)
public DelegatingSeq(Seq seq, RuntimeExceptionTranslator trans)
Method Detail |
---|
public Seq getDelegate()
public Seq getInnermostDelegate()
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
protected RuntimeException translate(RuntimeException re)
public void setType(int type)
Seq
setType
in interface Seq
public Object next(StoreContext ctx, ClassMetaData meta)
Seq
next
in interface Seq
ctx
- the current contextmeta
- if this is a datastore identity sequence, the
persistent class the identity value is for; else nullpublic Object current(StoreContext ctx, ClassMetaData meta)
Seq
current
in interface Seq
ctx
- the current contextmeta
- if this is a datastore identity sequence, the
persistent class the identity value is for; else nullpublic void allocate(int additional, StoreContext ctx, ClassMetaData meta)
Seq
allocate
in interface Seq
ctx
- the current contextmeta
- if this is a datastore identity sequence, the
persistent class the identity value is for; else nullpublic void close()
Seq
close
in interface Seq
close
in interface Closeable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |