|
|||||||||
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 4-June-2010 04:34