improve code snippets in @Formula annotation jdoc
This commit is contained in:
parent
49af3f957e
commit
a3cd3a9839
|
@ -23,15 +23,15 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
* A formula may involve multiple columns and SQL operators:
|
* A formula may involve multiple columns and SQL operators:
|
||||||
* <pre>
|
* <pre>
|
||||||
* // perform calculations using SQL operators
|
* // perform calculations using SQL operators
|
||||||
* @Formula("sub_total + (sub_total * tax)")
|
* @Formula("sub_total * (1.0 + tax)")
|
||||||
* long getTotalCost() { ... }
|
* BigDecimal totalWithTax;
|
||||||
* </pre>
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* It may even call SQL functions:
|
* It may even call SQL functions:
|
||||||
* <pre>
|
* <pre>
|
||||||
* // call native SQL functions
|
* // call native SQL functions
|
||||||
* @Formula("upper(substring(middle_name from 0 for 1))")
|
* @Formula("upper(substring(middle_name from 0 for 1))")
|
||||||
* Character getMiddleInitial() { ... }
|
* Character middleInitial;
|
||||||
* </pre>
|
* </pre>
|
||||||
* <p>
|
* <p>
|
||||||
* For an entity with {@linkplain jakarta.persistence.SecondaryTable secondary tables},
|
* For an entity with {@linkplain jakarta.persistence.SecondaryTable secondary tables},
|
||||||
|
|
Loading…
Reference in New Issue