Interface Persister
- 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(io.ebean.bean.EntityBean entityBean, io.ebean.Transaction t, boolean permanent) Delete the bean.intDelete a bean given it's type and id value.intdeleteByIds(BeanDescriptor<?> descriptor, List<Object> idList, io.ebean.Transaction transaction, boolean permanent) Delete multiple beans when escalated from a delete query.intdeleteMany(Class<?> beanType, Collection<?> ids, io.ebean.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(io.ebean.CallableSql callable, io.ebean.Transaction t) Execute the CallableSql.intexecuteOrmUpdate(io.ebean.Update<?> update, io.ebean.Transaction t) Execute the Update.voidexecuteOrQueue(SpiSqlUpdate update, SpiTransaction t, boolean queue, int queuePosition) Execute or queue the update.intexecuteSqlUpdate(io.ebean.SqlUpdate update, io.ebean.Transaction t) Execute the SqlUpdate (taking into account transaction batch mode).intexecuteSqlUpdateNow(SpiSqlUpdate update, io.ebean.Transaction t) Execute the SqlUpdate now regardless of transaction batch mode.voidinsert(io.ebean.bean.EntityBean entityBean, @Nullable io.ebean.InsertOptions insertOptions, @Nullable io.ebean.Transaction t) Perform an Insert using the given bean.intmerge(BeanDescriptor<?> desc, io.ebean.bean.EntityBean entityBean, io.ebean.MergeOptions options, SpiTransaction transaction) Merge the bean.voidsave(io.ebean.bean.EntityBean entityBean, io.ebean.Transaction t) Insert or update the bean depending on its state.voidupdate(io.ebean.bean.EntityBean entityBean, io.ebean.Transaction t) Update the bean.voidvisitMetrics(io.ebean.meta.MetricVisitor visitor) Visit the metrics.
-
Method Details
-
merge
int merge(BeanDescriptor<?> desc, io.ebean.bean.EntityBean entityBean, io.ebean.MergeOptions options, SpiTransaction transaction) Merge the bean. -
update
void update(io.ebean.bean.EntityBean entityBean, io.ebean.Transaction t) Update the bean. -
insert
void insert(io.ebean.bean.EntityBean entityBean, @Nullable io.ebean.InsertOptions insertOptions, @Nullable io.ebean.Transaction t) Perform an Insert using the given bean. -
save
void save(io.ebean.bean.EntityBean entityBean, io.ebean.Transaction t) Insert or update the bean depending on its state. -
delete
-
delete
int delete(io.ebean.bean.EntityBean entityBean, io.ebean.Transaction t, boolean permanent) Delete the bean. -
deleteMany
int deleteMany(Class<?> beanType, Collection<?> ids, io.ebean.Transaction transaction, boolean permanent) Delete multiple beans given a collection of Id values. -
deleteByIds
int deleteByIds(BeanDescriptor<?> descriptor, List<Object> idList, io.ebean.Transaction transaction, boolean permanent) Delete multiple beans when escalated from a delete query. -
executeOrmUpdate
int executeOrmUpdate(io.ebean.Update<?> update, io.ebean.Transaction t) Execute the Update. -
executeSqlUpdate
int executeSqlUpdate(io.ebean.SqlUpdate update, io.ebean.Transaction t) Execute the SqlUpdate (taking into account transaction batch mode). -
executeSqlUpdateNow
Execute the SqlUpdate now regardless of transaction batch mode. -
executeCallable
int executeCallable(io.ebean.CallableSql callable, io.ebean.Transaction t) Execute the CallableSql. -
visitMetrics
void visitMetrics(io.ebean.meta.MetricVisitor visitor) 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.
-