public class SequenceDAO extends Object
| Constructor and Description |
|---|
SequenceDAO(SessionFactory sessionFactory)
Initialized the DAO
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public SequenceDAO(SessionFactory sessionFactory)
sessionFactory - Hibernate Session factory.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.Copyright © 2014. All rights reserved.