Core Concepts
DevExtremeLoadOptions
Represents a client query with the following key properties:
public class DevExtremeLoadOptions {
private Integer skip; // Pagination offset
private Integer take; // Number of records to return
private Boolean requireTotalCount; // Include total count in result
private Object filter; // Filter expression (nested arrays)
private List<SortInfo> sort; // Sort columns and directions
private List<GroupInfo> group; // Group by columns
private List<SummaryInfo> totalSummary; // Total aggregations
private List<SummaryInfo> groupSummary; // Group aggregations
private Boolean isLoadingAll; // Export mode (ignore pagination)
}Filter Expressions
Filters are JSON arrays with the format: [field, operator, value]
Simple Filter
["firstName", "contains", "John"]Complex Filter (AND)
[
["firstName", "contains", "John"],
"and",
["salary", ">=", 50000]
]Complex Filter (OR and Nesting)
[
[
["firstName", "=", "John"],
"or",
["firstName", "=", "Jane"]
],
"and",
["active", "=", true]
]Supported Filter Operators
| Operator | Description | Example |
|---|---|---|
=, equals | Equal to | ["status", "=", "active"] |
<> | Not equal to | ["status", "<>", "deleted"] |
>, greater | Greater than | ["age", ">", 18] |
>= | Greater than or equal | ["age", ">=", 21] |
<, lower | Less than | ["price", "<", 100] |
<= | Less than or equal | ["price", "<=", 50] |
contains | Contains substring (case-insensitive) | ["name", "contains", "john"] |
notcontains | Does not contain | ["name", "notcontains", "test"] |
startswith | Starts with | ["email", "startswith", "admin"] |
endswith | Ends with | ["email", "endswith", ".com"] |
between | Between two values | ["age", "between", [18, 65]] |
null, nu | Is null | ["deletedAt", "null", null] |
notnull, nn | Is not null | ["email", "notnull", null] |
Special Filter Cases
Null Value Handling
["deletedAt", "=", null]Generates: deleted_at IS NULL
Field-to-Field Comparison
["actualPrice", ">=", "expectedPrice"]Generates: actual_price >= expected_price
Date Interval Filtering
["hireDate.Year", "=", 2024]Generates: EXTRACT(YEAR FROM hire_date) = 2024
Connection Management Modes
DataSource Mode (Recommended for Production)
GridDataProvider gridDataProvider = new GridDataProvider(dataSource);
// Library manages connection lifecycle
// Connections automatically closed after each query
// Thread-safe for read operations
// Best for web applications with connection poolingConnection Mode (Manual Control)
try (Connection conn = dataSource.getConnection()) {
GridDataProvider gridDataProvider = new GridDataProvider(conn);
// Execute multiple queries on same connection
// Caller responsible for closing connection
// NOT thread-safe
// Useful for batch operations or transactions
}Last updated on