com.avaje.ebeaninternal.server.query.BeanCollectionWrapper Maven / Gradle / Ivy
package com.avaje.ebeaninternal.server.query;
import com.avaje.ebean.bean.BeanCollection;
import com.avaje.ebean.bean.EntityBean;
import com.avaje.ebeaninternal.api.SpiQuery;
import com.avaje.ebeaninternal.server.core.RelationalQueryRequest;
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
import com.avaje.ebeaninternal.server.util.BeanCollectionFactory;
import java.util.Collection;
import java.util.Map;
/**
* Wraps a BeanCollection with helper methods to add beans.
*
* Helps adding the bean to the underlying set list or map.
*
*/
public final class BeanCollectionWrapper {
/**
* Flag set if this builds a Map rather than a Collection.
*/
private final boolean isMap;
/**
* A property name used as key for a Map.
*/
private final String mapKey;
/**
* The actual BeanCollection.
*/
private final BeanCollection> beanCollection;
/**
* Collection type of BeanCollection.
*/
private final Collection