|
||||||||||
| 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.pages.persistence.dao.hibernate.HibernateDraftDao
public class HibernateDraftDao
Database storage for drafts. Does not permit anonymous drafts (i.e. those with a null username), which should be stored in non-permanent storage like the HTTP session.
SessionDraftDao| Field Summary | |
|---|---|
static org.apache.log4j.Category |
log
|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
HibernateDraftDao()
|
|
| Method Summary | |
|---|---|
java.util.List<Draft> |
findByCreatorName(java.lang.String creatorName)
Returns the drafts stored against the given username. |
Draft |
getDraft(long draftId)
Returns the draft with the given ID, or null if no draft is found with that ID. |
Draft |
getDraft(java.lang.String pageId,
java.lang.String creatorName,
java.lang.String draftType)
Finds and returns a draft object with all the specified properties or null if none is found. |
java.lang.Class |
getPersistentClass()
|
void |
remove(Draft draft)
Removes a draft based on its page ID, owner and type. |
void |
remove(long id)
Remove a draft based on its ID. |
void |
removeAll()
Removes all drafts in the data store. |
void |
saveOrUpdate(Draft draft)
Saves the draft. |
void |
updateSpaceKey(java.lang.String newSpaceKey,
java.lang.String oldSpaceKey)
Changes all drafts with a space key of oldSpaceKey to have newSpaceKey. |
| 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.confluence.pages.persistence.dao.DraftDao |
|---|
findAll |
| Field Detail |
|---|
public static final org.apache.log4j.Category log
| Constructor Detail |
|---|
public HibernateDraftDao()
| Method Detail |
|---|
public java.lang.Class getPersistentClass()
getPersistentClass in interface bucket.core.persistence.ObjectDao
public void saveOrUpdate(Draft draft)
throws java.lang.IllegalArgumentException
DraftDao
saveOrUpdate in interface DraftDaojava.lang.IllegalArgumentException - if the draft has no page ID, owner or type.
public Draft getDraft(java.lang.String pageId,
java.lang.String creatorName,
java.lang.String draftType)
DraftDao
getDraft in interface DraftDaopageId - the id of the page which this draft is associated withcreatorName - the owner of the draftdraftType - the type of draft, which is usually the result of calling ContentEntityObject.getType()
public Draft getDraft(long draftId)
DraftDao
getDraft in interface DraftDaopublic void remove(Draft draft)
DraftDao
remove in interface DraftDaofor a faster way to remove a draft when you know its IDpublic void remove(long id)
DraftDao
remove in interface DraftDaopublic java.util.List<Draft> findByCreatorName(java.lang.String creatorName)
DraftDao
findByCreatorName in interface DraftDao
public void updateSpaceKey(java.lang.String newSpaceKey,
java.lang.String oldSpaceKey)
DraftDao
updateSpaceKey in interface DraftDaonewSpaceKey - the new space keyoldSpaceKey - the old space keypublic void removeAll()
DraftDao
removeAll in interface DraftDao
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||