Package com.onec.ui
Class CatalogQueryService
java.lang.Object
com.onec.ui.CatalogQueryService
Read-side queries for catalogs, shared by the REST API and the DivKit emitters
so the SQL and ref-resolution live in one place. Pure data access — access
control stays with the callers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregate(CatalogDescriptor desc, String metric, String field, String filter) A single aggregate value for a count/metric card —countof rows, orsum|avg|min|maxof one numeric column — restricted to live records and narrowed by an optional safefilterpredicate (seeWidgetFilter).children(CatalogDescriptor desc, UUID parent) longcount(CatalogDescriptor desc) longcount(CatalogDescriptor desc, String search, List<String> eq, List<String> in, List<String> like, List<String> prefix, List<String> ge, List<String> le) Total live rows matching the search (+ any declarative filters) — for the virtual scroller.The catalog descriptor for a domain class, ornullif it isn't a registered catalog.get(CatalogDescriptor desc, UUID id) list(CatalogDescriptor desc) list(CatalogDescriptor desc, int offset, int limit) page(CatalogDescriptor desc, int offset, int limit, String sortColumn, boolean descending, String search, List<String> eq, List<String> in, List<String> like, List<String> prefix, List<String> ge, List<String> le) One page of a catalog list, server-side sorted and filtered — the engine behind the virtualized/paged list grid.relatedRows(CatalogDescriptor desc, String viaColumn, UUID parentId) Live rows of a join catalog whoseviaColumnref points atparentId— the read side of a related-list panel (seeRelatedList).search(CatalogDescriptor desc, String query, int limit) Server-side typeahead for ref pickers: case-insensitive match on code/description, capped atlimit, so a 2000-row catalog never ships whole to the client.Column names that may be sorted on: the system columns + every attribute column.tree(CatalogDescriptor desc)
-
Constructor Details
-
CatalogQueryService
-
-
Method Details
-
require
-
forClass
The catalog descriptor for a domain class, ornullif it isn't a registered catalog. -
list
-
search
Server-side typeahead for ref pickers: case-insensitive match on code/description, capped atlimit, so a 2000-row catalog never ships whole to the client. -
count
-
aggregate
A single aggregate value for a count/metric card —countof rows, orsum|avg|min|maxof one numeric column — restricted to live records and narrowed by an optional safefilterpredicate (seeWidgetFilter). -
list
-
page
public List<Map<String,Object>> page(CatalogDescriptor desc, int offset, int limit, String sortColumn, boolean descending, String search, List<String> eq, List<String> in, List<String> like, List<String> prefix, List<String> ge, List<String> le) One page of a catalog list, server-side sorted and filtered — the engine behind the virtualized/paged list grid.sortColumnmust be one of the entity's real columns (validated by the caller viasortableColumns(com.onec.metadata.CatalogDescriptor));searchmatches case-insensitively across the text columns. Live records only. -
count
public long count(CatalogDescriptor desc, String search, List<String> eq, List<String> in, List<String> like, List<String> prefix, List<String> ge, List<String> le) Total live rows matching the search (+ any declarative filters) — for the virtual scroller. -
sortableColumns
Column names that may be sorted on: the system columns + every attribute column. -
children
-
tree
-
get
-