public interface CrudWriteService
| Modifier and Type | Method and Description |
|---|---|
int |
batchDelete(Collection<? extends EntityInterface> entities,
Integer flushCount)
save multiple entities, NOTE that normally only after commit or flush
entitymanagers will reflect changes caused by saving all entities, this
may cause entitylisteners to fail.
|
<T extends EntityInterface> |
batchSave(Collection<T> entities,
Integer flushCount)
save multiple entities, NOTE that normally only after commit or flush
entitymanagers will reflect changes caused by saving all entities, this
may cause entitylisteners to fail.
|
<T> T |
create(T t) |
void |
delete(EntityInterface t) |
javax.persistence.EntityManager |
getEntityManager() |
<T> T |
refresh(T t)
refresh an entity from the database
|
<T extends EntityInterface> |
save(T t)
create or update depending on
EntityInterface.isTransient(). |
<T> T |
update(T t) |
<T> T create(T t)
<T> T update(T t)
<T extends EntityInterface> T save(T t)
EntityInterface.isTransient().T - t - void delete(EntityInterface t)
<T> T refresh(T t)
T - t - <T extends EntityInterface> Stream<T> batchSave(Collection<T> entities, Integer flushCount)
Transactional.TxType on the bean that you use in your listeners,
use isolation level 0 (not recommended) or use XA when you need to access
resources from your listeners. When flushCount != null flushes and clears
the entitymanager every flushCount entities. NOTE that this method
executes in one (possibly big) sql transaction! You can use
EntityException in for example your listeners to find out in case
of failure which enitity caused it.entities - flushCount - when not null try to optimize (flush/clear) every so
many entitiesUtil.getBean(Class, Annotation...)int batchDelete(Collection<? extends EntityInterface> entities, Integer flushCount)
Transactional.TxType on the bean that you use in your listeners,
use isolation level 0 (not recommended) or use XA when you need to access
resources from your listeners. When flushCount != null flushes and clears
the entitymanager every flushCount entities. NOTE that this method
executes in one (possibly big) sql transaction! You can use
EntityException in for example your listeners to find out in case
of failure which enitity caused it.entities - flushCount - when not null try to optimize (flush/clear) every so
many entitiesUtil.getBean(Class, Annotation...)javax.persistence.EntityManager getEntityManager()
Copyright © 2018–2021 Fryske Akademy. All rights reserved.