com.atlassian.bamboo.labels
Interface LabelDao

All Superinterfaces:
BambooObjectDao, bucket.core.persistence.ObjectDao
All Known Implementing Classes:
LabelHibernateDao

public interface LabelDao
extends BambooObjectDao


Method Summary
 Label findLabelByNameAndNamespace(java.lang.String name, java.lang.String namespace)
           
 Labelling findLabellingByBuild(Label label, ImmutablePlan plan)
           
 Labelling findLabellingByBuild(java.lang.String name, java.lang.String namespace, ImmutablePlan plan)
           
 Labelling findLabellingByProject(Label label, Project project)
           
 Labelling findLabellingByResultsSummary(Label label, ResultsSummary resultsSummary)
           
 Labelling findLabellingByResultsSummary(java.lang.String name, java.lang.String namespace, ResultsSummary buildResultsSummary)
           
 java.util.List<Labelling> findLabellingByUser(java.lang.String userName)
           
 java.util.List<Labelling> findLabels(Plan plan)
           
 java.util.List<Labelling> findLabels(Project project)
           
 java.util.List<LabelCount> findLabels(java.lang.String namespace, int maxResults)
           
 java.util.List<LabelCount> findLabels(java.lang.String namespace, int maxResults, Plan plan)
           
 java.util.List<LabelCount> findLabels(java.lang.String namespace, int maxResults, Project project)
           
 java.util.List<Label> findLabelsByNameAndNamespace(java.util.List<java.lang.String> names, java.lang.String namespace)
          Find any labels that match the names in the specic namespace
 java.util.Set<Label> findPlanLabels(java.lang.String namespace)
          Finds labels that are *only* plan level labellings matching the namespace.
 java.util.Set<Label> findPlanLabels(java.lang.String namespace, PlanIdentifier plan)
          Finds labels that are *only* plan level labellings matching the namespace and associated with a plan.
 java.util.List<ResultsSummary> findResultsSummaryByNameAndNamespace(java.lang.String name, java.lang.String namespace)
           
 long getUsageCountForLabel(Label label)
           
 void saveLabel(Label label)
           
 void saveLabelling(Labelling labelling)
           
 
Methods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

findLabelByNameAndNamespace

@Nullable
Label findLabelByNameAndNamespace(java.lang.String name,
                                           java.lang.String namespace)

findLabelsByNameAndNamespace

@NotNull
java.util.List<Label> findLabelsByNameAndNamespace(java.util.List<java.lang.String> names,
                                                           java.lang.String namespace)
Find any labels that match the names in the specic namespace

Parameters:
names -
namespace -
Returns:

findResultsSummaryByNameAndNamespace

@NotNull
java.util.List<ResultsSummary> findResultsSummaryByNameAndNamespace(java.lang.String name,
                                                                            java.lang.String namespace)

findLabellingByResultsSummary

@Nullable
Labelling findLabellingByResultsSummary(Label label,
                                                 ResultsSummary resultsSummary)

findLabellingByResultsSummary

@Nullable
Labelling findLabellingByResultsSummary(java.lang.String name,
                                                 java.lang.String namespace,
                                                 ResultsSummary buildResultsSummary)

getUsageCountForLabel

long getUsageCountForLabel(Label label)

findLabellingByBuild

@Nullable
Labelling findLabellingByBuild(Label label,
                                        ImmutablePlan plan)

findLabellingByBuild

@Nullable
Labelling findLabellingByBuild(java.lang.String name,
                                        java.lang.String namespace,
                                        ImmutablePlan plan)

findLabellingByProject

@Nullable
Labelling findLabellingByProject(Label label,
                                          Project project)

findLabels

@NotNull
java.util.List<LabelCount> findLabels(java.lang.String namespace,
                                              int maxResults)

findLabels

@NotNull
java.util.List<LabelCount> findLabels(java.lang.String namespace,
                                              int maxResults,
                                              Plan plan)

findLabels

@NotNull
java.util.List<LabelCount> findLabels(java.lang.String namespace,
                                              int maxResults,
                                              Project project)

findLabels

@NotNull
java.util.List<Labelling> findLabels(Plan plan)

findLabels

@NotNull
java.util.List<Labelling> findLabels(Project project)

findLabellingByUser

@NotNull
java.util.List<Labelling> findLabellingByUser(java.lang.String userName)

saveLabel

void saveLabel(@NotNull
               Label label)

saveLabelling

void saveLabelling(@NotNull
                   Labelling labelling)

findPlanLabels

@NotNull
java.util.Set<Label> findPlanLabels(java.lang.String namespace)
Finds labels that are *only* plan level labellings matching the namespace. No duplicates in the returned set (obviously)

Parameters:
namespace - label namespace
Returns:
set of labels

findPlanLabels

@NotNull
java.util.Set<Label> findPlanLabels(java.lang.String namespace,
                                            @NotNull
                                            PlanIdentifier plan)
Finds labels that are *only* plan level labellings matching the namespace and associated with a plan. No duplicates in the returned set (obviously)

Parameters:
namespace - label namespace
plan - plan to filter labels with
Returns:
set of labels


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.