mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
67 lines
1.5 KiB
Java
67 lines
1.5 KiB
Java
package com.avaje.ebeaninternal.api;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
import com.avaje.ebean.annotation.ConcurrencyMode;
|
|
import com.avaje.ebean.bean.EntityBean;
|
|
import com.avaje.ebeaninternal.server.persist.dml.DmlHandler;
|
|
import com.avaje.ebeaninternal.server.persist.dmlbind.Bindable;
|
|
|
|
/**
|
|
* A plan for executing bean updates for a given set of changed properties.
|
|
* <p>
|
|
* This is a cachable plan with the purpose of being being able to skip some
|
|
* phases of the update bean processing.
|
|
* </p>
|
|
* <p>
|
|
* The plans are cached by the BeanDescriptors.
|
|
* </>
|
|
*/
|
|
public interface SpiUpdatePlan {
|
|
|
|
/**
|
|
* Return true if the set clause has no columns.
|
|
* <p>
|
|
* Can occur when the only columns updated have a updatable=false in their
|
|
* deployment.
|
|
* </p>
|
|
*/
|
|
boolean isEmptySetClause();
|
|
|
|
/**
|
|
* 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 bindSet(DmlHandler bind, EntityBean bean) throws SQLException;
|
|
|
|
/**
|
|
* Return the time this plan was created.
|
|
*/
|
|
long getTimeCreated();
|
|
|
|
/**
|
|
* Return the time this plan was last used.
|
|
*/
|
|
Long getTimeLastUsed();
|
|
|
|
/**
|
|
* Return the hash key for this plan.
|
|
*/
|
|
Integer getKey();
|
|
|
|
/**
|
|
* Return the concurrency mode for this plan.
|
|
*/
|
|
ConcurrencyMode getMode();
|
|
|
|
/**
|
|
* Return the update SQL statement.
|
|
*/
|
|
String getSql();
|
|
|
|
/**
|
|
* Return the set of bindable update properties.
|
|
*/
|
|
Bindable getSet();
|
|
|
|
} |