#210 - ENH: Add Query.setLazyLoadBatch(int size) method ... for per query control

This commit is contained in:
rbygrave
2014-11-26 20:13:30 +13:00
parent 1cd31e13b9
commit 478053263f
18 changed files with 239 additions and 112 deletions
@@ -27,7 +27,7 @@ import com.avaje.ebeaninternal.server.querydefn.OrmQueryProperties;
*/
public interface SpiQuery<T> extends Query<T> {
public enum Mode {
public enum Mode {
NORMAL(false), LAZYLOAD_MANY(false), LAZYLOAD_BEAN(true), REFRESH_BEAN(true);
Mode(boolean loadContextBean) {
this.loadContextBean = loadContextBean;
@@ -89,6 +89,11 @@ public interface SpiQuery<T> extends Query<T> {
*/
public PersistenceContextScope getPersistenceContextScope();
/**
* Return the default lazy load batch size.
*/
public int getLazyLoadBatchSize();
/**
* Return true if select all properties was used to ensure the property
* invoking a lazy load was included in the query.