Package com.aashish.javaormashcode.query
Class QuerySet<T>
java.lang.Object
com.aashish.javaormashcode.query.QuerySet<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregate(OrmSession session, Aggregate... aggregates) Executes one or more aggregate projections within the given session.Executes one or more aggregate projections using the configured primary data source.aggregate(DataSource dataSource, Aggregate... aggregates) Executes one or more aggregate projections using the given data source.all()Executes the select query using the configured primary data source.all(OrmSession session) Executes the select query within the given ORM session.<R> List<R> Executes the select query and maps rows into the given DTO type.<R> List<R> all(Class<R> dtoClass, OrmSession session) Executes the select query within the given session and maps rows into the DTO type.<R> List<R> all(Class<R> dtoClass, DataSource dataSource) Executes the select query against the given data source and maps rows into the DTO type.all(DataSource dataSource) Executes the select query using the given data source.Adds a subquery projection to the current select list.asSql()Renders the current query as SQL without binding parameter values.intdelete()Deletes rows matched by the current filters using the configured primary data source.intdelete(OrmSession session) Deletes rows matched by the current filters within the given session.intdelete(DataSource dataSource) Deletes rows matched by the current filters using the given data source.Creates a field reference scoped to this query's model graph.Adds an exact-match filter for the given field reference.Adds a filter using a lookup expression such asname__icontains.getState()Exposes the mutable query state backing this query set.intInserts a row using the configured primary data source.intinsert(Map<String, Object> values, OrmSession session) Inserts a row within the given session.intinsert(Map<String, Object> values, DataSource dataSource) Inserts a row using the given data source.Adds an inner join for the named relation.Adds a left join for the named relation.limit(int limit) Sets the maximum number of rows returned by the query.nextPage()Advances the current offset by one page.offset(int offset) Sets the number of rows to skip before returning results.Adds an ordering clause for the given field reference.Adds an ordering clause for the given column or field path.page(int pageNumber, int pageSize) Applies pagination using a 1-based page number and page size.paginate(PageRequest request) Applies pagination from the given page request.Moves the current offset back by one page without going below zero.Replaces the selected columns with the given field references.Replaces the selected columns with the given field paths.intUpdates rows matched by the current filters using the configured primary data source.intupdate(Map<String, Object> values, OrmSession session) Updates rows matched by the current filters within the given session.intupdate(Map<String, Object> values, DataSource dataSource) Updates rows matched by the current filters using the given data source.Alias forselect(FieldRef[]).Alias forselect(String...).
-
Constructor Details
-
QuerySet
-
-
Method Details
-
asSql
Renders the current query as SQL without binding parameter values. -
field
Creates a field reference scoped to this query's model graph. -
select
Replaces the selected columns with the given field paths. -
select
Replaces the selected columns with the given field references. -
values
Alias forselect(String...). -
values
Alias forselect(FieldRef[]). -
join
Adds an inner join for the named relation. -
leftJoin
Adds a left join for the named relation. -
page
Applies pagination using a 1-based page number and page size. -
paginate
Applies pagination from the given page request. -
nextPage
Advances the current offset by one page. -
previousPage
Moves the current offset back by one page without going below zero. -
all
Executes the select query using the configured primary data source. -
all
Executes the select query using the given data source. -
all
Executes the select query within the given ORM session. -
all
Executes the select query and maps rows into the given DTO type. -
all
Executes the select query against the given data source and maps rows into the DTO type. -
all
Executes the select query within the given session and maps rows into the DTO type. -
aggregate
Executes one or more aggregate projections using the configured primary data source. -
aggregate
Executes one or more aggregate projections using the given data source. -
aggregate
Executes one or more aggregate projections within the given session. -
annotate
Adds a subquery projection to the current select list. -
filter
Adds a filter using a lookup expression such asname__icontains. -
filter
Adds an exact-match filter for the given field reference. -
order
Adds an ordering clause for the given column or field path. -
order
Adds an ordering clause for the given field reference. -
limit
Sets the maximum number of rows returned by the query. -
offset
Sets the number of rows to skip before returning results. -
insert
Inserts a row using the configured primary data source. -
insert
Inserts a row using the given data source. -
insert
Inserts a row within the given session. -
update
Updates rows matched by the current filters using the configured primary data source. -
update
Updates rows matched by the current filters using the given data source. -
update
Updates rows matched by the current filters within the given session. -
delete
public int delete()Deletes rows matched by the current filters using the configured primary data source. -
delete
Deletes rows matched by the current filters using the given data source. -
delete
Deletes rows matched by the current filters within the given session. -
getState
Exposes the mutable query state backing this query set.
-