|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface ElementCollection
Defines 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
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |