fix javadoc examples for @Array and @Struct
This commit is contained in:
parent
5f49441fcc
commit
8c1f9c4aad
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue