public class HibernateSequenceDAO extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements SequenceDAO
SequenceDAO
. Sequences are
implemented ad Generics whose type is 'sequence' and subtype is the sequence
name.Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
String |
TYPE |
Constructor and Description |
---|
HibernateSequenceDAO() |
Modifier and Type | Method and Description |
---|---|
List<Generic> |
findByName(String name)
Finds all sequences whose name starts with the passed name
|
long |
getCurrentValue(String sequence)
Gets the current value
|
GenericDAO |
getGenericDao() |
long |
next(String sequence)
Returns the next value of the sequence
|
void |
reset(String sequence,
long value)
Initializes the sequence value
|
void |
setGenericDao(GenericDAO genericDao) |
public final String TYPE
protected static org.slf4j.Logger log
public GenericDAO getGenericDao()
public void setGenericDao(GenericDAO genericDao)
public void reset(String sequence, long value)
SequenceDAO
reset
in interface SequenceDAO
sequence
- The sequence namevalue
- The initial valuepublic long next(String sequence)
SequenceDAO
next
in interface SequenceDAO
sequence
- The sequence namepublic long getCurrentValue(String sequence)
SequenceDAO
getCurrentValue
in interface SequenceDAO
public List<Generic> findByName(String name)
SequenceDAO
findByName
in interface SequenceDAO
Copyright © 2008-2014 Logical Objects. All Rights Reserved.