T
- Entity type that this Repository handlesID
- The type that identifies the ID column for the supported entity typepublic interface BaseRepository<T extends Serializable,ID extends Serializable> extends SearchRepository<T,ID>
Modifier and Type | Method and Description |
---|---|
T |
evict(T entity)
Evicts the supplied entity from the session.
|
void |
flush()
Synchronises the state of EntityManager for this repository with the database
|
void |
lock(T entity,
javax.persistence.LockModeType lockMode)
Lock an entity instance that is contained in the persistence context with the specified lock
mode type.
|
T |
persist(T entity)
Persists the given entity.
|
T |
refresh(T entity)
Refresh the supplied entity from the database, overriding its state where changed.
|
void |
remove(ID entityId)
Removes the given entity from the database, cascading as appropriate.
|
clear, findById
T persist(T entity)
entity
- The entity to be persistedvoid remove(ID entityId)
entityId
- The ID for the entity to be removedT refresh(T entity)
entity
- The entity to be refreshed.T evict(T entity)
entity
- The entity to be evicted.void flush()
Copyright © 2010–2018 Jadira Systems. All rights reserved.