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 TypeMethodDescriptionlong
countWithKey
(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 existsvoid
remove
(ConfluenceBandanaRecord record) Remove a record by matching its key (context, key)void
removeAllInContext
(String context) Remove all the records belonging to the given contextvoid
saveOrUpdate
(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:ConfluenceBandanaRecordDao
Save the record, updating it if it already exists.- Specified by:
saveOrUpdate
in interfaceConfluenceBandanaRecordDao
- Parameters:
record
- the ConfluenceBandanaRecord to update
-
getRecord
Description copied from interface:ConfluenceBandanaRecordDao
Retrieve a record for the given key, return null if no record exists- Specified by:
getRecord
in interfaceConfluenceBandanaRecordDao
- Parameters:
context
-key
-- Returns:
- the matching record, or null
-
remove
Description copied from interface:ConfluenceBandanaRecordDao
Remove a record by matching its key (context, key)- Specified by:
remove
in interfaceConfluenceBandanaRecordDao
- Parameters:
record
-
-
removeAllInContext
Description copied from interface:ConfluenceBandanaRecordDao
Remove all the records belonging to the given context- Specified by:
removeAllInContext
in interfaceConfluenceBandanaRecordDao
- Parameters:
context
-
-
findForContext
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 interfaceConfluenceBandanaRecordDao
-
findKeysForContext
Description copied from interface:ConfluenceBandanaRecordDao
Returns all keys for the given context.- Specified by:
findKeysForContext
in interfaceConfluenceBandanaRecordDao
-
countWithKey
Description copied from interface:ConfluenceBandanaRecordDao
Count entry in DB which have particular key. It could help to determine how big the data is- Specified by:
countWithKey
in interfaceConfluenceBandanaRecordDao
- Parameters:
key
-- Returns:
- number of record in DB
-