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 ofEntityObjectthis Dao works with.voidrefresh(com.atlassian.core.bean.EntityObject objectToRefresh)Deprecated.since 6.10.0.voidrefreshEntity(T objectToRefresh)Refreshes the object again with the fresh data from db.voidremove(com.atlassian.core.bean.EntityObject objectToRemove)Deprecated.since 6.10.0.voidremoveEntity(T objectToRemove)Remove object from persistence.voidreplicate(Object objectToReplicate)Deprecated.since 6.10.0.voidreplicateEntity(T objectToReplicate)Replicate the object.voidsave(com.atlassian.core.bean.EntityObject objectToSave)Deprecated.since 6.10.0.voidsaveEntity(T objectToSave)Saves the given object to the database.voidsaveRaw(com.atlassian.core.bean.EntityObject objectToSave)Deprecated.since 6.10.0.voidsaveRawEntity(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:ObjectDaoInternalRemove object from persistence.- Specified by:
removein interfaceObjectDao- Specified by:
removein interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
removeEntity
public void removeEntity(T objectToRemove)
Description copied from interface:ObjectDaoInternalRemove object from persistence.- Specified by:
removeEntityin 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:ObjectDaoInternalRefreshes the object again with the fresh data from db.- Specified by:
refreshin interfaceObjectDao- Specified by:
refreshin interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
refreshEntity
public void refreshEntity(T objectToRefresh)
Description copied from interface:ObjectDaoInternalRefreshes the object again with the fresh data from db.- Specified by:
refreshEntityin 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:ObjectDaoInternalReplicate 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:
replicatein interfaceObjectDao- Specified by:
replicatein interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
replicateEntity
public void replicateEntity(T objectToReplicate)
Description copied from interface:ObjectDaoInternalReplicate 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:
replicateEntityin interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
findAll
public @NonNull List<T> findAll()
Description copied from interface:ObjectDaoInternalFind all objects currently persisted of a particular type.- Specified by:
findAllin interfaceObjectDao- Specified by:
findAllin interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
findAllSorted
public @NonNull List<T> findAllSorted(String sortField)
Description copied from interface:ObjectDaoInternalFind all objects currently persisted of a particular type and sort results by named property.- Specified by:
findAllSortedin interfaceObjectDao- Specified by:
findAllSortedin 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:ObjectDaoInternalFind 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:
findAllSortedin interfaceObjectDao- Specified by:
findAllSortedin 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:ObjectDaoInternalFind a list of objects from the same persistent class.- Specified by:
findByClassIdsin interfaceObjectDao- Specified by:
findByClassIdsin 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:ObjectDaoInternalFind a list of objects from the same persistent class.- Specified by:
findByClassIdsFilteredin 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:
savein interfaceObjectDao- Specified by:
savein interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>
-
saveEntity
public void saveEntity(T objectToSave)
Description copied from interface:ObjectDaoInternalSaves the given object to the database.- Specified by:
saveEntityin interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>- Parameters:
objectToSave- the object to save.
-
getPersistentClass
public Class<T> getPersistentClass()
Description copied from interface:ObjectDaoInternalGets the type ofEntityObjectthis Dao works with.- Specified by:
getPersistentClassin interfaceObjectDao- Specified by:
getPersistentClassin 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:ObjectDaoInternalSaves 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:
saveRawin interfaceObjectDao- Specified by:
saveRawin interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>- Parameters:
objectToSave- the object to save.
-
saveRawEntity
public void saveRawEntity(T objectToSave)
Description copied from interface:ObjectDaoInternalSaves 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:
saveRawEntityin interfaceObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject>- Parameters:
objectToSave- the object to save.
-
-