Package com.onec.query
Class QueryBuilder<T>
java.lang.Object
com.onec.query.QueryBuilder<T>
Fluent front-end that accumulates a
QuerySpec and runs it through a
QueryEngine. DSL helpers from Q produce un-rooted paths; this builder
binds them to <T> as they are added, so callers never repeat the entity class.
import static com.onec.query.Q.*;
List<Row> rows = engine.from(SalesOrder.class)
.select(col(SalesOrder::getNumber),
ref(SalesOrder::getCustomer, Customer::getName))
.where(eq(SalesOrder::getStatus, "APPROVED"))
.orderBy(desc(SalesOrder::getDate))
.fetch();
-
Method Details
-
select
-
where
-
groupBy
-
orderBy
-
totalsBy
-
limit
-
offset
-
toSpec
The declarative spec this builder has assembled — usable without executing. -
fetch
-
fetchInto
-