Class HibernateConfluenceBandanaRecordDao
java.lang.Object
com.atlassian.confluence.impl.bandana.HibernateConfluenceBandanaRecordDao
- All Implemented Interfaces:
ConfluenceBandanaRecordDao
@ReturnValuesAreNullableByDefault
public class HibernateConfluenceBandanaRecordDao
extends Object
implements ConfluenceBandanaRecordDao
-
Constructor Summary
ConstructorsConstructorDescriptionHibernateConfluenceBandanaRecordDao(org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionlongcountWithKey(String key) Count entry in DB which have particular key.findForContext(String context) Return all the records for the given context.findKeysForContext(String context) Returns all keys for the given context.Retrieve a record for the given key, return null if no record existsvoidremove(ConfluenceBandanaRecord record) Remove a record by matching its key (context, key)voidremoveAllInContext(String context) Remove all the records belonging to the given contextvoidsaveOrUpdate(ConfluenceBandanaRecord record) Save the record, updating it if it already exists.
-
Constructor Details
-
HibernateConfluenceBandanaRecordDao
public HibernateConfluenceBandanaRecordDao(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
saveOrUpdate
Description copied from interface:ConfluenceBandanaRecordDaoSave the record, updating it if it already exists.- Specified by:
saveOrUpdatein interfaceConfluenceBandanaRecordDao- Parameters:
record- the ConfluenceBandanaRecord to update
-
getRecord
Description copied from interface:ConfluenceBandanaRecordDaoRetrieve a record for the given key, return null if no record exists- Specified by:
getRecordin interfaceConfluenceBandanaRecordDao- Parameters:
context-key-- Returns:
- the matching record, or null
-
remove
Description copied from interface:ConfluenceBandanaRecordDaoRemove a record by matching its key (context, key)- Specified by:
removein interfaceConfluenceBandanaRecordDao- Parameters:
record-
-
removeAllInContext
Description copied from interface:ConfluenceBandanaRecordDaoRemove all the records belonging to the given context- Specified by:
removeAllInContextin interfaceConfluenceBandanaRecordDao- Parameters:
context-
-
findForContext
Description copied from interface:ConfluenceBandanaRecordDaoReturn all the records for the given context. Returns an empty collection if no records are found.- Specified by:
findForContextin interfaceConfluenceBandanaRecordDao
-
findKeysForContext
Description copied from interface:ConfluenceBandanaRecordDaoReturns all keys for the given context.- Specified by:
findKeysForContextin interfaceConfluenceBandanaRecordDao
-
countWithKey
Description copied from interface:ConfluenceBandanaRecordDaoCount entry in DB which have particular key. It could help to determine how big the data is- Specified by:
countWithKeyin interfaceConfluenceBandanaRecordDao- Parameters:
key-- Returns:
- number of record in DB
-