Top Description Fields Constructors Methods
javax.persistence

public final Enum FetchType

extends Enum<FetchType>
Class Inheritance

Defines strategies for fetching data from the database. The EAGER strategy is a requirement on the persistence provider runtime that data must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime that data should be fetched lazily when it is first accessed. The implementation is permitted to eagerly fetch data for which the LAZY strategy hint has been specified.
  Example:
  @Basic(fetch=LAZY)
  protected String getName() { return name; }
Since
Java Persistence 1.0
See Also
Basic, ElementCollection, ManyToMany, OneToMany, ManyToOne, OneToOne

Field Summary

Modifier and TypeField and Description
public static final FetchType
EAGER

Defines that data must be eagerly fetched.

public static final FetchType
LAZY

Defines that data can be lazily fetched.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FetchType
public static FetchType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EAGERback to summary
public static final FetchType EAGER

Defines that data must be eagerly fetched.

LAZYback to summary
public static final FetchType LAZY

Defines that data can be lazily fetched.

Constructor Detail

FetchTypeback to summary
private FetchType()

Method Detail

valueOfback to summary
public static FetchType valueOf(String name)
valuesback to summary
public static FetchType[] values()