public class RepositoryDefinitionHibernateDao extends BambooHibernateObjectWithOidDao<RepositoryDataEntity> implements RepositoryDefinitionDao
Constructor and Description |
---|
RepositoryDefinitionHibernateDao(TransactionAndHibernateTemplate bambooTransactionHibernateTemplate) |
findByOid
countAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findByOid
countAll, countWithRestriction, deleteAll, findAll, findById, merge, saveAll
public RepositoryDefinitionHibernateDao(TransactionAndHibernateTemplate bambooTransactionHibernateTemplate)
@Nullable public RepositoryDataEntityImpl findById(long id)
findById
in interface RepositoryDefinitionDao
@NotNull public Collection<? extends RepositoryDataEntity> findAll()
findAll
in interface RepositoryDefinitionDao
@NotNull public Collection<? extends RepositoryDataEntity> findAll(int firstResult, int maxResults)
findAll
in interface RepositoryDefinitionDao
@NotNull public Collection<? extends RepositoryDataEntity> findAllByParent(@Nullable Long parentId, int firstResult, int maxResults)
findAllByParent
in interface RepositoryDefinitionDao
public long countAll()
countAll
in interface RepositoryDefinitionDao
public long countAllByParent(@Nullable Long parentId)
countAllByParent
in interface RepositoryDefinitionDao
public long countRepositoriesByPluginKey(@NotNull String pluginKey)
@NotNull public List<RepositoryDataEntity> findRepositoriesByPluginKey(@NotNull String pluginKey)
findRepositoriesByPluginKey
in interface RepositoryDefinitionDao
@NotNull public List<RepositoryDataEntity> findRepositoriesByPluginKey(@NotNull String pluginKey, int firstResult, int maxResults)
@NotNull public List<RepositoryDataEntity> getGlobalRepositoryDefinitions()
getGlobalRepositoryDefinitions
in interface RepositoryDefinitionDao
@NotNull public Collection<RepositoryDataEntity> getPrivateRepositoryDefinitionsByPlan(Plan plan)
getPrivateRepositoryDefinitionsByPlan
in interface RepositoryDefinitionDao
public void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
removeRepositoryIfUnused
in interface RepositoryDefinitionDao
public void delete(@NotNull RepositoryDataEntity repositoryDataEntity)
BambooObjectDao
delete
in interface BambooObjectDao<RepositoryDataEntity>
delete
in class BambooHibernateObjectDao<RepositoryDataEntity>
repositoryDataEntity
- entity to be removedpublic void save(@NotNull RepositoryDataEntity repositoryDataEntity)
BambooObjectDao
EntityObject
this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate()
if the object has not been savedsave
in interface BambooObjectDao<RepositoryDataEntity>
save
in class BambooHibernateObjectDao<RepositoryDataEntity>
repositoryDataEntity
- entity to be savedpublic void removeUnusedRepositories()
removeUnusedRepositories
in interface RepositoryDefinitionDao
@NotNull public Set<Long> findAllRepositoryIds()
findAllRepositoryIds
in interface RepositoryDefinitionDao
@Nullable public BambooEntityOid getMaxRepositoryOid(int serverKey)
RepositoryDefinitionDao
BambooEntityOid
that's currently in use of BambooEntityType.REPOSITORY
type, with
the given server key.
Returns null if no OIDs are in use of this type with the given server key.getMaxRepositoryOid
in interface RepositoryDefinitionDao
@Nullable public RepositoryDataEntity findLinkedRepositoryByName(@NotNull String name)
RepositoryDefinitionDao
findLinkedRepositoryByName
in interface RepositoryDefinitionDao
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.