Class DelegatingObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- java.lang.Object
-
- com.atlassian.confluence.internal.persistence.DelegatingObjectDaoInternal<T>
-
- Type Parameters:
T
- the type of EntityObject
- All Implemented Interfaces:
ObjectDao
,ObjectDaoInternal<T>
- Direct Known Subclasses:
CachingVersionHistoryDao
,DelegatingNotificationDaoInternal
,ReadThroughCachingPersonalInformationDao
public class DelegatingObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject> extends Object implements ObjectDaoInternal<T>
Delegating Dao for EntityObjects.- Since:
- 6.10.0
-
-
Constructor Summary
Constructors Constructor Description DelegatingObjectDaoInternal(ObjectDaoInternal<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete 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)
Saves the object without updating modification daa.
-
-
-
Constructor Detail
-
DelegatingObjectDaoInternal
public DelegatingObjectDaoInternal(ObjectDaoInternal<T> delegate)
-
-
Method Detail
-
remove
@Deprecated public void remove(com.atlassian.core.bean.EntityObject objectToRemove)
Deprecated.since 6.10.0. UseremoveEntity(EntityObject)
instead.Description copied from interface:ObjectDaoInternal
Remove object from persistence.- Specified by:
remove
in interfaceObjectDao
- Specified by:
remove
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
removeEntity
public void removeEntity(T objectToRemove)
Description copied from interface:ObjectDaoInternal
Remove object from persistence.- Specified by:
removeEntity
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
refresh
@Deprecated public void refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
Deprecated.since 6.10.0. UserefreshEntity(EntityObject)
instead.Description copied from interface:ObjectDaoInternal
Refreshes the object again with the fresh data from db.- Specified by:
refresh
in interfaceObjectDao
- Specified by:
refresh
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
refreshEntity
public void refreshEntity(T objectToRefresh)
Description copied from interface:ObjectDaoInternal
Refreshes the object again with the fresh data from db.- Specified by:
refreshEntity
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
replicate
@Deprecated public void replicate(Object objectToReplicate)
Deprecated.since 6.10.0. UsereplicateEntity(EntityObject)
instead.Description copied from interface:ObjectDaoInternal
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.- Specified by:
replicate
in interfaceObjectDao
- Specified by:
replicate
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
replicateEntity
public void replicateEntity(T objectToReplicate)
Description copied from interface:ObjectDaoInternal
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.- Specified by:
replicateEntity
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
findAll
public @NonNull List<T> findAll()
Description copied from interface:ObjectDaoInternal
Find all objects currently persisted of a particular type.- Specified by:
findAll
in interfaceObjectDao
- Specified by:
findAll
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
findAllSorted
public @NonNull List<T> findAllSorted(String sortField)
Description copied from interface:ObjectDaoInternal
Find all objects currently persisted of a particular type and sort results by named property.- Specified by:
findAllSorted
in interfaceObjectDao
- Specified by:
findAllSorted
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- Parameters:
sortField
- the name of the property to be sorted on. This should be null if no sorting is required.
-
findAllSorted
public @NonNull List<T> findAllSorted(String sortField, boolean cacheable, int offset, int maxResultCount)
Description copied from interface:ObjectDaoInternal
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
- Specified by:
findAllSorted
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- 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 public <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.Description copied from interface:ObjectDaoInternal
Find a list of objects from the same persistent class.- Specified by:
findByClassIds
in interfaceObjectDao
- Specified by:
findByClassIds
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- 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
public @NonNull PageResponse<T> findByClassIdsFiltered(Iterable<Long> ids, LimitedRequest limitedRequest, Predicate<? super T> filter)
Description copied from interface:ObjectDaoInternal
Find a list of objects from the same persistent class.- Specified by:
findByClassIdsFiltered
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- 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 public void save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveEntity(EntityObject)
instead.- Specified by:
save
in interfaceObjectDao
- Specified by:
save
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
saveEntity
public void saveEntity(T objectToSave)
Description copied from interface:ObjectDaoInternal
Saves the given object to the database.- Specified by:
saveEntity
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- Parameters:
objectToSave
- the object to save.
-
getPersistentClass
public Class<T> getPersistentClass()
Description copied from interface:ObjectDaoInternal
Gets the type ofEntityObject
this Dao works with.- Specified by:
getPersistentClass
in interfaceObjectDao
- Specified by:
getPersistentClass
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- Returns:
- the type
-
saveRaw
@Deprecated public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveRawEntity(EntityObject)
instead.Description copied from interface:ObjectDaoInternal
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.
- Specified by:
saveRaw
in interfaceObjectDao
- Specified by:
saveRaw
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- Parameters:
objectToSave
- the object to save.
-
saveRawEntity
public void saveRawEntity(T objectToSave)
Description copied from interface:ObjectDaoInternal
Saves 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.
- Specified by:
saveRawEntity
in interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
- Parameters:
objectToSave
- the object to save.
-
-