io.ebeaninternal.server.core.Persister Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.core;
import io.ebean.CallableSql;
import io.ebean.MergeOptions;
import io.ebean.Query;
import io.ebean.SqlUpdate;
import io.ebean.Transaction;
import io.ebean.Update;
import io.ebean.bean.EntityBean;
import io.ebean.meta.MetricVisitor;
import io.ebeaninternal.api.SpiSqlUpdate;
import io.ebeaninternal.api.SpiTransaction;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import java.util.Collection;
import java.util.List;
/**
* API for persisting a bean.
*/
public interface Persister {
/**
* Merge the bean.
*/
int merge(BeanDescriptor> desc, EntityBean entityBean, MergeOptions options, SpiTransaction transaction);
/**
* Update the bean.
*/
void update(EntityBean entityBean, Transaction t);
/**
* Update the bean specifying deleteMissingChildren.
*/
void update(EntityBean entityBean, Transaction t, boolean deleteMissingChildren);
/**
* Force an Insert using the given bean.
*/
void insert(EntityBean entityBean, Transaction t);
/**
* Insert or update the bean depending on its state.
*/
void save(EntityBean entityBean, Transaction t);
/**
* Delete a bean given it's type and id value.
*
* This will also cascade delete one level of children.
*
*/
int delete(Class> beanType, Object id, Transaction transaction, boolean permanent);
/**
* Delete the bean.
*/
int delete(EntityBean entityBean, Transaction t, boolean permanent);
/**
* Delete multiple beans given a collection of Id values.
*/
int deleteMany(Class> beanType, Collection> ids, Transaction transaction, boolean permanent);
/**
* Delete multiple beans when escalated from a delete query.
*/
int deleteByIds(BeanDescriptor> descriptor, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy