All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.persistence.annotations.BatchFetchType Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2011, 2024 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 v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0,
 * or the Eclipse Distribution License v. 1.0 which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
 */

// Contributors:
//     James Sutherland - initial implementation
package org.eclipse.persistence.annotations;

/**
 * Enum used with the {@linkplain BatchFetch} annotation, or "{@systemProperty eclipselink.batch.type}" query hint.
 * This can be specified on a mapping or query to configure the type of batch reading to be used.
 *
 * @see BatchFetch
 * @author James Sutherland
 * @since EclipseLink 2.1
 */
public enum BatchFetchType {
    /**
     * The original query's selection criteria is joined with the batch query.
     * 

* This is the default form of batch reading. */ JOIN, /** * Use an SQL EXISTS and a sub-select in the batch query instead of a join. *

* This has the advantage of not requiring an SQL DISTINCT which can have issues * with LOBs, or may be more efficient for some types of queries or on some databases. */ EXISTS, /** * Use an SQL IN clause in the batch query passing in the source object Ids. *

* This has the advantage of only selecting the objects not already contained in the cache, * and can work better with cursors, or if joins cannot be used. *

* This may only work for singleton Ids on some databases. */ IN }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy