T
- Type of the entity this dao is for.public interface HibernateDao<T extends Serializable>
Modifier and Type | Method and Description |
---|---|
Collection<T> |
create(Collection<T> entities)
Creates all given entities within the database.
|
T |
create(T entity)
Creates a new entity within the database.
|
void |
evict(T entity)
See HibernateTemplate#evit
|
T |
load(Long id)
Loads the requested entity.
|
Collection<T> |
loadAll()
Loads all entities.
|
void |
remove(Collection<T> entities)
Removes all given entities.
|
void |
remove(Long id)
Removes the given entity.
|
void |
remove(T entity)
Removes the given entity.
|
void |
update(Collection<T> entities)
Updates all given entities.
|
void |
update(T entity)
Updates the given entity.
|
Collection<T> loadAll()
T load(Long id)
id
- Id of the entity to load.T create(T entity)
entity
- The entity to create.Collection<T> create(Collection<T> entities)
entities
- The entities to create.void update(T entity)
entity
- The entity to update.void update(Collection<T> entities)
entities
- The entities to update.void remove(T entity)
entity
- The entity to remove.void remove(Long id)
id
- Id of the entity to remove.void remove(Collection<T> entities)
entities
- Collection of entities to remove.void evict(T entity)
entity
- The entity to evict.Copyright © 2019 Communote team. All rights reserved.