- All Known Implementing Classes:
DefaultPersister
public interface Persister
API for persisting a bean.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch(SpiSqlUpdate sqlUpdate, SpiTransaction transaction) Add the statement to JDBC batch for later execution via executeBatch.voidaddToFlushQueue(SpiSqlUpdate update, SpiTransaction t, int pos) Queue the SqlUpdate for execution with position 0, 1 or 2 defining when it executes relative to the flush of beans .intdelete(EntityBean entityBean, Transaction t, boolean permanent) Delete the bean.intdelete(Class<?> beanType, Object id, Transaction transaction, boolean permanent) Delete a bean given it's type and id value.intdeleteByIds(BeanDescriptor<?> descriptor, List<Object> idList, Transaction transaction, boolean permanent) Delete multiple beans when escalated from a delete query.intdeleteMany(Class<?> beanType, Collection<?> ids, Transaction transaction, boolean permanent) Delete multiple beans given a collection of Id values.int[]executeBatch(SpiSqlUpdate sqlUpdate, SpiTransaction transaction) Execute the associated batched statement.intexecuteCallable(CallableSql callable, Transaction t) Execute the CallableSql.intexecuteOrmUpdate(Update<?> update, Transaction t) Execute the Update.voidexecuteOrQueue(SpiSqlUpdate update, SpiTransaction t, boolean queue, int queuePosition) Execute or queue the update.intexecuteSqlUpdate(SqlUpdate update, Transaction t) Execute the SqlUpdate (taking into account transaction batch mode).intexecuteSqlUpdateNow(SpiSqlUpdate update, Transaction t) Execute the SqlUpdate now regardless of transaction batch mode.voidinsert(EntityBean entityBean, InsertOptions insertOptions, Transaction t) Perform an Insert using the given bean.intmerge(BeanDescriptor<?> desc, EntityBean entityBean, MergeOptions options, SpiTransaction transaction) Merge the bean.voidsave(EntityBean entityBean, Transaction t) Insert or update the bean depending on its state.voidupdate(EntityBean entityBean, Transaction t) Update the bean.voidvisitMetrics(MetricVisitor visitor) Visit the metrics.
-
Method Details
-
merge
int merge(BeanDescriptor<?> desc, EntityBean entityBean, MergeOptions options, SpiTransaction transaction) Merge the bean. -
update
Update the bean. -
insert
Perform an Insert using the given bean. -
save
Insert or update the bean depending on its state. -
delete
Delete a bean given it's type and id value.This will also cascade delete one level of children.
-
delete
Delete the bean. -
deleteMany
Delete multiple beans given a collection of Id values. -
deleteByIds
int deleteByIds(BeanDescriptor<?> descriptor, List<Object> idList, Transaction transaction, boolean permanent) Delete multiple beans when escalated from a delete query. -
executeOrmUpdate
Execute the Update. -
executeSqlUpdate
Execute the SqlUpdate (taking into account transaction batch mode). -
executeSqlUpdateNow
Execute the SqlUpdate now regardless of transaction batch mode. -
executeCallable
Execute the CallableSql. -
visitMetrics
Visit the metrics. -
executeOrQueue
Execute or queue the update. -
addToFlushQueue
Queue the SqlUpdate for execution with position 0, 1 or 2 defining when it executes relative to the flush of beans . -
addBatch
Add the statement to JDBC batch for later execution via executeBatch. -
executeBatch
Execute the associated batched statement.
-