public interface CrudWriteService extends Serializable
| 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 extends Serializable> |
create(T t) |
void |
delete(EntityInterface t) |
<T extends EntityInterface> |
save(T t)
create or update depending on
EntityInterface.isTransient(). |
<T extends Serializable> |
update(T t) |
<T extends Serializable> T create(T t)
<T extends Serializable> T update(T t)
<T extends EntityInterface> T save(T t)
EntityInterface.isTransient().T - t - void delete(EntityInterface 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(java.lang.Class,
javax.enterprise.inject.spi.BeanManager,
java.lang.annotation.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(java.lang.Class,
javax.enterprise.inject.spi.BeanManager,
java.lang.annotation.Annotation...)Copyright © 2018 Fryske Akademy. All rights reserved.