Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: $ |
2 | package org.hibernate.annotations; |
||
3 | |||
4 | import java.lang.annotation.ElementType; |
||
5 | import java.lang.annotation.Retention; |
||
6 | import java.lang.annotation.RetentionPolicy; |
||
7 | import java.lang.annotation.Target; |
||
8 | import javax.persistence.JoinColumn; |
||
9 | |||
10 | /** |
||
11 | * Define the map key columns as an explicit column holding the map key |
||
12 | * This is completly different from {@link javax.persistence.MapKey} which use an existing column |
||
13 | * This annotation and {@link javax.persistence.MapKey} are mutually exclusive |
||
14 | * |
||
15 | * @author Emmanuel Bernard |
||
16 | */ |
||
17 | @Target({ElementType.METHOD, ElementType.FIELD}) |
||
18 | @Retention(RetentionPolicy.RUNTIME) |
||
19 | public @interface MapKeyManyToMany { |
||
20 | JoinColumn[] joinColumns() default {}; |
||
21 | /** |
||
22 | * Represent the key class in a Map |
||
23 | * Only useful if the collection does not use generics |
||
24 | */ |
||
25 | Class targetEntity() default void.class; |
||
26 | } |