com.atlassian.confluence.setup.bandana.persistence.dao.hibernate
Class HibernateConfluenceBandanaRecordDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.confluence.setup.bandana.persistence.dao.hibernate.HibernateConfluenceBandanaRecordDao
All Implemented Interfaces:
ConfluenceBandanaRecordDao, org.springframework.beans.factory.InitializingBean

public class HibernateConfluenceBandanaRecordDao
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements ConfluenceBandanaRecordDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateConfluenceBandanaRecordDao()
           
 
Method Summary
 Iterable<ConfluenceBandanaRecord> findAllWithKey(String key)
          Returns all records that have a certain key, regardless of context.
 Collection findForContext(String context)
          Return all the records for the given context.
 Iterable<String> findKeysForContext(String context)
          Returns all keys for the given context.
 ConfluenceBandanaRecord getRecord(String context, String key)
          Retrieve a record for the given key, return null if no record exists
 void remove(ConfluenceBandanaRecord record)
          Remove a record by matching its key (context, key)
 void removeAllInContext(String context)
          Remove all the records belonging to the given context
 void saveOrUpdate(ConfluenceBandanaRecord record)
          Save the record, updating it if it already exists.
 
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
 

Constructor Detail

HibernateConfluenceBandanaRecordDao

public HibernateConfluenceBandanaRecordDao()
Method Detail

saveOrUpdate

public void saveOrUpdate(ConfluenceBandanaRecord record)
Description copied from interface: ConfluenceBandanaRecordDao
Save the record, updating it if it already exists.

Specified by:
saveOrUpdate in interface ConfluenceBandanaRecordDao
Parameters:
record - the ConfluenceBandanaRecord to update

getRecord

public ConfluenceBandanaRecord getRecord(String context,
                                         String key)
Description copied from interface: ConfluenceBandanaRecordDao
Retrieve a record for the given key, return null if no record exists

Specified by:
getRecord in interface ConfluenceBandanaRecordDao
Returns:
the matching record, or null

remove

public void remove(ConfluenceBandanaRecord record)
Description copied from interface: ConfluenceBandanaRecordDao
Remove a record by matching its key (context, key)

Specified by:
remove in interface ConfluenceBandanaRecordDao

removeAllInContext

public void removeAllInContext(String context)
Description copied from interface: ConfluenceBandanaRecordDao
Remove all the records belonging to the given context

Specified by:
removeAllInContext in interface ConfluenceBandanaRecordDao

findForContext

public Collection findForContext(String context)
Description copied from interface: ConfluenceBandanaRecordDao
Return all the records for the given context. Returns an empty collection if no records are found.

Specified by:
findForContext in interface ConfluenceBandanaRecordDao

findKeysForContext

public Iterable<String> findKeysForContext(String context)
Description copied from interface: ConfluenceBandanaRecordDao
Returns all keys for the given context.

Specified by:
findKeysForContext in interface ConfluenceBandanaRecordDao

findAllWithKey

public Iterable<ConfluenceBandanaRecord> findAllWithKey(String key)
Description copied from interface: ConfluenceBandanaRecordDao
Returns all records that have a certain key, regardless of context. Calling this method is likely to be inefficient, and shouldn't be used unnecessarily.

Specified by:
findAllWithKey in interface ConfluenceBandanaRecordDao
Parameters:
key - the bandana key to look up


Copyright © 2003-2013 Atlassian. All Rights Reserved.