public enum FetchMode extends Enum<FetchMode>
Represents an association fetching strategy. This is used together with the <tt>Criteria</tt> API to specify runtime fetching strategies.<br> <br> For HQL queries, use the <tt>FETCH</tt> keyword instead.
Enum Constant and Description |
---|
DEFAULT
Default to the setting configured in the mapping file.
|
JOIN
Fetch using an outer join.
|
SELECT
Fetch eagerly, using a separate select.
|
Modifier and Type | Field and Description |
---|---|
static FetchMode |
EAGER
Deprecated.
use <tt>FetchMode.JOIN</tt>
|
static FetchMode |
LAZY
Deprecated.
use <tt>FetchMode.SELECT</tt>
|
Modifier and Type | Method and Description |
---|---|
static FetchMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FetchMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FetchMode DEFAULT
Default to the setting configured in the mapping file.
public static final FetchMode JOIN
Fetch using an outer join. Equivalent to <tt>fetch="join"</tt>.
public static final FetchMode SELECT
Fetch eagerly, using a separate select. Equivalent to <tt>fetch="select"</tt>.
@Deprecated public static final FetchMode LAZY
Fetch lazily. Equivalent to <tt>outer-join="false"</tt>.
@Deprecated public static final FetchMode EAGER
Fetch eagerly, using an outer join. Equivalent to <tt>outer-join="true"</tt>.
public static FetchMode[] values()
for (FetchMode c : FetchMode.values()) System.out.println(c);
public static FetchMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.