|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.derquinsej.hib3.seq.SequenceDAO
public class SequenceDAO
Data access object for the sequence entity. As it represents a very specific case, it does not follow normal best-practices (interface-based, etc.). WARNING: Transactional sequences are a source of locks and may hurt scalability.
| Constructor Summary | |
|---|---|
SequenceDAO(org.hibernate.SessionFactory sessionFactory)
Initialized the DAO |
|
| Method Summary | |
|---|---|
long |
getCurrentValue(String id)
Gets the current value of a sequence. |
long |
getNextValue(String id)
Gets the next value of a sequence. |
long |
getNextValue(String id,
long initial,
long increment)
Gets the next value of a sequence, creating it if it does not exist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SequenceDAO(org.hibernate.SessionFactory sessionFactory)
sessionFactory - Hibernate Session factory.| Method Detail |
|---|
public long getCurrentValue(String id)
throws SequenceNotFoundException
id - Sequence name.
SequenceNotFoundException - if the sequence is not found.
public long getNextValue(String id)
throws SequenceNotFoundException
id - Sequence name.
SequenceNotFoundException - if the sequence is not found.
public long getNextValue(String id,
long initial,
long increment)
id - Sequence name.initial - Initial value.increment - Increment between values.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||