|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 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)
|
|
PartialList<ContentEntityObject> |
findAllContentForAllLabels(int offset,
int maxResults,
Label... labels)
Retrieve all ContentEntityObjects which are labelled with ALL provided labels. |
|
java.util.List<? extends EditableLabelable> |
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. |
|
java.util.List<Label> |
findByDetailsInSpaces(java.lang.String name,
java.lang.String namespace,
java.lang.String owner,
java.util.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)
|
|
java.util.List |
findBySingleDegreeSeparation(EditableLabelable content,
int maxResults)
Find the labels that are a single degree of separation away from the specified content. |
|
java.util.List |
findBySingleDegreeSeparation(EditableLabelable 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. |
|
int |
findContentCountForLabel(Label label)
|
|
java.util.List<? extends EditableLabelable> |
findContentForLabel(Label label,
int maxResults)
Returns content with the specified label, ordered by content id. |
|
PartialList<ContentEntityObject> |
findContentInSpaceForAllLabels(int offset,
int maxResults,
java.lang.String spaceKey,
Label... labels)
Retrieve current ContentEntityObjects in the space which are labelled with ALL provided labels. |
|
PartialList<ContentEntityObject> |
findContentInSpacesForAllLabels(int offset,
int maxResults,
java.util.Set<java.lang.String> spaceKeys,
Label... labels)
Retrieve current ContentEntityObjects in the given spaces which are labelled with ALL provided labels. |
|
java.util.List<? extends EditableLabelable> |
findCurrentContentForLabel(Label label)
Returns current content with the specified label, sorted by last modification date. |
|
java.util.List<? extends EditableLabelable> |
findCurrentContentForLabelAndSpace(Label label,
java.lang.String spaceKey)
Returns current content with the specified label and spaceKey. |
|
|
findForAllLabels(java.lang.Class<T> labelableClass,
int offset,
int maxResults,
Label... labels)
Retrieve current EditableLabelables which are labelled with ALL provided labels. |
|
PartialList<EditableLabelable> |
findForAllLabels(int offset,
int maxResults,
Label... labelsArray)
Retrieve EditableLabelables which are labelled with ALL provided labels. |
|
Labelling |
findLabellingByContentAndLabel(EditableLabelable 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()
|
|
void |
setAttachmentManager(AttachmentManager attachmentManager)
|
|
void |
setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
|
|
void |
setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
|
|
void |
setForceSQL(boolean forceSQL)
|
|
void |
setPageTemplateDao(PageTemplateDao pageTemplateDao)
|
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 java.lang.Class getPersistentClass()
getPersistentClass
in interface ObjectDao
public Label findById(long id)
LabelDao
findById
in interface LabelDao
id
- ID of the label
public 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)
LabelDao
The list of labels returned will be ordered by name.
findByDetails
in interface LabelDao
name
- Label name (can be null)namespace
- Namespace of the label (can be null)owner
- Owner of the label (can be null)
public java.util.List findByDetailsInSpace(java.lang.String name, java.lang.String namespace, java.lang.String owner, java.lang.String spaceKey)
LabelDao
The list of labels returned will be ordered by name.
findByDetailsInSpace
in interface LabelDao
name
- 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 java.util.List<Label> findByDetailsInSpaces(java.lang.String name, java.lang.String namespace, java.lang.String owner, java.util.Collection<Space> spaces)
LabelDao
The list of labels returned will be ordered by name.
findByDetailsInSpaces
in interface LabelDao
name
- 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 java.util.List findBySpace(java.lang.String spaceKey, java.lang.String namespace)
LabelDao
findBySpace
in interface LabelDao
spaceKey
- Key of the space whose content must have the returned labels (can be null)namespace
- Namespace of the label (can be null)
public java.util.List findRecentlyUsedBySpace(java.lang.String spaceKey, int maxResults)
findRecentlyUsedBySpace
in interface LabelDao
public java.util.List findRecentlyUsed(int maxResults)
findRecentlyUsed
in interface LabelDao
public 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
maxResults
- Maximum size of list to return
public java.util.List findMostPopularBySpace(java.lang.String namespace, java.lang.String spaceKey, int maxResults)
LabelDao
findMostPopularBySpace
in interface LabelDao
spaceKey
- 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 java.util.List findBySingleDegreeSeparation(EditableLabelable content, int maxResults)
LabelDao
findBySingleDegreeSeparation
in interface LabelDao
content
- the content object used to search for related labelsmaxResults
- specifies the number of labels to be returned.
public java.util.List findBySingleDegreeSeparation(EditableLabelable content, java.lang.String spaceKey, int maxResults)
findBySingleDegreeSeparation
in interface LabelDao
public java.util.List findBySingleDegreeSeparation(Label label, int maxResults)
LabelDao
findBySingleDegreeSeparation
in interface LabelDao
label
- 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 LabelDao
public java.util.List<? extends EditableLabelable> findAllUserLabelledContent(java.lang.String username)
findAllUserLabelledContent
in interface LabelDao
public java.util.List<? extends EditableLabelable> findCurrentContentForLabel(Label label)
LabelDao
#findContentForLabel(Label)
.
findCurrentContentForLabel
in interface LabelDao
label
- search for content with this label
public java.util.List<? extends EditableLabelable> findContentForLabel(Label label, int maxResults)
LabelDao
LabelDao.findCurrentContentForLabel(Label)
.
findContentForLabel
in interface LabelDao
label
- search for content with this labelmaxResults
- the number of results to return; use -1 to get all results
public <T extends EditableLabelable> PartialList<T> findForAllLabels(java.lang.Class<T> labelableClass, int offset, int maxResults, Label... labels)
LabelDao
findForAllLabels
in interface LabelDao
labelableClass
- the type of EditableLabelable to returnoffset
- the offset into the resultsmaxResults
- the maximum number of results to returnlabels
- labels which must appear on ContentEntityObjects
public PartialList<EditableLabelable> findForAllLabels(int offset, int maxResults, Label... labelsArray)
LabelDao
ContentEntityObject
s are returned in the list they may be current or in the trash.
findForAllLabels
in interface LabelDao
offset
- the offset into the resultsmaxResults
- the maximum number of results to returnlabelsArray
- labels which must appear on ContentEntityObjects
public PartialList<ContentEntityObject> findContentInSpaceForAllLabels(int offset, int maxResults, java.lang.String spaceKey, Label... labels)
LabelDao
findContentInSpaceForAllLabels
in interface LabelDao
offset
- the offset into the resultsmaxResults
- the maximum number of results to returnspaceKey
- the key of the space to search inlabels
- labels which must appear on ContentEntityObjects
public PartialList<ContentEntityObject> findContentInSpacesForAllLabels(int offset, int maxResults, java.util.Set<java.lang.String> spaceKeys, Label... labels)
LabelDao
findContentInSpacesForAllLabels
in interface LabelDao
offset
- the offset into the resultsmaxResults
- the maximum number of results to returnspaceKeys
- the keys of the spaces to search inlabels
- labels which must appear on ContentEntityObjects
public PartialList<ContentEntityObject> findAllContentForAllLabels(int offset, int maxResults, Label... labels)
LabelDao
findAllContentForAllLabels
in interface LabelDao
offset
- the offset into the resultsmaxResults
- the maximum number of results to returnlabels
- labels which must appear on ContentEntityObjects
public int findContentCountForLabel(Label label)
findContentCountForLabel
in interface LabelDao
public java.util.List<? extends EditableLabelable> findCurrentContentForLabelAndSpace(Label label, java.lang.String spaceKey)
LabelDao
findCurrentContentForLabelAndSpace
in interface LabelDao
label
- 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 LabelDao
public java.util.List findSpacesWithLabel(Label label)
findSpacesWithLabel
in interface LabelDao
public Labelling findLabellingByContentAndLabel(EditableLabelable content, Label label)
findLabellingByContentAndLabel
in interface LabelDao
public Labelling findLabellingById(long id)
findLabellingById
in interface LabelDao
public void deleteLabellingBySpace(java.lang.String key)
deleteLabellingBySpace
in interface LabelDao
public java.util.List getFavouriteSpaces(java.lang.String username)
getFavouriteSpaces
in interface LabelDao
username
- username of label ownerpublic java.util.List findUnusedLabels()
findUnusedLabels
in interface LabelDao
public void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
public void setPageTemplateDao(PageTemplateDao pageTemplateDao)
public void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
public void setAttachmentManager(AttachmentManager attachmentManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |