Class IdGeneratorDaoImpl

  • All Implemented Interfaces:
    IdGeneratorDao, org.springframework.beans.factory.InitializingBean

    public class IdGeneratorDaoImpl
    extends org.springframework.orm.hibernate5.support.HibernateDaoSupport
    implements IdGeneratorDao
    • Field Summary

      • Fields inherited from class org.springframework.dao.support.DaoSupport

        logger
    • Constructor Detail

      • IdGeneratorDaoImpl

        public IdGeneratorDaoImpl()
    • Method Detail

      • nextIdRange

        @NotNull
        public @NotNull com.google.common.collect.Range<Long> nextIdRange​(@NotNull
                                                                          @NotNull BambooEntityType entityType)
        Description copied from interface: IdGeneratorDao
        Reserve new range of ids for given entity
        Specified by:
        nextIdRange in interface IdGeneratorDao
        Parameters:
        entityType - entity type
        Returns:
        id range
      • resetId

        public void resetId​(@NotNull
                            @NotNull BambooEntityOid lastOid)
        Description copied from interface: IdGeneratorDao
        Reset forward next id value in generator for given entity. Should be called after some external changes that would generate entities without using generator. New value will be set only if it's bigger than old one.
        Specified by:
        resetId in interface IdGeneratorDao
        Parameters:
        lastOid - current biggest oid; next id generator for it's type will be updated
      • saveNextId

        public void saveNextId​(String name,
                               long nextId)
        Description copied from interface: IdGeneratorDao
        Saves next id value for given name. Used during data import. Avoid using for other reasons.
        Specified by:
        saveNextId in interface IdGeneratorDao