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.BambooHibernateObjectDao<ChainStage>
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
ConstructorsConstructorDescriptionChainStageHibernateDao(@NotNull BambooClusterSettings bambooClusterSettings) -
Method Summary
Modifier and TypeMethodDescriptionlonglong@Nullable BambooEntityOidgetMaxStageOid(int serverKey) Returns the maxBambooEntityOidthat's currently in use ofBambooEntityType.STAGEtype, with the given server key.protected @NotNull Optional<VersioningSupplement<Plan>> voidmarkForDeletion(@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, incrementRootVersion, save, saveAllMethods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, executeCountQuery, findAll, findAll, findById, mergeMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
ChainStageHibernateDao
@Inject public ChainStageHibernateDao(@NotNull @NotNull BambooClusterSettings bambooClusterSettings)
-
-
Method Details
-
getRootVersioningSupplement
- Overrides:
getRootVersioningSupplementin classBambooHibernateVersionAwareObjectDao<ChainStage,Plan>
-
getChainStagesMarkedForDeletion
- Specified by:
getChainStagesMarkedForDeletionin interfaceChainStageDao- Returns:
- all
ChainStages that are marked as deleted
-
getChainStageCount
public long getChainStageCount()- Specified by:
getChainStageCountin interfaceChainStageDao- Returns:
- the total number of ChainStages (Stages) that exist on the bamboo instance
-
getManualChainStageCount
public long getManualChainStageCount()- Specified by:
getManualChainStageCountin interfaceChainStageDao- Returns:
- the total number of ChainStages (Stages) that exist on the bamboo instance that are marked as manual
-
getMaxStageOid
Description copied from interface:ChainStageDaoReturns the maxBambooEntityOidthat's currently in use ofBambooEntityType.STAGEtype, with the given server key. Returns null if no OIDs are in use of this type with the given server key.- Specified by:
getMaxStageOidin interfaceChainStageDao
-
markForDeletion
Description copied from interface:ChainStageDaoMarks the stage for deletion in the underlying store.- Specified by:
markForDeletionin interfaceChainStageDao- Parameters:
chainStage- the stage to mark for deletion
-