public class IdGeneratorDaoImpl extends org.springframework.orm.hibernate5.support.HibernateDaoSupport implements IdGeneratorDao
Constructor and Description |
---|
IdGeneratorDaoImpl() |
Modifier and Type | Method and Description |
---|---|
List<IdGenerator> |
findAll()
Get all generators id.
|
com.google.common.collect.Range<Long> |
nextIdRange(BambooEntityType entityType)
Reserve new range of ids for given entity
|
void |
resetId(BambooEntityOid lastOid)
Reset forward next id value in generator for given entity.
|
void |
saveNextId(String name,
long nextId)
Saves next id value for given name.
|
@NotNull public com.google.common.collect.Range<Long> nextIdRange(@NotNull BambooEntityType entityType)
IdGeneratorDao
nextIdRange
in interface IdGeneratorDao
entityType
- entity typepublic void resetId(@NotNull BambooEntityOid lastOid)
IdGeneratorDao
resetId
in interface IdGeneratorDao
lastOid
- current biggest oid; next id generator for it's type will be updated@NotNull public List<IdGenerator> findAll()
IdGeneratorDao
findAll
in interface IdGeneratorDao
public void saveNextId(String name, long nextId)
IdGeneratorDao
saveNextId
in interface IdGeneratorDao
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.