T - entity typepublic interface BambooObjectDao<T extends BambooObject>
BambooObjects| Modifier and Type | Method and Description |
|---|---|
<E extends T> |
countAll(Class<E> aClass)
Finds the count of all entities that implement the given Class
|
<E extends T> |
countWithRestriction(Class<E> aClass,
org.hibernate.criterion.Criterion restriction)
Finds the count of all entities that implement the given class and satisfy the provided restriction
|
void |
delete(T t)
Removes the given entity from the database
|
<E extends T> |
deleteAll(Collection<E> entities)
Remove all elements in the collection from database
|
<E extends T> |
findAll(Class<E> aClass)
Finds all the entities that implement the given
Class |
<E extends T> |
findById(long id,
Class<E> aClass)
Find an entity by its id
|
T |
merge(T unmanagedEntity,
Class<? extends T> entityClass)
Merges the state of the given unmanaged entity.
|
void |
save(T t)
Saves the given entity.
|
<E extends T> |
saveAll(Collection<E> entities)
Save all entities in the collection to the database
|
void save(@NotNull
T t)
EntityObject this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate() if the object has not been savedt - entity to be saved<E extends T> void saveAll(@NotNull Collection<E> entities)
entities - entities to be saved to database@NotNull T merge(@NotNull T unmanagedEntity, @NotNull Class<? extends T> entityClass)
This method should only be used with entities which are not currently managed by Hibernate, otherwise save(BambooObject) should be called.
If the entity implementation is an interface of EntityObject, the EntityObject.getCreationDate() and EntityObject.getLastModificationDate() properties will be updated
accordingly (the former only if a new database object is created).
unmanagedEntity - entity not managed by Hibernate to mergeentityClass - class of the entityvoid delete(@NotNull
T t)
t - entity to be removed<E extends T> void deleteAll(@NotNull Collection<E> entities)
entities - elements to be removed from database@NotNull <E extends T> Collection<E> findAll(@NotNull Class<E> aClass)
ClassaClass - class of entity<E extends T> long countAll(@NotNull Class<E> aClass)
<E extends T> long countWithRestriction(@NotNull Class<E> aClass, org.hibernate.criterion.Criterion restriction)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.