Skip to content

Commit 8c1f9c4

Browse files
committed
fix javadoc examples for @array and @struct
1 parent 5f49441 commit 8c1f9c4

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

hibernate-core/src/main/java/org/hibernate/annotations/Array.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@
1717

1818
/**
1919
* Specifies the maximum length of a SQL array type mapped by
20-
* the annotated attribute. For example:
20+
* the annotated attribute.
21+
* <p>
22+
* For example:
2123
* <pre>
22-
*
24+
* {@code @Array(length=100)} // the maximum length of the SQL array
25+
* {@code @Column(length=64)} // the maximum length of the strings in the array
26+
* String[] strings;
2327
* </pre>
2428
*/
2529
@Incubating
2630
@Target({FIELD, METHOD})
2731
@Retention( RUNTIME )
2832
public @interface Array {
33+
/**
34+
* The maximum length of the array.
35+
*/
2936
int length();
3037
}

hibernate-core/src/main/java/org/hibernate/annotations/Struct.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
* This annotation may be applied to an embeddable class:
2424
* <pre>
2525
* {@code @Embeddable}
26-
* {@code Struct(name = "CUST")}
26+
* {@code @Struct(name = "CUST")}
2727
* public class Customer { ... }
2828
* </pre>
29+
* <p>
2930
* Alternatively, it may be applied to an embedded attribute:
3031
* <pre>
3132
* public class Order {
32-
* {@code Embedded}
33-
* {@code Struct(name = "CUST")}
33+
* {@code @Embedded}
34+
* {@code @Struct(name = "CUST")}
3435
* private Customer customer;
3536
* }
3637
* </pre>

0 commit comments

Comments
 (0)