WIP - rename EntityBeanIntercept lazy loading property methods

This commit is contained in:
Rob Bygrave
2014-04-20 17:01:36 +12:00
parent f7a37537db
commit 811d298355
4 changed files with 10 additions and 7 deletions
@@ -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);
}