Interface ObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
- Type Parameters:
T
- The type of EntityObject this Dao works with.
- All Superinterfaces:
ObjectDao
- All Known Subinterfaces:
BlogPostDaoInternal
,CommentDaoInternal
,ContentDaoInternal
,ContentEntityObjectDaoInternal<T>
,ContentPermissionDaoInternal
,ContentPermissionSetDaoInternal
,GlobalDescriptionDaoInternal
,LabelDaoInternal
,LinkDaoInternal
,NotificationDaoInternal
,PageDaoInternal
,PersonalInformationDaoInternal
,SpaceDaoInternal
,VersionedObjectDaoInternal<T>
,VersionHistoryDaoInternal
- All Known Implementing Classes:
AbstractContentEntityObjectHibernateDao
,AbstractHibernateAttachmentDao
,CachingNotificationDao
,CachingVersionHistoryDao
,ConfluenceHibernateObjectDao
,ContentEntityObjectHibernateDao
,ContentPermissionHibernateDao
,DefaultContentDao
,DefaultGlobalDescriptionDao
,DelegatingNotificationDaoInternal
,DelegatingObjectDaoInternal
,DelegatingPageDao
,HibernateAbstractPageDao
,HibernateAlertEntityDao
,HibernateAttachmentDataDao
,HibernateAuditRecordDao
,HibernateBlogPostDao
,HibernateCommentDao
,HibernateContentPermissionSetDao
,HibernateDraftDao
,HibernateInternalRunDetailsDao
,HibernateLabelDao
,HibernateLinkDao
,HibernateNotificationDao
,HibernateObjectDao
,HibernatePageDao
,HibernatePageTemplateDao
,HibernatePersonalInformationDao
,HibernateSpaceDao
,HibernateSpacePermissionDao
,HibernateVersionHistoryDao
,HibernateZduStatusDao
,MigrationPageTemplateDao
,NonTransactionalHibernateAttachmentDao
,PluginContentHibernateDao
,ReadThroughCachingPageDao
,ReadThroughCachingPersonalInformationDao
,SchedulerClusteredJobDao
,SchedulerRunDetailsDao
,TransactionalHibernateAttachmentDao
,VersionedHibernateObjectDao
@Transactional(readOnly=true) public interface ObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject> extends ObjectDao
A Dao for EntityObjects.- Since:
- 6.10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NonNull List<T>
findAll()
Find all objects currently persisted of a particular type.@NonNull List<T>
findAllSorted(String sortField)
Find all objects currently persisted of a particular type and sort results by named property.@NonNull List<T>
findAllSorted(String sortField, boolean cacheable, int offset, int maxResultCount)
Find all objects currently persisted of a particular type and sort results by named property.<E> @NonNull PageResponse<E>
findByClassIds(Iterable<Long> ids, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super E> filter)
Deprecated.since 6.10.0.@NonNull PageResponse<T>
findByClassIdsFiltered(Iterable<Long> ids, LimitedRequest limitedRequest, Predicate<? super T> filter)
Find a list of objects from the same persistent class.Class<T>
getPersistentClass()
Gets the type ofEntityObject
this Dao works with.void
refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
Deprecated.since 6.10.0.void
refreshEntity(T objectToRefresh)
Refreshes the object again with the fresh data from db.void
remove(com.atlassian.core.bean.EntityObject objectToRemove)
Deprecated.since 6.10.0.void
removeEntity(T objectToRemove)
Remove object from persistence.void
replicate(Object objectToReplicate)
Deprecated.since 6.10.0.void
replicateEntity(T objectToReplicate)
Replicate the object.void
save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0.void
saveEntity(T objectToSave)
Saves the given object to the database.void
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0.void
saveRawEntity(T objectToSave)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.6
-
-
-
Method Detail
-
remove
@Deprecated @Transactional void remove(com.atlassian.core.bean.EntityObject objectToRemove)
Deprecated.since 6.10.0. UseremoveEntity(EntityObject)
instead.Remove object from persistence.
-
removeEntity
@Transactional void removeEntity(T objectToRemove)
Remove object from persistence.
-
refresh
@Deprecated @Transactional void refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
Deprecated.since 6.10.0. UserefreshEntity(EntityObject)
instead.Refreshes the object again with the fresh data from db.
-
refreshEntity
@Transactional void refreshEntity(T objectToRefresh)
Refreshes the object again with the fresh data from db.
-
replicate
@Deprecated @Transactional void replicate(Object objectToReplicate)
Deprecated.since 6.10.0. UsereplicateEntity(EntityObject)
instead.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.
-
replicateEntity
@Transactional void replicateEntity(T 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.
-
findAllSorted
@NonNull List<T> findAllSorted(String sortField)
Find all objects currently persisted of a particular type and sort results by named property.- Specified by:
findAllSorted
in interfaceObjectDao
- Parameters:
sortField
- the name of the property to be sorted on. This should be null if no sorting is required.
-
findAllSorted
@NonNull List<T> 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.- Specified by:
findAllSorted
in interfaceObjectDao
- 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 cachedoffset
- the index of the first result to be returnedmaxResultCount
- the maximum number of results required. Use -1 to specify no limit.
-
findByClassIds
@Deprecated <E> @NonNull PageResponse<E> findByClassIds(Iterable<Long> ids, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super E> filter)
Deprecated.since 6.10.0. UsefindByClassIdsFiltered(Iterable, LimitedRequest, Predicate)
instead.Find a list of objects from the same persistent class.- Specified by:
findByClassIds
in interfaceObjectDao
- Type Parameters:
E
- the type of entity to return- Parameters:
ids
- - the ids of the entities to findlimitedRequest
- the pagination request defining the page size to fetchfilter
- a predicate to do in memory filtering of the result set before returning- Returns:
- a list of objects matching the filters
-
findByClassIdsFiltered
@NonNull PageResponse<T> findByClassIdsFiltered(Iterable<Long> ids, LimitedRequest limitedRequest, Predicate<? super T> filter)
Find a list of objects from the same persistent class.- Parameters:
ids
- - the ids of the entities to findlimitedRequest
- the pagination request defining the page size to fetchfilter
- a predicate to do in memory filtering of the result set before returning- Returns:
- a list of objects matching the filters
-
save
@Deprecated @Transactional void save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveEntity(EntityObject)
instead.
-
saveEntity
@Transactional void saveEntity(T objectToSave)
Saves the given object to the database.- Parameters:
objectToSave
- the object to save.
-
getPersistentClass
@Transactional(readOnly=true, propagation=SUPPORTS) Class<T> getPersistentClass()
Gets the type ofEntityObject
this Dao works with.- Specified by:
getPersistentClass
in interfaceObjectDao
- Returns:
- the type
-
saveRaw
@Deprecated @Transactional void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveRawEntity(EntityObject)
instead.Saves the object without updating modification data.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.
-
saveRawEntity
@Transactional @Deprecated(forRemoval=true) void saveRawEntity(T objectToSave)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.6Saves the object without updating modification daa.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
- the object to save.
-
-