improve code snippets in @Formula annotation jdoc

This commit is contained in:
Gavin 2023-05-14 12:37:24 +02:00 committed by Christian Beikov
parent 49af3f957e
commit a3cd3a9839
1 changed files with 3 additions and 3 deletions

View File

@ -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
* &#64;Formula("sub_total + (sub_total * tax)") * &#64;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
* &#64;Formula("upper(substring(middle_name from 0 for 1))") * &#64;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},