org.hibernate.FetchMode Maven / Gradle / Ivy
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate;
/**
* Represents an association fetching strategy. This is used
* together with the Criteria API to specify runtime
* fetching strategies.
*
* For HQL queries, use the FETCH keyword instead.
*
* @see Criteria#setFetchMode(java.lang.String, FetchMode)
*
* @author Gavin King
*/
public enum FetchMode {
/**
* Default to the setting configured in the mapping file.
*/
DEFAULT,
/**
* Fetch using an outer join. Equivalent to fetch="join".
*/
JOIN,
/**
* Fetch eagerly, using a separate select. Equivalent to
* fetch="select".
*/
SELECT;
/**
* Fetch lazily. Equivalent to outer-join="false".
*
* @deprecated use FetchMode.SELECT
*/
@Deprecated
public static final FetchMode LAZY = SELECT;
/**
* Fetch eagerly, using an outer join. Equivalent to outer-join="true".
*
* @deprecated use FetchMode.JOIN
*/
@Deprecated
public static final FetchMode EAGER = JOIN;
}