|
7 | 7 | import java.lang.annotation.Retention; |
8 | 8 | import java.lang.annotation.Target; |
9 | 9 |
|
| 10 | +import java.util.List; |
| 11 | +import org.hibernate.metamodel.CollectionClassification; |
| 12 | + |
10 | 13 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; |
11 | 14 | import static java.lang.annotation.ElementType.FIELD; |
12 | 15 | import static java.lang.annotation.ElementType.METHOD; |
13 | 16 | import static java.lang.annotation.RetentionPolicy.RUNTIME; |
14 | 17 |
|
15 | | -/** |
16 | | - * Specifies that an attribute of type {@link java.util.List} is semantically |
17 | | - * a {@linkplain org.hibernate.metamodel.CollectionClassification#BAG bag}, |
18 | | - * that is, that the order of the list elements is not significant, and should |
19 | | - * not be persistent. |
20 | | - * <p> |
21 | | - * This annotation is not necessary, and has no effect, unless the configuration |
22 | | - * property {@value org.hibernate.cfg.AvailableSettings#DEFAULT_LIST_SEMANTICS} |
23 | | - * is set to {@link org.hibernate.metamodel.CollectionClassification#LIST}. |
24 | | - * However, its use is still encouraged, since the explicit annotation serves |
25 | | - * as useful documentation. |
26 | | - * |
27 | | - * @apiNote This annotation causes an exception if the attribute is also annotated |
28 | | - * {@link jakarta.persistence.OrderColumn} or {@link ListIndexBase}. |
29 | | - * |
30 | | - * @author Steve Ebersole |
31 | | - */ |
| 18 | +/// Specifies that an attribute of type [List] is semantically a |
| 19 | +/// [bag][CollectionClassification#BAG], that is, that the order of |
| 20 | +/// the list elements is not significant, and should not be persistent. |
| 21 | +/// |
| 22 | +/// This annotation is not necessary, and has no effect, unless the configuration |
| 23 | +/// property {@value org.hibernate.cfg.AvailableSettings#DEFAULT_LIST_SEMANTICS} |
| 24 | +/// is set to {@link org.hibernate.metamodel.CollectionClassification#LIST}. |
| 25 | +/// However, its use is still encouraged, since the explicit annotation serves |
| 26 | +/// as useful documentation. |
| 27 | +/// |
| 28 | +/// @apiNote This annotation causes an exception if the attribute is also annotated |
| 29 | +/// [jakarta.persistence.OrderColumn] or [ListIndexBase]. |
| 30 | +/// |
| 31 | +/// @author Steve Ebersole |
32 | 32 | @Target({METHOD, FIELD, ANNOTATION_TYPE}) |
33 | 33 | @Retention(RUNTIME) |
34 | 34 | public @interface Bag { |
|
0 commit comments