io.ebeaninternal.server.persist.dmlbind.Bindable 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.persist.dmlbind;
import io.ebean.bean.EntityBean;
import io.ebeaninternal.server.core.PersistRequestBean;
import io.ebeaninternal.server.persist.dml.GenerateDmlRequest;
import java.sql.SQLException;
import java.util.List;
/**
* Item held by Meta objects used to generate and bind bean insert update and
* delete statements.
*
* An implementation is expected to be immutable and thread safe.
*
*
* The design is to take a bean structure with embedded and associated objects
* etc and flatten that into lists of Bindable objects. These are put into
* InsertMeta UpdateMeta and DeleteMeta objects to support the generation of DML
* and binding of statements in a fast and painless manor.
*
*/
public interface Bindable {
/**
* For Updates including only changed properties add the Bindable to the
* list if it should be included in the 'update set'.
*/
void addToUpdate(PersistRequestBean> request, List list);
/**
* append sql to the buffer with prefix and suffix options.
*/
void dmlAppend(GenerateDmlRequest request);
/**
* Bind given the request and bean. The bean could be the oldValues bean
* when binding a update or delete where clause with ALL concurrency mode.
*/
void dmlBind(BindableRequest request, EntityBean bean) throws SQLException;
/**
* Return true if the underlying property is 'draft only'.
*/
boolean isDraftOnly();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy