Package com.atlassian.bamboo.labels
Class LabelHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence.BambooHibernateObjectDao
com.atlassian.bamboo.labels.LabelHibernateDao
- All Implemented Interfaces:
bucket.core.persistence.ObjectDao,LabelDao,BambooObjectDao,org.springframework.beans.factory.InitializingBean
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable LabelfindLabelByNameAndNamespace(String name, String namespace) @Nullable LabellingfindLabellingByBuild(Label label, ImmutablePlan plan) @Nullable LabellingfindLabellingByBuild(String name, String namespace, ImmutablePlan plan) @Nullable LabellingfindLabellingByProject(Label label, Project project) @Nullable LabellingfindLabellingByResultsSummary(Label label, ResultsSummary resultsSummary) @Nullable LabellingfindLabellingByResultsSummary(String name, String namespace, ResultsSummary buildResultsSummary) findLabellingByUser(String userName) findLabels(ImmutablePlan plan) findLabels(Project project) @NotNull List<LabelCount>findLabels(String namespace, int maxResults) @NotNull List<LabelCount>findLabels(String namespace, int maxResults, Plan plan) @NotNull List<LabelCount>findLabels(String namespace, int maxResults, Project project) findLabelsByNameAndNamespace(List<String> names, String namespace) Find any labels that match the names in the specic namespacefindPlanLabels(String namespace) Finds labels that are *only* plan level labellings matching the namespace.findPlanLabels(String namespace, @NotNull PlanIdentifier plan) Finds labels that are *only* plan level labellings matching the namespace and associated with a plan.@NotNull List<ResultsSummary>findResultsSummaryByNameAndNamespace(String name, String namespace) getResultSummaryLabelNames(@NotNull ResultsSummary resultsSummary) Get names of labels related to result summarylonggetUsageCountForLabel(Label label) voidRemoves the labelling from the persistent layervoidvoidsaveLabelling(@NotNull Labelling labelling) Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
findAll, findAllSorted, findById, findById, refresh, remove, replicate, save, saveRaw, updateModificationDataMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findByIdMethods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
-
Constructor Details
-
LabelHibernateDao
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClassin interfacebucket.core.persistence.ObjectDao
-
findLabelByNameAndNamespace
- Specified by:
findLabelByNameAndNamespacein interfaceLabelDao
-
findLabelsByNameAndNamespace
@NotNull public @NotNull List<Label> findLabelsByNameAndNamespace(List<String> names, String namespace) Description copied from interface:LabelDaoFind any labels that match the names in the specic namespace- Specified by:
findLabelsByNameAndNamespacein interfaceLabelDao- Returns:
-
findLabellingByResultsSummary
@Nullable public @Nullable Labelling findLabellingByResultsSummary(Label label, ResultsSummary resultsSummary) - Specified by:
findLabellingByResultsSummaryin interfaceLabelDao
-
findLabellingByResultsSummary
@Nullable public @Nullable Labelling findLabellingByResultsSummary(String name, String namespace, ResultsSummary buildResultsSummary) - Specified by:
findLabellingByResultsSummaryin interfaceLabelDao
-
findLabellingByBuild
- Specified by:
findLabellingByBuildin interfaceLabelDao
-
findLabellingByBuild
@Nullable public @Nullable Labelling findLabellingByBuild(String name, String namespace, ImmutablePlan plan) - Specified by:
findLabellingByBuildin interfaceLabelDao
-
findLabellingByProject
- Specified by:
findLabellingByProjectin interfaceLabelDao
-
getUsageCountForLabel
- Specified by:
getUsageCountForLabelin interfaceLabelDao
-
findResultsSummaryByNameAndNamespace
@NotNull public @NotNull List<ResultsSummary> findResultsSummaryByNameAndNamespace(String name, String namespace) - Specified by:
findResultsSummaryByNameAndNamespacein interfaceLabelDao
-
findLabels
- Specified by:
findLabelsin interfaceLabelDao
-
findPlanLabels
Description copied from interface:LabelDaoFinds labels that are *only* plan level labellings matching the namespace. No duplicates in the returned set (obviously)- Specified by:
findPlanLabelsin interfaceLabelDao- Parameters:
namespace- label namespace- Returns:
- set of labels
-
findPlanLabels
@NotNull public @NotNull Set<Label> findPlanLabels(String namespace, @NotNull @NotNull PlanIdentifier plan) Description copied from interface:LabelDaoFinds labels that are *only* plan level labellings matching the namespace and associated with a plan. No duplicates in the returned set (obviously)- Specified by:
findPlanLabelsin interfaceLabelDao- Parameters:
namespace- label namespaceplan- plan to filter labels with- Returns:
- set of labels
-
findLabels
- Specified by:
findLabelsin interfaceLabelDao
-
findLabels
@NotNull public @NotNull List<LabelCount> findLabels(String namespace, int maxResults, Project project) - Specified by:
findLabelsin interfaceLabelDao
-
findLabels
- Specified by:
findLabelsin interfaceLabelDao
-
findLabels
- Specified by:
findLabelsin interfaceLabelDao
-
findLabellingByUser
- Specified by:
findLabellingByUserin interfaceLabelDao
-
saveLabel
-
saveLabelling
- Specified by:
saveLabellingin interfaceLabelDao
-
remove
Description copied from interface:LabelDaoRemoves the labelling from the persistent layer -
getResultSummaryLabelNames
@NotNull public @NotNull Set<String> getResultSummaryLabelNames(@NotNull @NotNull ResultsSummary resultsSummary) Description copied from interface:LabelDaoGet names of labels related to result summary- Specified by:
getResultSummaryLabelNamesin interfaceLabelDao- Parameters:
resultsSummary- result summary- Returns:
- set of unique label names
-