diff --git a/docs/docs/img/computedcolumn.png b/docs/docs/img/computedcolumn.png new file mode 100644 index 0000000..9863e11 Binary files /dev/null and b/docs/docs/img/computedcolumn.png differ diff --git a/docs/docs/index.html b/docs/docs/index.html index 4499af4..bebb3dd 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -220,19 +220,14 @@ private Double price;
-@ComputedColumn
-public double totalSpent() {
- double total = 0;
- for (Order o : orders) {
- total += o.total();
- }
- return total;
+ @ComputedColumn
+public double numberOfOrders() {
+ return orders.size();
}
-
-
+
This annotation can be used to add values computed at runtime that are shown like additional columns.
+NOTE If your computed columns are computationally expensive (e.g because they use joins) they can affect the interface loading speed. In particular, the list view is the most affected, as these methods will get called for each item in the list.