com.atlassian.confluence.pages.persistence.dao.hibernate
Class HibernateDraftDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateDraftDao
All Implemented Interfaces:
bucket.core.persistence.ObjectDao, DraftDao, org.springframework.beans.factory.InitializingBean

public class HibernateDraftDao
extends com.atlassian.hibernate.HibernateObjectDao
implements DraftDao


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 findByCreatorName(java.lang.String creatorName)
           
 Draft getDraft(long draftId)
           
 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)
          remove a draft by matching its key (pageId, owner and type)
 void remove(long id)
          remove a draft by its id.
 void removeAll()
          Removes all drafts from the data repository associated with this dao
 void saveOrUpdate(Draft draft)
           
 void updateSpaceKey(java.lang.String newSpaceKey, java.lang.String oldSpaceKey)
           
 
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

log

public static final org.apache.log4j.Category log
Constructor Detail

HibernateDraftDao

public HibernateDraftDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao

saveOrUpdate

public void saveOrUpdate(Draft draft)
Specified by:
saveOrUpdate in interface DraftDao

getDraft

public Draft getDraft(java.lang.String pageId,
                      java.lang.String creatorName,
                      java.lang.String draftType)
Description copied from interface: DraftDao
Finds and returns a draft object with all the specified properties or null if none is found.

Specified by:
getDraft in interface DraftDao
Parameters:
pageId - the id of the page which this draft is associated with
creatorName - the owner of the draft
draftType - the type of draft (check the CONTENT_TYPE constant for the relevant ContentEntityObject being drafted)
Returns:
a draft object with all the specified properties or null if no valid draft could be found

getDraft

public Draft getDraft(long draftId)
Specified by:
getDraft in interface DraftDao

remove

public void remove(Draft draft)
Description copied from interface: DraftDao
remove a draft by matching its key (pageId, owner and type)

Specified by:
remove in interface DraftDao

remove

public void remove(long id)
Description copied from interface: DraftDao
remove a draft by its id.

Specified by:
remove in interface DraftDao

findByCreatorName

public java.util.List findByCreatorName(java.lang.String creatorName)
Specified by:
findByCreatorName in interface DraftDao

updateSpaceKey

public void updateSpaceKey(java.lang.String newSpaceKey,
                           java.lang.String oldSpaceKey)
Specified by:
updateSpaceKey in interface DraftDao

removeAll

public void removeAll()
Description copied from interface: DraftDao
Removes all drafts from the data repository associated with this dao

Specified by:
removeAll in interface DraftDao


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.