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
-
Method Summary
Modifier and TypeMethodDescription@Nullable Label
findLabelByNameAndNamespace
(String name, String namespace) @Nullable Labelling
findLabellingByBuild
(Label label, ImmutablePlan plan) @Nullable Labelling
findLabellingByBuild
(String name, String namespace, ImmutablePlan plan) @Nullable Labelling
findLabellingByProject
(Label label, Project project) @Nullable Labelling
findLabellingByResultsSummary
(Label label, ResultsSummary resultsSummary) @Nullable Labelling
findLabellingByResultsSummary
(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 summarylong
getUsageCountForLabel
(Label label) void
Removes the labelling from the persistent layervoid
void
saveLabelling
(@NotNull Labelling labelling) Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
findAll, findAllSorted, findById, findById, refresh, remove, replicate, save, saveRaw, updateModificationData
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
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.persistence.BambooObjectDao
findById
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
-
Constructor Details
-
LabelHibernateDao
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClass
in interfacebucket.core.persistence.ObjectDao
-
findLabelByNameAndNamespace
- Specified by:
findLabelByNameAndNamespace
in interfaceLabelDao
-
findLabelsByNameAndNamespace
@NotNull public @NotNull List<Label> findLabelsByNameAndNamespace(List<String> names, String namespace) Description copied from interface:LabelDao
Find any labels that match the names in the specic namespace- Specified by:
findLabelsByNameAndNamespace
in interfaceLabelDao
- Returns:
-
findLabellingByResultsSummary
@Nullable public @Nullable Labelling findLabellingByResultsSummary(Label label, ResultsSummary resultsSummary) - Specified by:
findLabellingByResultsSummary
in interfaceLabelDao
-
findLabellingByResultsSummary
@Nullable public @Nullable Labelling findLabellingByResultsSummary(String name, String namespace, ResultsSummary buildResultsSummary) - Specified by:
findLabellingByResultsSummary
in interfaceLabelDao
-
findLabellingByBuild
- Specified by:
findLabellingByBuild
in interfaceLabelDao
-
findLabellingByBuild
@Nullable public @Nullable Labelling findLabellingByBuild(String name, String namespace, ImmutablePlan plan) - Specified by:
findLabellingByBuild
in interfaceLabelDao
-
findLabellingByProject
- Specified by:
findLabellingByProject
in interfaceLabelDao
-
getUsageCountForLabel
- Specified by:
getUsageCountForLabel
in interfaceLabelDao
-
findResultsSummaryByNameAndNamespace
@NotNull public @NotNull List<ResultsSummary> findResultsSummaryByNameAndNamespace(String name, String namespace) - Specified by:
findResultsSummaryByNameAndNamespace
in interfaceLabelDao
-
findLabels
- Specified by:
findLabels
in interfaceLabelDao
-
findPlanLabels
Description copied from interface:LabelDao
Finds labels that are *only* plan level labellings matching the namespace. No duplicates in the returned set (obviously)- Specified by:
findPlanLabels
in 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:LabelDao
Finds labels that are *only* plan level labellings matching the namespace and associated with a plan. No duplicates in the returned set (obviously)- Specified by:
findPlanLabels
in interfaceLabelDao
- Parameters:
namespace
- label namespaceplan
- plan to filter labels with- Returns:
- set of labels
-
findLabels
- Specified by:
findLabels
in interfaceLabelDao
-
findLabels
@NotNull public @NotNull List<LabelCount> findLabels(String namespace, int maxResults, Project project) - Specified by:
findLabels
in interfaceLabelDao
-
findLabels
- Specified by:
findLabels
in interfaceLabelDao
-
findLabels
- Specified by:
findLabels
in interfaceLabelDao
-
findLabellingByUser
- Specified by:
findLabellingByUser
in interfaceLabelDao
-
saveLabel
-
saveLabelling
- Specified by:
saveLabelling
in interfaceLabelDao
-
remove
Description copied from interface:LabelDao
Removes the labelling from the persistent layer -
getResultSummaryLabelNames
@NotNull public @NotNull Set<String> getResultSummaryLabelNames(@NotNull @NotNull ResultsSummary resultsSummary) Description copied from interface:LabelDao
Get names of labels related to result summary- Specified by:
getResultSummaryLabelNames
in interfaceLabelDao
- Parameters:
resultsSummary
- result summary- Returns:
- set of unique label names
-