com.atlassian.bamboo.labels
Class LabelHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.bamboo.persistence.BambooHibernateObjectDao
                  extended by com.atlassian.bamboo.labels.LabelHibernateDao
All Implemented Interfaces:
bucket.core.persistence.ObjectDao, LabelDao, BambooObjectDao, org.springframework.beans.factory.InitializingBean

public class LabelHibernateDao
extends BambooHibernateObjectDao
implements LabelDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
LabelHibernateDao()
           
 
Method Summary
 Label findLabelByNameAndNamespace(java.lang.String name, java.lang.String namespace)
           
 Labelling findLabellingByBuild(Label label, Plan plan)
           
 Labelling findLabellingByBuild(java.lang.String name, java.lang.String namespace, Plan 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.List<Label> findLabelsMatchingString(java.lang.String match, java.lang.String escapeChar)
          Find any labels that match the specified string.
 java.util.List<ResultsSummary> findResultsSummaryByNameAndNamespace(java.lang.String name, java.lang.String namespace)
           
 java.lang.Class getPersistentClass()
           
 long getUsageCountForLabel(Label label)
           
 void saveLabel(Label label)
           
 void saveLabelling(Labelling labelling)
           
 
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
executeCountQuery, executeReturnLong, findById, findById
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, 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 Detail

LabelHibernateDao

public LabelHibernateDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao

findLabelByNameAndNamespace

@Nullable
public Label findLabelByNameAndNamespace(java.lang.String name,
                                                  java.lang.String namespace)
Specified by:
findLabelByNameAndNamespace in interface LabelDao

findLabelsByNameAndNamespace

@NotNull
public java.util.List<Label> findLabelsByNameAndNamespace(java.util.List<java.lang.String> names,
                                                                  java.lang.String namespace)
Description copied from interface: LabelDao
Find any labels that match the names in the specic namespace

Specified by:
findLabelsByNameAndNamespace in interface LabelDao
Returns:

findLabelsMatchingString

@NotNull
public java.util.List<Label> findLabelsMatchingString(java.lang.String match,
                                                              java.lang.String escapeChar)
Description copied from interface: LabelDao
Find any labels that match the specified string. Uses wildcard matching, eg LIKE %name%

Specified by:
findLabelsMatchingString in interface LabelDao
escapeChar - to escape special characters eg % _
Returns:
list of matching labels

findLabellingByResultsSummary

@Nullable
public Labelling findLabellingByResultsSummary(Label label,
                                                        ResultsSummary resultsSummary)
Specified by:
findLabellingByResultsSummary in interface LabelDao

findLabellingByResultsSummary

@Nullable
public Labelling findLabellingByResultsSummary(java.lang.String name,
                                                        java.lang.String namespace,
                                                        ResultsSummary buildResultsSummary)
Specified by:
findLabellingByResultsSummary in interface LabelDao

findLabellingByBuild

@Nullable
public Labelling findLabellingByBuild(Label label,
                                               Plan plan)
Specified by:
findLabellingByBuild in interface LabelDao

findLabellingByBuild

@Nullable
public Labelling findLabellingByBuild(java.lang.String name,
                                               java.lang.String namespace,
                                               Plan plan)
Specified by:
findLabellingByBuild in interface LabelDao

findLabellingByProject

@Nullable
public Labelling findLabellingByProject(Label label,
                                                 Project project)
Specified by:
findLabellingByProject in interface LabelDao

getUsageCountForLabel

public long getUsageCountForLabel(Label label)
Specified by:
getUsageCountForLabel in interface LabelDao

findResultsSummaryByNameAndNamespace

@NotNull
public java.util.List<ResultsSummary> findResultsSummaryByNameAndNamespace(java.lang.String name,
                                                                                   java.lang.String namespace)
Specified by:
findResultsSummaryByNameAndNamespace in interface LabelDao

findLabels

@NotNull
public java.util.List<LabelCount> findLabels(java.lang.String namespace,
                                                     int maxResults)
Specified by:
findLabels in interface LabelDao

findLabels

@NotNull
public java.util.List<LabelCount> findLabels(java.lang.String namespace,
                                                     int maxResults,
                                                     Plan plan)
Specified by:
findLabels in interface LabelDao

findLabels

@NotNull
public java.util.List<LabelCount> findLabels(java.lang.String namespace,
                                                     int maxResults,
                                                     Project project)
Specified by:
findLabels in interface LabelDao

findLabels

@NotNull
public java.util.List<Labelling> findLabels(Plan plan)
Specified by:
findLabels in interface LabelDao

findLabels

@NotNull
public java.util.List<Labelling> findLabels(Project project)
Specified by:
findLabels in interface LabelDao

findLabellingByUser

@NotNull
public java.util.List<Labelling> findLabellingByUser(java.lang.String userName)
Specified by:
findLabellingByUser in interface LabelDao

saveLabel

public void saveLabel(@NotNull
                      Label label)
Specified by:
saveLabel in interface LabelDao

saveLabelling

public void saveLabelling(@NotNull
                          Labelling labelling)
Specified by:
saveLabelling in interface LabelDao


Copyright © 2010 Atlassian. All Rights Reserved.