Package com.atlassian.bamboo.plan.branch
Class VcsBranchHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<BambooVcsBranch>
com.atlassian.bamboo.plan.branch.VcsBranchHibernateDao
- All Implemented Interfaces:
BambooObjectDao<BambooVcsBranch>
,VcsBranchDao
,org.springframework.beans.factory.InitializingBean
public class VcsBranchHibernateDao
extends BambooHibernateObjectDao<BambooVcsBranch>
implements VcsBranchDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteAll
(ImmutableChain chain) findByChain
(@NotNull ImmutableChain chain) @Nullable BambooVcsBranch
findByChainAndName
(long chainId, @NotNull String branchName) findByChainId
(long chainId) Note: the returned VCS branches will not have a chain associated with them.findNotDeletedByChain
(@NotNull ImmutableChain chain) Given a chain, this will return a list ofBambooVcsBranch
of which Bamboo hasn't detected yet that they were deleted in the repository.@NotNull List<BambooVcsBranch>
Retrieve a list ofBambooVcsBranch
for which a deletion has been detected.Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
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
-
VcsBranchHibernateDao
public VcsBranchHibernateDao()
-
-
Method Details
-
findByChain
- Specified by:
findByChain
in interfaceVcsBranchDao
-
findByChainId
Description copied from interface:VcsBranchDao
Note: the returned VCS branches will not have a chain associated with them.- Specified by:
findByChainId
in interfaceVcsBranchDao
-
findByChainAndName
@Nullable public @Nullable BambooVcsBranch findByChainAndName(long chainId, @NotNull @NotNull String branchName) - Specified by:
findByChainAndName
in interfaceVcsBranchDao
-
findWithDetectedDeletionDate
Description copied from interface:VcsBranchDao
Retrieve a list ofBambooVcsBranch
for which a deletion has been detected.- Specified by:
findWithDetectedDeletionDate
in interfaceVcsBranchDao
- Returns:
- a list of
BambooVcsBranch
for which a deletion has been detected
-
findNotDeletedByChain
Description copied from interface:VcsBranchDao
Given a chain, this will return a list ofBambooVcsBranch
of which Bamboo hasn't detected yet that they were deleted in the repository.- Specified by:
findNotDeletedByChain
in interfaceVcsBranchDao
- Parameters:
chain
- the chain for which we want to find VCS branches.- Returns:
- a list of
BambooVcsBranch
which still exists in the repository according to Bamboo
-
deleteAll
- Specified by:
deleteAll
in interfaceVcsBranchDao
-