
io.ebeaninternal.server.persist.BatchedBeanHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.persist;
import io.ebeaninternal.server.core.PersistRequest;
import io.ebeaninternal.server.core.PersistRequestBean;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import java.util.ArrayList;
import java.util.IdentityHashMap;
/**
* Holds lists of persist requests for beans of a given type.
*
* This is used to delay the actual binding of the bean to PreparedStatements.
* The reason is that we don't have all the bind values yet in the case of inserts
* with getGeneratedKeys.
*
*
* Has a depth which is used to determine the order in which it should be
* executed. The lowest depth is executed first.
*
*/
public class BatchedBeanHolder {
private static final Object DUMMY = new Object();
/**
* The owning queue.
*/
private final BatchControl control;
private final String shortDesc;
/**
* The 'depth' which is used to determine the execution order.
*/
private final int order;
/**
* The list of bean insert requests.
*/
private ArrayList inserts;
/**
* The list of bean update requests.
*/
private ArrayList updates;
/**
* The list of bean delete requests.
*/
private ArrayList deletes;
/**
* Set of beans in this batch. This is used to ensure that a single bean instance is not included
* in the batch twice (two separate insert requests etc).
*/
private final IdentityHashMap
© 2015 - 2025 Weber Informatics LLC | Privacy Policy