Simplify load description in LoadBeanRequest and LoadManyRequest

This commit is contained in:
Rob Bygrave
2021-09-02 19:28:24 +12:00
parent 455914fb52
commit ac21fcb5cf
2 changed files with 6 additions and 7 deletions
@@ -1,7 +1,6 @@
package io.ebeaninternal.api;
import io.ebean.CacheMode;
import io.ebean.bean.EntityBean;
import io.ebean.bean.EntityBeanIntercept;
import io.ebeaninternal.api.SpiQuery.Mode;
import io.ebeaninternal.server.core.OrmQueryRequest;
@@ -52,8 +51,8 @@ public final class LoadBeanRequest extends LoadRequest {
return loadBuffer.getBeanDescriptor().getBeanType();
}
public String getDescription() {
return "path:" + loadBuffer.getFullPath() + " batch:" + batch.size();
public String description() {
return loadBuffer.getFullPath();
}
/**
@@ -92,7 +91,7 @@ public final class LoadBeanRequest extends LoadRequest {
public void configureQuery(SpiQuery<?> query, List<Object> idList) {
query.setMode(Mode.LAZYLOAD_BEAN);
query.setPersistenceContext(loadBuffer.getPersistenceContext());
query.setLoadDescription(lazy ? "+lazy" : "+query", getDescription());
query.setLoadDescription(lazy ? "+lazy" : "+query", description());
if (lazy) {
query.setLazyLoadBatchSize(getBatchSize());
if (alreadyLoaded) {
@@ -52,8 +52,8 @@ public final class LoadManyRequest extends LoadRequest {
return loadContext.getBeanDescriptor().getBeanType();
}
public String getDescription() {
return "path:" + loadContext.getFullPath() + " size:" + batch.size();
public String description() {
return loadContext.getFullPath();
}
/**
@@ -110,7 +110,7 @@ public final class LoadManyRequest extends LoadRequest {
query.setLazyLoadForParents(many);
many.addWhereParentIdIn(query, parentIdList(server), loadContext.isUseDocStore());
query.setPersistenceContext(loadContext.getPersistenceContext());
query.setLoadDescription(lazy ? "+lazy" : "+query", getDescription());
query.setLoadDescription(lazy ? "+lazy" : "+query", description());
if (lazy) {
query.setLazyLoadBatchSize(getBatchSize());
} else {