0.0.2 README

This commit is contained in:
Francesco 2023-09-20 12:17:51 +02:00
parent 9391db1ae9
commit 06d5916021

View File

@ -59,32 +59,32 @@ The following annotations are supported.
### @DisplayName ### @DisplayName
``` ```
@DisplayName @DisplayName
public String getName() { public String getName() {
return name; return name;
} }
``` ```
To show an item in a table its primary key is used by default. If you set a method as `@DisplayName` in your `@Entity` class, this result will be shown in addition to its primary key wherever possible. To show an item in a table its primary key is used by default. If you set a method as `@DisplayName` in your `@Entity` class, this result will be shown in addition to its primary key wherever possible.
### @DisplayFormat ### @DisplayFormat
``` ```
@DisplayFormat(format = "$%.2f") @DisplayFormat(format = "$%.2f")
private Double price; private Double price;
``` ```
Specify a format to apply when displaying the field. Specify a format to apply when displaying the field.
### @ComputedColumn ### @ComputedColumn
``` ```
@ComputedColumn @ComputedColumn
public double totalSpent() { public double totalSpent() {
double total = 0; double total = 0;
for (Order o : orders) { for (Order o : orders) {
total += o.total(); total += o.total();
} }
return total; return total;
} }
``` ```
Add an extra field that's computed at runtime instead of a database column. It will be displayed everywhere as a normal, read-only column. Add an extra field that's computed at runtime instead of a database column. It will be displayed everywhere as a normal, read-only column.
@ -92,8 +92,8 @@ Add an extra field that's computed at runtime instead of a database column. It w
### @Filterable ### @Filterable
``` ```
@Filterable @Filterable
private LocalDate createdAt; private LocalDate createdAt;
``` ```
Place on one or more fields in a class to activate the faceted search feature. This will allow you to easily combine all these filters when operating on this table. Place on one or more fields in a class to activate the faceted search feature. This will allow you to easily combine all these filters when operating on this table.