bucket.core.persistence
Interface ObjectDao

All Known Subinterfaces:
BlogPostDao, CommentDao, ContentDao, ContentEntityObjectDao, ContentPermissionDao, ContentPermissionSetDao, CustomContentDao, GlobalDescriptionDao, IndexQueueEntryDao, LabelDao, LinkDao, MailDao, NotificationDao, PageDao, PageTemplateDao, PersonalInformationDao, ReferralDao, SpaceDao, SpaceGroupDao, SpacePermissionDao, TrackbackDao, UserStatusDao, VersionedObjectDao, VersionHistoryDao
All Known Implementing Classes:
AbstractHibernateAttachmentDao, BodyContentHibernateDao, CachableHibernateObjectDao, CachingPageDao, CachingPersonalInformationDao, ConfluenceHibernateObjectDao, ContentEntityObjectHibernateDao, ContentPermissionHibernateDao, DefaultContentDao, DefaultGlobalDescriptionDao, GenericHibernateVersionedObjectDao, HibernateAbstractPageDao, HibernateAttachmentDataDao, HibernateBlogPostDao, HibernateCommentDao, HibernateContentPermissionSetDao, HibernateDraftDao, HibernateIndexQueueEntryDao, HibernateLabelDao, HibernateLikeEntityDao, HibernateLinkDao, HibernateMailDao, HibernateNotificationDao, HibernateObjectDao, HibernatePageDao, HibernatePageTemplateDao, HibernatePersonalInformationDao, HibernateReferralDao, HibernateSpaceDao, HibernateSpaceGroupDao, HibernateSpacePermissionDao, HibernateTrackbackDao, HibernateUserStatusDao, HibernateVersionHistoryDao, MigrationPageTemplateDao, NonTransactionalHibernateAttachmentDao, PluginContentHibernateDao, TransactionalHibernateAttachmentDao, VersionedHibernateObjectDao

public interface ObjectDao


Field Summary
static boolean NON_CACHEABLE
          Flag to mark whenever query is cacheable or not by hibernate
 
Method Summary
 List findAll()
          Find all objects currently persisted of a particular type.
 List findAllSorted(String sortField)
          Find all objects currently persisted of a particular type and sort results by named property.
 List findAllSorted(String sortField, boolean cacheable, int offset, int maxResultCount)
          Find all objects currently persisted of a particular type and sort results by named property.
 Class getPersistentClass()
           
 void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
          Refreshes the object again with the fresh data from db.
 void remove(com.atlassian.core.bean.EntityObject object)
          Remove object from persistence.
 void replicate(Object objectToReplicate)
          Replicate the object.
 void save(com.atlassian.core.bean.EntityObject objectToSave)
           
 void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
          saves the object.
 

Field Detail

NON_CACHEABLE

static final boolean NON_CACHEABLE
Flag to mark whenever query is cacheable or not by hibernate

See Also:
Constant Field Values
Method Detail

remove

void remove(com.atlassian.core.bean.EntityObject object)
Remove object from persistence.


refresh

void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
Refreshes the object again with the fresh data from db.


replicate

void replicate(Object objectToReplicate)
Replicate the object. Replication does not generate a new id if the object does not exist in database and it overwrites the database row if the object already exists in database.


findAll

List findAll()
Find all objects currently persisted of a particular type.


findAllSorted

List findAllSorted(String sortField)
Find all objects currently persisted of a particular type and sort results by named property.

Parameters:
sortField - the name of the property to be sorted on. This should be null if no sorting is required.

findAllSorted

List findAllSorted(String sortField,
                   boolean cacheable,
                   int offset,
                   int maxResultCount)
Find all objects currently persisted of a particular type and sort results by named property. This version of the method allows more control over the query.

Parameters:
sortField - the name of the property to be sorted on. This should be null if no sorting is required.
cacheable - control whether the results should be cached
offset - the index of the first result to be returned
maxResultCount - the maximum number of results required. Use -1 to specify no limit.

save

void save(com.atlassian.core.bean.EntityObject objectToSave)

getPersistentClass

Class getPersistentClass()

saveRaw

void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saves the object. if the object is new, this won't set the creation date on the object. if it already exists, then it won't set the date that it was updated.

Parameters:
objectToSave -


Copyright © 2003–2015 Atlassian. All rights reserved.