@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface ElementCollection
Example:
@Entity public class Person {
@Id protected String ssn;
protected String name;
...
@ElementCollection
protected Set<String> nickNames = new HashSet();
...
}
| 修飾子とタイプ | 任意要素と説明 |
|---|---|
FetchType |
fetch
(オプション) コレクションを遅延ロード(LAZY)するか、即座に取得(EAGER)する必要があるかどうか。
|
java.lang.Class |
targetClass
(オプション) コレクションの要素となる基本型もしくは組み込みクラス。
|
public abstract java.lang.Class targetClass
public abstract FetchType fetch
Translated by @megascus.