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; }
Basic, ElementCollection, ManyToMany, OneToMany, ManyToOne, OneToOne
| Modifier and Type | Field 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. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FetchType | |
| public static FetchType[] |
| EAGER | back to summary |
|---|---|
| public static final FetchType EAGER Defines that data must be eagerly fetched. | |
| LAZY | back to summary |
|---|---|
| public static final FetchType LAZY Defines that data can be lazily fetched. | |
| FetchType | back to summary |
|---|---|
| private FetchType() | |
| valueOf | back to summary |
|---|---|
| public static FetchType valueOf(String name) | |
| values | back to summary |
|---|---|
| public static FetchType[] values() | |