io.ebeaninternal.api.LoadManyRequest Maven / Gradle / Ivy
package io.ebeaninternal.api;
import io.ebean.CacheMode;
import io.ebean.bean.BeanCollection;
import io.ebean.bean.EntityBean;
import io.ebean.bean.PersistenceContext;
import io.ebeaninternal.server.core.BindPadding;
import io.ebeaninternal.server.core.OrmQueryRequest;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import io.ebeaninternal.server.deploy.BeanPropertyAssocMany;
import java.util.ArrayList;
import java.util.List;
import static java.lang.System.Logger.Level.DEBUG;
import static java.lang.System.Logger.Level.INFO;
/**
* Request for loading Associated Many Beans.
*/
public final class LoadManyRequest extends LoadRequest {
private static final System.Logger log = CoreLog.log;
private final LoadManyBuffer loadContext;
private final boolean onlyIds;
private final boolean loadCache;
private final BeanCollection> originCollection;
private boolean originIncluded;
/**
* Construct for lazy loading.
*/
public LoadManyRequest(LoadManyBuffer loadContext, boolean onlyIds, boolean loadCache, BeanCollection> originCollection) {
super(null, true);
this.loadContext = loadContext;
this.onlyIds = onlyIds;
this.loadCache = loadCache;
this.originCollection = originCollection;
}
/**
* Construct for secondary query.
*/
public LoadManyRequest(LoadManyBuffer loadContext, OrmQueryRequest> parentRequest) {
super(parentRequest, false);
this.loadContext = loadContext;
this.onlyIds = false;
this.loadCache = false;
this.originCollection = null;
}
@Override
public Class> beanType() {
return loadContext.descriptor().type();
}
public String description() {
return loadContext.fullPath();
}
private List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy