Package com.atlassian.bamboo.chains
Class ChainStageHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<T>
com.atlassian.bamboo.persistence3.BambooHibernateVersionAwareObjectDao<ChainStage,Plan>
com.atlassian.bamboo.chains.ChainStageHibernateDao
- All Implemented Interfaces:
ChainStageDao
,BambooObjectDao<ChainStage>
,org.springframework.beans.factory.InitializingBean
public class ChainStageHibernateDao
extends BambooHibernateVersionAwareObjectDao<ChainStage,Plan>
implements ChainStageDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
ConstructorDescriptionChainStageHibernateDao
(@NotNull BambooClusterSettings bambooClusterSettings) -
Method Summary
Modifier and TypeMethodDescriptionlong
long
@Nullable BambooEntityOid
getMaxStageOid
(int serverKey) Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.STAGE
type, with the given server key.protected @NotNull Optional<VersioningSupplement<Plan>>
void
markForDeletion
(@NotNull ImmutableChainStage chainStage) Marks the stage for deletion in the underlying store.Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateVersionAwareObjectDao
delete, deleteAll, getMainVersioningSupplement, incrementMainVersion, incrementMainVersion, incrementRootVersion, incrementRootVersion, save, saveAll
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, executeCountQuery, findAll, findById, merge
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
Constructor Details
-
ChainStageHibernateDao
@Inject public ChainStageHibernateDao(@NotNull @NotNull BambooClusterSettings bambooClusterSettings)
-
-
Method Details
-
getRootVersioningSupplement
- Overrides:
getRootVersioningSupplement
in classBambooHibernateVersionAwareObjectDao<ChainStage,
Plan>
-
getChainStagesMarkedForDeletion
- Specified by:
getChainStagesMarkedForDeletion
in interfaceChainStageDao
- Returns:
- all
ChainStage
s that are marked as deleted
-
getChainStageCount
public long getChainStageCount()- Specified by:
getChainStageCount
in interfaceChainStageDao
- Returns:
- the total number of ChainStages (Stages) that exist on the bamboo instance
-
getManualChainStageCount
public long getManualChainStageCount()- Specified by:
getManualChainStageCount
in interfaceChainStageDao
- Returns:
- the total number of ChainStages (Stages) that exist on the bamboo instance that are marked as manual
-
getMaxStageOid
Description copied from interface:ChainStageDao
Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.STAGE
type, with the given server key. Returns null if no OIDs are in use of this type with the given server key.- Specified by:
getMaxStageOid
in interfaceChainStageDao
-
markForDeletion
Description copied from interface:ChainStageDao
Marks the stage for deletion in the underlying store.- Specified by:
markForDeletion
in interfaceChainStageDao
- Parameters:
chainStage
- the stage to mark for deletion
-