public interface EntityPersistenceRepository<E,PK extends Serializable> extends Deactivatable
| Modifier and Type | Method and Description |
|---|---|
void |
attachAndRemove(E entity)
Convenience access to
EntityManager.remove(Object)
with an detached entity. |
void |
flush()
Convenience access to
EntityManager.flush(). |
PK |
getPrimaryKey(E example)
Return the id of the entity.
|
void |
refresh(E entity)
Convenience access to
EntityManager.refresh(Object). |
void |
remove(E entity)
Convenience access to
EntityManager.remove(Object). |
void |
removeAndFlush(E entity)
Convenience access to
EntityManager.remove(Object)
with a following flush. |
E |
save(E entity)
Persist (new entity) or merge the given entity.
|
E |
saveAndFlush(E entity)
save(Object)s the given entity and flushes the persistence context afterwards. |
E |
saveAndFlushAndRefresh(E entity)
save(Object)s the given entity and flushes the persistence context afterwards,
followed by a refresh (e.g. to load DB trigger modifications). |
E save(E entity)
EntityManagerDelegate which offers both
persist and merge.entity - Entity to save.E saveAndFlush(E entity)
save(Object)s the given entity and flushes the persistence context afterwards.entity - Entity to save.E saveAndFlushAndRefresh(E entity)
save(Object)s the given entity and flushes the persistence context afterwards,
followed by a refresh (e.g. to load DB trigger modifications).entity - Entity to save.void remove(E entity)
EntityManager.remove(Object).entity - Entity to remove.void removeAndFlush(E entity)
EntityManager.remove(Object)
with a following flush.entity - Entity to remove.void attachAndRemove(E entity)
EntityManager.remove(Object)
with an detached entity.entity - Entity to remove.void refresh(E entity)
EntityManager.refresh(Object).entity - Entity to refresh.void flush()
EntityManager.flush().Copyright © 2018 The Apache Software Foundation. All rights reserved.