fix javadoc examples for @Array and @Struct

This commit is contained in:
Gavin 2023-05-07 10:42:08 +02:00 committed by Gavin King
parent 5f49441fcc
commit 8c1f9c4aad
2 changed files with 13 additions and 5 deletions

View File

@ -17,14 +17,21 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Specifies the maximum length of a SQL array type mapped by
* the annotated attribute. For example:
* the annotated attribute.
* <p>
* For example:
* <pre>
*
* {@code @Array(length=100)} // the maximum length of the SQL array
* {@code @Column(length=64)} // the maximum length of the strings in the array
* String[] strings;
* </pre>
*/
@Incubating
@Target({FIELD, METHOD})
@Retention( RUNTIME )
public @interface Array {
/**
* The maximum length of the array.
*/
int length();
}

View File

@ -23,14 +23,15 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* This annotation may be applied to an embeddable class:
* <pre>
* {@code @Embeddable}
* {@code Struct(name = "CUST")}
* {@code @Struct(name = "CUST")}
* public class Customer { ... }
* </pre>
* <p>
* Alternatively, it may be applied to an embedded attribute:
* <pre>
* public class Order {
* {@code Embedded}
* {@code Struct(name = "CUST")}
* {@code @Embedded}
* {@code @Struct(name = "CUST")}
* private Customer customer;
* }
* </pre>