| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.hibernate.HibernateObjectDao
com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao
public class HibernateLabelDao
| Field Summary | 
|---|
| Fields inherited from class com.atlassian.hibernate.HibernateObjectDao | 
|---|
log | 
| Fields inherited from class org.springframework.dao.support.DaoSupport | 
|---|
logger | 
| Fields inherited from interface com.atlassian.confluence.labels.persistence.dao.LabelDao | 
|---|
UNLIMITED | 
| Constructor Summary | |
|---|---|
HibernateLabelDao()
 | 
|
| Method Summary | |
|---|---|
 void | 
deleteLabellingBySpace(java.lang.String key)
 | 
 java.util.List | 
findAllUserLabelledContent(java.lang.String username)
 | 
 java.util.List | 
findByDetails(java.lang.String name,
              java.lang.String namespace,
              java.lang.String owner)
Find all labels based on the details passed in.  | 
 java.util.List | 
findByDetailsInSpace(java.lang.String name,
                     java.lang.String namespace,
                     java.lang.String owner,
                     java.lang.String spaceKey)
Find all labels for a specific space, based on the details passed in.  | 
 Label | 
findById(long id)
Find the label by its id.  | 
 Label | 
findByLabel(Label label)
 | 
 java.util.List | 
findBySingleDegreeSeparation(ContentEntityObject content,
                             int maxResults)
Find the labels that are a single degree of separation away from the specified content.  | 
 java.util.List | 
findBySingleDegreeSeparation(ContentEntityObject content,
                             java.lang.String spaceKey,
                             int maxResults)
 | 
 java.util.List | 
findBySingleDegreeSeparation(Label label,
                             int maxResults)
Find the labels that are a single degree of separation away from the specified label.  | 
 java.util.List | 
findBySingleDegreeSeparation(Label label,
                             java.lang.String spaceKey,
                             int maxResults)
 | 
 java.util.List | 
findBySpace(java.lang.String spaceKey,
            java.lang.String namespace)
Find the labels used to label the content with the specified space.  | 
 java.util.List | 
findContentByLabel(Label label)
 | 
 int | 
findContentCountForLabel(Label label)
 | 
 java.util.List | 
findContentForLabel(Label label)
 | 
 java.util.List | 
findCurrentContentForLabel(Label label)
 | 
 java.util.List | 
findCurrentContentForLabelAndSpace(Label label,
                                   java.lang.String spaceKey)
Returns current content with the specified label and spaceKey.  | 
 Labelling | 
findLabellingByContentAndLabel(ContentEntityObject content,
                               Label label)
 | 
 Labelling | 
findLabellingById(long id)
 | 
 java.util.List | 
findMostPopular(java.lang.String namespace,
                int maxResults)
Find the most popular labels.  | 
 java.util.List | 
findMostPopularBySpace(java.lang.String namespace,
                       java.lang.String spaceKey,
                       int maxResults)
Find the most popular labels in the specified space.  | 
 java.util.List | 
findRecentlyUsed(int maxResults)
 | 
 java.util.List | 
findRecentlyUsedBySpace(java.lang.String spaceKey,
                        int maxResults)
 | 
 java.util.List | 
findRecentlyUsedLabelling(int maxResults)
 | 
 java.util.List | 
findRecentlyUsedLabellingsBySpace(java.lang.String spaceKey,
                                  int maxResults)
 | 
 java.util.List | 
findRecentlyUsedUserLabellings(java.lang.String username,
                               int maxResults)
 | 
 java.util.List | 
findRecentlyUsedUserLabels(java.lang.String username,
                           int maxResults)
 | 
 java.util.List | 
findSpacesContainingContentWithLabel(Label label)
 | 
 java.util.List | 
findSpacesWithLabel(Label label)
 | 
 java.util.List | 
findUnusedLabels()
 | 
 java.util.List | 
getFavouriteSpaces(java.lang.String username)
 | 
 java.lang.Class | 
getPersistentClass()
 | 
 boolean | 
isDB2()
 | 
 boolean | 
isMySQL()
The problems are specific to MySQl v 4, but unfortunately we can't tell that without hitting the database.  | 
 void | 
setForceSQL(boolean forceSQL)
 | 
| 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 bucket.core.persistence.ObjectDao | 
|---|
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw | 
| Constructor Detail | 
|---|
public HibernateLabelDao()
| Method Detail | 
|---|
public boolean isDB2()
public void setForceSQL(boolean forceSQL)
public boolean isMySQL()
public java.lang.Class getPersistentClass()
getPersistentClass in interface bucket.core.persistence.ObjectDaopublic Label findById(long id)
LabelDao
findById in interface LabelDaopublic Label findByLabel(Label label)
findByLabel in interface LabelDao
public java.util.List findByDetails(java.lang.String name,
                                    java.lang.String namespace,
                                    java.lang.String owner)
LabelDaoThe list of labels returned will be ordered by name.
findByDetails in interface LabelDao
public java.util.List findByDetailsInSpace(java.lang.String name,
                                           java.lang.String namespace,
                                           java.lang.String owner,
                                           java.lang.String spaceKey)
LabelDaoThe list of labels returned will be ordered by name.
findByDetailsInSpace in interface LabelDao
public java.util.List findBySpace(java.lang.String spaceKey,
                                  java.lang.String namespace)
LabelDao
findBySpace in interface LabelDao
public java.util.List findRecentlyUsedBySpace(java.lang.String spaceKey,
                                              int maxResults)
findRecentlyUsedBySpace in interface LabelDaopublic java.util.List findRecentlyUsed(int maxResults)
findRecentlyUsed in interface LabelDaopublic java.util.List findRecentlyUsedLabelling(int maxResults)
findRecentlyUsedLabelling in interface LabelDao
public java.util.List findRecentlyUsedLabellingsBySpace(java.lang.String spaceKey,
                                                        int maxResults)
findRecentlyUsedLabellingsBySpace in interface LabelDao
public java.util.List findRecentlyUsedUserLabels(java.lang.String username,
                                                 int maxResults)
findRecentlyUsedUserLabels in interface LabelDao
public java.util.List findRecentlyUsedUserLabellings(java.lang.String username,
                                                     int maxResults)
findRecentlyUsedUserLabellings in interface LabelDao
public java.util.List findMostPopular(java.lang.String namespace,
                                      int maxResults)
LabelDao
findMostPopular in interface LabelDao
public java.util.List findMostPopularBySpace(java.lang.String namespace,
                                             java.lang.String spaceKey,
                                             int maxResults)
LabelDao
findMostPopularBySpace in interface LabelDaomaxResults - allows you to specify the maximum number of results returned by this method. Leaving max results
 at zero will return all of the results.
public java.util.List findBySingleDegreeSeparation(ContentEntityObject content,
                                                   int maxResults)
LabelDao
findBySingleDegreeSeparation in interface LabelDaocontent - the content object used to search for related labelsmaxResults - specifies the number of labels to be returned.
public java.util.List findBySingleDegreeSeparation(ContentEntityObject content,
                                                   java.lang.String spaceKey,
                                                   int maxResults)
findBySingleDegreeSeparation in interface LabelDao
public java.util.List findBySingleDegreeSeparation(Label label,
                                                   int maxResults)
LabelDao
findBySingleDegreeSeparation in interface LabelDaolabel - the label to look for on pagesmaxResults - the maximum number of results to return
public java.util.List findBySingleDegreeSeparation(Label label,
                                                   java.lang.String spaceKey,
                                                   int maxResults)
findBySingleDegreeSeparation in interface LabelDaopublic java.util.List findContentForLabel(Label label)
public java.util.List findAllUserLabelledContent(java.lang.String username)
findAllUserLabelledContent in interface LabelDaopublic java.util.List findCurrentContentForLabel(Label label)
findCurrentContentForLabel in interface LabelDaopublic int findContentCountForLabel(Label label)
findContentCountForLabel in interface LabelDao
public java.util.List findCurrentContentForLabelAndSpace(Label label,
                                                         java.lang.String spaceKey)
LabelDao
findCurrentContentForLabelAndSpace in interface LabelDaolabel - search for content with this labelspaceKey - (optional) search for content belonging to the space with this spaceKey
public java.util.List findSpacesContainingContentWithLabel(Label label)
findSpacesContainingContentWithLabel in interface LabelDaopublic java.util.List findSpacesWithLabel(Label label)
findSpacesWithLabel in interface LabelDao
public Labelling findLabellingByContentAndLabel(ContentEntityObject content,
                                                Label label)
findLabellingByContentAndLabel in interface LabelDaopublic Labelling findLabellingById(long id)
findLabellingById in interface LabelDaopublic void deleteLabellingBySpace(java.lang.String key)
deleteLabellingBySpace in interface LabelDaopublic java.util.List getFavouriteSpaces(java.lang.String username)
getFavouriteSpaces in interface LabelDaousername - username of label ownerpublic java.util.List findUnusedLabels()
findUnusedLabels in interface LabelDaopublic java.util.List findContentByLabel(Label label)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||