mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
WIP - rename EntityBeanIntercept lazy loading property methods
This commit is contained in:
@@ -494,13 +494,16 @@ public final class EntityBeanIntercept implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the property read or write that triggered the lazy load.
|
||||
* Return the index of the property that triggered the lazy load.
|
||||
*/
|
||||
public int getLazyLoadProperty() {
|
||||
public int getLazyLoadPropertyIndex() {
|
||||
return lazyLoadProperty;
|
||||
}
|
||||
|
||||
public String getLazyLoadProp() {
|
||||
/**
|
||||
* Return the property that triggered the lazy load.
|
||||
*/
|
||||
public String getLazyLoadProperty() {
|
||||
return getProperty(lazyLoadProperty);
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ public class DefaultBeanLoader {
|
||||
|
||||
SpiQuery<?> query = (SpiQuery<?>) server.createQuery(desc.getBeanType());
|
||||
if (ebi != null) {
|
||||
query.setLazyLoadProperty(ebi.getLazyLoadProp());
|
||||
query.setLazyLoadProperty(ebi.getLazyLoadProperty());
|
||||
}
|
||||
|
||||
// don't collect autoFetch usage profiling information
|
||||
|
||||
@@ -1108,7 +1108,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
|
||||
if (cacheData == null) {
|
||||
return false;
|
||||
}
|
||||
int lazyLoadProperty = ebi.getLazyLoadProperty();
|
||||
int lazyLoadProperty = ebi.getLazyLoadPropertyIndex();
|
||||
if (lazyLoadProperty > -1 && !cacheData.containsProperty(lazyLoadProperty)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1586,7 +1586,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
|
||||
*/
|
||||
public boolean lazyLoadMany(EntityBeanIntercept ebi) {
|
||||
|
||||
int lazyLoadProperty = ebi.getLazyLoadProperty();
|
||||
int lazyLoadProperty = ebi.getLazyLoadPropertyIndex();
|
||||
if (lazyLoadProperty == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
|
||||
}
|
||||
}
|
||||
|
||||
LoadBeanRequest req = new LoadBeanRequest(this, null, true, ebi.getLazyLoadProp(), context.hitCache);
|
||||
LoadBeanRequest req = new LoadBeanRequest(this, null, true, ebi.getLazyLoadProperty(), context.hitCache);
|
||||
context.desc.getEbeanServer().loadBean(req);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user