public class HibernateDraftDao extends HibernateObjectDao implements DraftDao
SessionDraftDao
HibernateObjectDao.Cacheability
NON_CACHEABLE
Constructor and Description |
---|
HibernateDraftDao() |
Modifier and Type | Method and Description |
---|---|
int |
countDrafts(String creatorName) |
List<Draft> |
findByCreatorName(String creatorName)
Returns the drafts stored against the given username.
|
List<Draft> |
getAllDraftsForSpace(String spaceKey)
Deprecated.
|
protected Draft |
getByClassId(long id)
Retrieve the object with a particular id from the database.
|
Draft |
getDraft(long draftId)
Returns the draft with the given ID, or null if no draft is found with that ID.
|
Draft |
getDraft(Long pageId,
String creatorName,
String draftType,
String spaceKey)
Deprecated.
|
Draft |
getDraft(String pageId,
ConfluenceUser creator,
String draftType,
String spaceKey)
Finds and returns a draft object with all the specified properties or null if none is found.
|
Draft |
getDraft(String pageId,
String creatorName,
String draftType,
String spaceKey)
Deprecated.
|
Class |
getPersistentClass() |
void |
remove(Draft draft)
Removes a draft based on its page ID, owner and type.
|
void |
remove(long id)
Deprecated.
|
void |
removeAll()
Deprecated.
|
void |
saveOrUpdate(Draft draft)
Saves the draft.
|
void |
setConfluenceUserDao(ConfluenceUserDao confluenceUserDao) |
void |
updateSpaceKey(String newSpaceKey,
String oldSpaceKey)
Deprecated.
|
findAll, findAllSorted, findAllSorted, findByClassIds, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, uniqueResult, updateModificationData
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
public Class getPersistentClass()
getPersistentClass
in interface ObjectDao
protected Draft getByClassId(long id)
HibernateObjectDao
getByClassId
in class HibernateObjectDao
id
- the id of the object to look uppublic void saveOrUpdate(Draft draft) throws IllegalArgumentException
DraftDao
saveOrUpdate
in interface DraftDao
IllegalArgumentException
- if the draft has no page ID, owner or type.public Draft getDraft(String pageId, ConfluenceUser creator, String draftType, String spaceKey)
DraftDao
getDraft
in interface DraftDao
pageId
- the id of the page which this draft is associated withcreator
- the owner of the draftdraftType
- the type of draft, which is usually the result of calling ContentEntityObject.getType()
spaceKey
- space key, if relevant for the draft. This is used to enable NEW page drafts across multiple spaces@Deprecated public Draft getDraft(String pageId, String creatorName, String draftType, String spaceKey)
@Deprecated public Draft getDraft(Long pageId, String creatorName, String draftType, String spaceKey)
@Deprecated public List<Draft> getAllDraftsForSpace(String spaceKey)
getAllDraftsForSpace
in interface DraftDao
public Draft getDraft(long draftId)
DraftDao
public void remove(Draft draft)
DraftDao
@Deprecated public void remove(long id)
DraftDao
public List<Draft> findByCreatorName(String creatorName)
DraftDao
findByCreatorName
in interface DraftDao
@Deprecated public void updateSpaceKey(String newSpaceKey, String oldSpaceKey)
DraftDao
updateSpaceKey
in interface DraftDao
newSpaceKey
- the new space keyoldSpaceKey
- the old space key@Deprecated public void removeAll()
DraftDao
public int countDrafts(String creatorName)
countDrafts
in interface DraftDao
public void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
Copyright © 2003–2016 Atlassian. All rights reserved.