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
-
-
Constructor Summary
Constructors Constructor Description VcsBranchHibernateDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAll(ImmutableChain chain)
List<BambooVcsBranch>
findByChain(@NotNull ImmutableChain chain)
@Nullable BambooVcsBranch
findByChainAndName(long chainId, @NotNull String branchName)
List<BambooVcsBranch>
findByChainId(long chainId)
Note: the returned VCS branches will not have a chain associated with them.List<BambooVcsBranch>
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>
findWithDetectedDeletionDate()
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 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
-
-
-
-
Method Detail
-
findByChain
public List<BambooVcsBranch> findByChain(@NotNull @NotNull ImmutableChain chain)
- Specified by:
findByChain
in interfaceVcsBranchDao
-
findByChainId
public List<BambooVcsBranch> findByChainId(long chainId)
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
@NotNull public @NotNull List<BambooVcsBranch> 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
public List<BambooVcsBranch> findNotDeletedByChain(@NotNull @NotNull ImmutableChain chain)
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
public void deleteAll(ImmutableChain chain)
- Specified by:
deleteAll
in interfaceVcsBranchDao
-
-