|
||||||||||
| 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(String key)
|
List<? extends EditableLabelable> |
findAllUserLabelledContent(String username)
|
List |
findByDetails(String name,
String namespace,
String owner)
Find all labels based on the details passed in. |
List |
findByDetailsInSpace(String name,
String namespace,
String owner,
String spaceKey)
Find all labels for a specific space, based on the details passed in. |
List<Label> |
findByDetailsInSpaces(String name,
String namespace,
String owner,
Collection<Space> spaces)
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)
|
List |
findBySingleDegreeSeparation(EditableLabelable content,
int maxResults)
Find the labels that are a single degree of separation away from the specified content. |
List |
findBySingleDegreeSeparation(EditableLabelable content,
String spaceKey,
int maxResults)
|
List |
findBySingleDegreeSeparation(Label label,
int maxResults)
Find the labels that are a single degree of separation away from the specified label. |
List |
findBySingleDegreeSeparation(Label label,
String spaceKey,
int maxResults)
|
List |
findBySpace(String spaceKey,
String namespace)
Find the labels used to label the content with the specified space. |
int |
findContentCountForLabel(Label label)
|
List<? extends EditableLabelable> |
findContentForAllLabels(Collection<Label> labels,
int maxResults,
int offset)
Retrieve all ContentEntityObjects which are labelled with ALL provided labels. |
List<? extends EditableLabelable> |
findContentForLabel(Label label,
int maxResults)
|
List<? extends EditableLabelable> |
findCurrentContentForLabel(Label label)
|
List<? extends EditableLabelable> |
findCurrentContentForLabelAndSpace(Label label,
String spaceKey)
Returns current content with the specified label and spaceKey. |
Labelling |
findLabellingByContentAndLabel(EditableLabelable content,
Label label)
|
Labelling |
findLabellingById(long id)
|
List |
findMostPopular(String namespace,
int maxResults)
Find the most popular labels. |
List |
findMostPopularBySpace(String namespace,
String spaceKey,
int maxResults)
Find the most popular labels in the specified space. |
List |
findRecentlyUsed(int maxResults)
|
List |
findRecentlyUsedBySpace(String spaceKey,
int maxResults)
|
List |
findRecentlyUsedLabelling(int maxResults)
|
List |
findRecentlyUsedLabellingsBySpace(String spaceKey,
int maxResults)
|
List |
findRecentlyUsedUserLabellings(String username,
int maxResults)
|
List |
findRecentlyUsedUserLabels(String username,
int maxResults)
|
List |
findSpacesContainingContentWithLabel(Label label)
|
List |
findSpacesWithLabel(Label label)
|
List |
findUnusedLabels()
|
List |
getFavouriteSpaces(String username)
|
Class |
getPersistentClass()
|
void |
setForceSQL(boolean forceSQL)
|
| 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, findAllSorted, refresh, remove, replicate, save, saveRaw |
| Constructor Detail |
|---|
public HibernateLabelDao()
| Method Detail |
|---|
public void setForceSQL(boolean forceSQL)
public Class getPersistentClass()
getPersistentClass in interface ObjectDaopublic Label findById(long id)
LabelDao
findById in interface LabelDaoid - ID of the label
public Label findByLabel(Label label)
findByLabel in interface LabelDao
public List findByDetails(String name,
String namespace,
String owner)
LabelDaoThe list of labels returned will be ordered by name.
findByDetails in interface LabelDaoname - Label name (can be null)namespace - Namespace of the label (can be null)owner - Owner of the label (can be null)
public List findByDetailsInSpace(String name,
String namespace,
String owner,
String spaceKey)
LabelDaoThe list of labels returned will be ordered by name.
findByDetailsInSpace in interface LabelDaoname - Label name (can be null)namespace - Namespace of the label (can be null)owner - Owner of the label (can be null)spaceKey - Key of the space whose content must have the returned labels (can be null)
public List<Label> findByDetailsInSpaces(String name,
String namespace,
String owner,
Collection<Space> spaces)
LabelDaoThe list of labels returned will be ordered by name.
findByDetailsInSpaces in interface LabelDaoname - Label name (can be null)namespace - Namespace of the label (can be null)owner - Owner of the label (can be null)spaces - Collection of spaces whose content must have the returned labels (can be null)
public List findBySpace(String spaceKey,
String namespace)
LabelDao
findBySpace in interface LabelDaospaceKey - Key of the space whose content must have the returned labels (can be null)namespace - Namespace of the label (can be null)
public List findRecentlyUsedBySpace(String spaceKey,
int maxResults)
findRecentlyUsedBySpace in interface LabelDaopublic List findRecentlyUsed(int maxResults)
findRecentlyUsed in interface LabelDaopublic List findRecentlyUsedLabelling(int maxResults)
findRecentlyUsedLabelling in interface LabelDao
public List findRecentlyUsedLabellingsBySpace(String spaceKey,
int maxResults)
findRecentlyUsedLabellingsBySpace in interface LabelDao
public List findRecentlyUsedUserLabels(String username,
int maxResults)
findRecentlyUsedUserLabels in interface LabelDao
public List findRecentlyUsedUserLabellings(String username,
int maxResults)
findRecentlyUsedUserLabellings in interface LabelDao
public List findMostPopular(String namespace,
int maxResults)
LabelDao
findMostPopular in interface LabelDaomaxResults - Maximum size of list to return
public List findMostPopularBySpace(String namespace,
String spaceKey,
int maxResults)
LabelDao
findMostPopularBySpace in interface LabelDaospaceKey - of the space whose content must have the returned labelsmaxResults - 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 List findBySingleDegreeSeparation(EditableLabelable 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 List findBySingleDegreeSeparation(EditableLabelable content,
String spaceKey,
int maxResults)
findBySingleDegreeSeparation in interface LabelDao
public 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 List findBySingleDegreeSeparation(Label label,
String spaceKey,
int maxResults)
findBySingleDegreeSeparation in interface LabelDaopublic List<? extends EditableLabelable> findAllUserLabelledContent(String username)
findAllUserLabelledContent in interface LabelDaopublic List<? extends EditableLabelable> findCurrentContentForLabel(Label label)
findCurrentContentForLabel in interface LabelDao
public List<? extends EditableLabelable> findContentForLabel(Label label,
int maxResults)
findContentForLabel in interface LabelDao
public List<? extends EditableLabelable> findContentForAllLabels(Collection<Label> labels,
int maxResults,
int offset)
LabelDao
findContentForAllLabels in interface LabelDaolabels - labels which must appear on ContentEntityObjectsmaxResults - the maximum number of results to returnoffset - the offset into the results
public int findContentCountForLabel(Label label)
findContentCountForLabel in interface LabelDao
public List<? extends EditableLabelable> findCurrentContentForLabelAndSpace(Label label,
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 List findSpacesContainingContentWithLabel(Label label)
findSpacesContainingContentWithLabel in interface LabelDaopublic List findSpacesWithLabel(Label label)
findSpacesWithLabel in interface LabelDao
public Labelling findLabellingByContentAndLabel(EditableLabelable content,
Label label)
findLabellingByContentAndLabel in interface LabelDaopublic Labelling findLabellingById(long id)
findLabellingById in interface LabelDaopublic void deleteLabellingBySpace(String key)
deleteLabellingBySpace in interface LabelDaopublic List getFavouriteSpaces(String username)
getFavouriteSpaces in interface LabelDaousername - username of label ownerpublic List findUnusedLabels()
findUnusedLabels in interface LabelDao
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||