org.eclipse.persistence.queries.BatchFetchPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eclipselink Show documentation
Show all versions of eclipselink Show documentation
EclipseLink build based upon Git transaction 346465e
/*******************************************************************************
* Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* James Sutherland - initial API and implementation
******************************************************************************/
package org.eclipse.persistence.queries;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.persistence.annotations.BatchFetchType;
import org.eclipse.persistence.descriptors.ClassDescriptor;
import org.eclipse.persistence.expressions.Expression;
import org.eclipse.persistence.internal.expressions.QueryKeyExpression;
import org.eclipse.persistence.internal.sessions.AbstractRecord;
import org.eclipse.persistence.mappings.DatabaseMapping;
/**
* BatchFetchPolicy defines batch reading configuration.
*
* @see org.eclipse.persistence.queries.ObjectLevelReadQuery#setBatchFetchPolicy(BatchFetchPolicy)
* @author James Sutherland
*/
public class BatchFetchPolicy implements Serializable, Cloneable {
/** Define the type of batch fetching to use. */
protected BatchFetchType type;
/** Define the batch size for IN style batch fetching. */
protected int size = 500;
/** Define the attributes to be batch fetched. */
protected List attributeExpressions;
/** Define the mapping to be batch fetched (from mapping settings). */
protected List batchedMappings;
/** PERF: Used internally to store the prepared mapping queries. */
protected transient Map mappingQueries;
/** PERF: Cache the local batch read attribute names. */
protected List attributes;
/** Stores temporary list of rows from parent batch query per batched mapping. */
protected transient Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy