public class RepositoryDefinitionHibernateDao extends BambooHibernateObjectWithOidDao<RepositoryDataEntity> implements RepositoryDefinitionDao
| Constructor and Description |
|---|
RepositoryDefinitionHibernateDao(TransactionAndHibernateTemplate bambooTransactionHibernateTemplate) |
| Modifier and Type | Method and Description |
|---|---|
long |
countAll() |
long |
countAllByParent(Long parentId) |
long |
countRepositoriesByPluginKey(String pluginKey) |
long |
countTopLevelGlobalRepositories()
Count global, non-deleted repositories without any parent repository.
|
void |
delete(RepositoryDataEntity repositoryDataEntity)
Removes the given entity from the database
|
Collection<? extends RepositoryDataEntity> |
findAll() |
Collection<? extends RepositoryDataEntity> |
findAll(int firstResult,
int maxResults) |
Collection<? extends RepositoryDataEntity> |
findAllByParent(Long parentId,
int firstResult,
int maxResults) |
Set<Long> |
findAllRepositoryIds() |
RepositoryDataEntityImpl |
findById(long id) |
RepositoryDataEntity |
findLinkedRepositoryByName(String name)
Find a linked repository by name;
|
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) |
List<RepositoryDataEntity> |
getTopLevelGlobalRepositories(int firstResult,
int maxResults)
Return a list of global, non-deleted repositories without any parent repository.
|
void |
markForDeletionByParentId(long parentId)
Mark all direct children of repository with given id for deletion.
|
void |
removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity) |
void |
removeUnusedRepositories() |
void |
save(RepositoryDataEntity repositoryDataEntity)
Saves the given entity.
|
findByOidcountAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge, saveAllgetCacheAwareHibernateTemplatecheckDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindByOidcountAll, countWithRestriction, deleteAll, findAll, findById, merge, saveAllpublic 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 RepositoryDefinitionDaopublic long countAll()
countAll in interface RepositoryDefinitionDaopublic long countAllByParent(@Nullable
Long parentId)
countAllByParent in interface RepositoryDefinitionDaopublic long countTopLevelGlobalRepositories()
RepositoryDefinitionDaocountTopLevelGlobalRepositories in interface RepositoryDefinitionDao@NotNull public List<RepositoryDataEntity> getTopLevelGlobalRepositories(int firstResult, int maxResults)
RepositoryDefinitionDaogetTopLevelGlobalRepositories in interface RepositoryDefinitionDaopublic 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 RepositoryDefinitionDaopublic void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
removeRepositoryIfUnused in interface RepositoryDefinitionDaopublic void delete(@NotNull
RepositoryDataEntity repositoryDataEntity)
BambooObjectDaodelete in interface BambooObjectDao<RepositoryDataEntity>delete in class BambooHibernateObjectDao<RepositoryDataEntity>repositoryDataEntity - entity to be removedpublic void save(@NotNull
RepositoryDataEntity repositoryDataEntity)
BambooObjectDaoEntityObject 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)
RepositoryDefinitionDaoBambooEntityOid 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)
RepositoryDefinitionDaofindLinkedRepositoryByName in interface RepositoryDefinitionDaopublic void markForDeletionByParentId(long parentId)
RepositoryDefinitionDaomarkForDeletionByParentId in interface RepositoryDefinitionDaoCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.