Interface ConfluenceBandanaRecordDao
- All Known Implementing Classes:
HibernateConfluenceBandanaRecordDao
public interface ConfluenceBandanaRecordDao
Interface for DAOs which handle persistence of ConfluenceBandanaRecord instances.
-
Method Summary
Modifier and TypeMethodDescriptionlongcountWithKey(String key) Count entry in DB which have particular key.findAllWithKey(String key) Returns all records that have a certain key, regardless of context.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.
-
Method Details
-
saveOrUpdate
Save the record, updating it if it already exists.- Parameters:
record- the ConfluenceBandanaRecord to update
-
getRecord
Retrieve a record for the given key, return null if no record exists- Parameters:
context-key-- Returns:
- the matching record, or null
-
remove
Remove a record by matching its key (context, key)- Parameters:
record-
-
removeAllInContext
Remove all the records belonging to the given context- Parameters:
context-
-
findForContext
Return all the records for the given context. Returns an empty collection if no records are found. -
findKeysForContext
Returns all keys for the given context. -
countWithKey
Count entry in DB which have particular key. It could help to determine how big the data is- Parameters:
key-- Returns:
- number of record in DB
-
findAllWithKey
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.- Parameters:
key- the bandana key to look up
-