public class RepositoryDefinitionHibernateDao extends BambooHibernateObjectDao<RepositoryDataEntity> implements RepositoryDefinitionDao
Constructor and Description |
---|
RepositoryDefinitionHibernateDao() |
Modifier and Type | Method and Description |
---|---|
long |
countAll() |
long |
countRepositoriesByPluginKey(String pluginKey) |
Collection<? extends RepositoryDataEntity> |
findAll() |
Collection<? extends RepositoryDataEntity> |
findAll(int firstResult,
int maxResults) |
Set<Long> |
findAllRepositoryIds() |
RepositoryDataEntityImpl |
findById(long id) |
List<RepositoryDataEntity> |
findRepositoriesByPluginKey(String pluginKey) |
List<RepositoryDataEntity> |
findRepositoriesByPluginKey(String pluginKey,
int firstResult,
int maxResults) |
List<RepositoryDataEntity> |
getGlobalRepositoryDefinitions() |
BambooEntityOid |
getMaxRepositoryOid(int serverKey)
Returns the max
BambooEntityOid that's currently in use of BambooEntityType.REPOSITORY type, with
the given server key. |
Collection<RepositoryDataEntity> |
getPrivateRepositoryDefinitionsByPlan(Plan plan) |
void |
removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity) |
void |
removeUnusedRepositories() |
countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, save, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAll, countWithRestriction, delete, deleteAll, findAll, findById, save, saveAll
@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
public long countAll()
countAll
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 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
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.