|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface ElementCollectionDefines a collection of instances of a basic type or embeddable class. Must be specified if the collection is to be mapped by means of a collection table.
Example:
@Entity public class Person {
@Id protected String ssn;
protected String name;
...
@ElementCollection
protected Set<String> nickNames = new HashSet();
...
}
| Optional Element Summary | |
|---|---|
FetchType |
fetch
(Optional) Whether the collection should be lazily loaded or must be eagerly fetched. |
java.lang.Class |
targetClass
(Optional) The basic or embeddable class that is the element type of the collection. |
public abstract java.lang.Class targetClass
public abstract FetchType fetch
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||