Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id$ |
2 | package org.hibernate.annotations; |
||
3 | |||
4 | import static java.lang.annotation.ElementType.FIELD; |
||
5 | import static java.lang.annotation.ElementType.METHOD; |
||
6 | import static java.lang.annotation.ElementType.PACKAGE; |
||
7 | import static java.lang.annotation.ElementType.TYPE; |
||
8 | import java.lang.annotation.Retention; |
||
9 | import static java.lang.annotation.RetentionPolicy.RUNTIME; |
||
10 | |||
11 | /** |
||
12 | * Defines @Any and @manyToAny metadata |
||
13 | * |
||
14 | * @author Emmanuel Bernard |
||
15 | */ |
||
16 | @java.lang.annotation.Target( { PACKAGE, TYPE, METHOD, FIELD } ) |
||
17 | @Retention( RUNTIME ) |
||
18 | public @interface AnyMetaDef { |
||
19 | /** |
||
20 | * If defined, assign a global meta definition name to be used in an @Any or @ManyToAny annotation |
||
21 | * If not defined, the metadata applies to the current property or field |
||
22 | */ |
||
23 | String name() default ""; |
||
24 | |||
25 | /** |
||
26 | * meta discriminator Hibernate type |
||
27 | */ |
||
28 | String metaType(); |
||
29 | |||
30 | /** |
||
31 | * Hibernate type of the id column |
||
32 | * @return |
||
33 | */ |
||
34 | String idType(); |
||
35 | |||
36 | /** |
||
37 | * Matching discriminator values with their respective entity |
||
38 | */ |
||
39 | MetaValue[] metaValues(); |
||
40 | } |