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
-
-
Constructor Summary
Constructors Constructor Description ChainStageHibernateDao(@NotNull BambooClusterSettings bambooClusterSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getChainStageCount()
@NotNull com.google.common.collect.Multimap<PlanKey,Long>
getChainStagesMarkedForDeletion()
long
getManualChainStageCount()
@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>>
getRootVersioningSupplement()
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 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 Detail
-
ChainStageHibernateDao
@Inject public ChainStageHibernateDao(@NotNull @NotNull BambooClusterSettings bambooClusterSettings)
-
-
Method Detail
-
getRootVersioningSupplement
@NotNull protected @NotNull Optional<VersioningSupplement<Plan>> getRootVersioningSupplement()
- Overrides:
getRootVersioningSupplement
in classBambooHibernateVersionAwareObjectDao<ChainStage,Plan>
-
getChainStagesMarkedForDeletion
@NotNull public @NotNull com.google.common.collect.Multimap<PlanKey,Long> 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
@Nullable public @Nullable BambooEntityOid getMaxStageOid(int serverKey)
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
public void markForDeletion(@NotNull @NotNull ImmutableChainStage chainStage)
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
-
-