T
- The type of EntityObject this Dao works with.public interface ObjectDaoInternal<T extends com.atlassian.core.bean.EntityObject> extends ObjectDao
Modifier and Type | Method and 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. Use
findByClassIdsFiltered(Iterable, LimitedRequest, Predicate) instead. |
@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 of
EntityObject this Dao works with. |
void |
refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
Deprecated.
since 6.10.0. Use
refreshEntity(EntityObject) instead. |
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. Use
removeEntity(EntityObject) instead. |
void |
removeEntity(T objectToRemove)
Remove object from persistence.
|
void |
replicate(Object objectToReplicate)
Deprecated.
since 6.10.0. Use
replicateEntity(EntityObject) instead. |
void |
replicateEntity(T objectToReplicate)
Replicate the object.
|
void |
save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.
since 6.10.0. Use
saveEntity(EntityObject) instead. |
void |
saveEntity(T objectToSave)
Saves the given object to the database.
|
void |
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.
since 6.10.0. Use
saveRawEntity(EntityObject) instead. |
void |
saveRawEntity(T objectToSave)
Saves the object without updating modification daa.
|
@Deprecated void remove(com.atlassian.core.bean.EntityObject objectToRemove)
removeEntity(EntityObject)
instead.void removeEntity(T objectToRemove)
@Deprecated void refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
refreshEntity(EntityObject)
instead.void refreshEntity(T objectToRefresh)
@Deprecated void replicate(Object objectToReplicate)
replicateEntity(EntityObject)
instead.void replicateEntity(T objectToReplicate)
@NonNull List<T> findAllSorted(String sortField)
findAllSorted
in interface ObjectDao
sortField
- the name of the property to be sorted on. This should be null if no sorting is required.@NonNull List<T> findAllSorted(String sortField, boolean cacheable, int offset, int maxResultCount)
findAllSorted
in interface ObjectDao
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.@Deprecated <E> @NonNull PageResponse<E> findByClassIds(Iterable<Long> ids, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super E> filter)
findByClassIdsFiltered(Iterable, LimitedRequest, Predicate)
instead.findByClassIds
in interface ObjectDao
E
- the type of entity to returnids
- - 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@NonNull PageResponse<T> findByClassIdsFiltered(Iterable<Long> ids, LimitedRequest limitedRequest, Predicate<? super T> filter)
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@Deprecated void save(com.atlassian.core.bean.EntityObject objectToSave)
saveEntity(EntityObject)
instead.void saveEntity(T objectToSave)
objectToSave
- the object to save.Class<T> getPersistentClass()
EntityObject
this Dao works with.getPersistentClass
in interface ObjectDao
@Deprecated void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saveRawEntity(EntityObject)
instead.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.
void saveRawEntity(T objectToSave)
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.
objectToSave
- the object to save.Copyright © 2003–2020 Atlassian. All rights reserved.