Package com.onec.query
Record Class QuerySpec
java.lang.Object
java.lang.Record
com.onec.query.QuerySpec
- Record Components:
from- the root entity class (catalog/document/register)select- projected columns / ref-navigations / aggregateswhere- AND-combined filter predicatesgroupBy- grouping pathsorderBy- ordering termstotals- 1CИТОГИhierarchy paths (carried in the AST; tree folding is a follow-up)limit- optional row capoffset- optional row offset
public record QuerySpec(Class<?> from, List<Select> select, List<Predicate> where, List<Path> groupBy, List<Order> orderBy, List<Path> totals, Integer limit, Integer offset)
extends Record
The declarative AST for a query over any catalog, document, or register — the
single source of truth that the fluent builder produces and that the engine compiles
to SQL. Being a plain value, the same query is expressible without the fluent API
(and, later, as JSON for UI/agents or parsed from a 1C-style text syntax).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Class<?> from()Returns the value of thefromrecord component.groupBy()Returns the value of thegroupByrecord component.final inthashCode()Returns a hash code value for this object.limit()Returns the value of thelimitrecord component.offset()Returns the value of theoffsetrecord component.orderBy()Returns the value of theorderByrecord component.select()Returns the value of theselectrecord component.final StringtoString()Returns a string representation of this record class.totals()Returns the value of thetotalsrecord component.where()Returns the value of thewhererecord component.
-
Constructor Details
-
QuerySpec
public QuerySpec(Class<?> from, List<Select> select, List<Predicate> where, List<Path> groupBy, List<Order> orderBy, List<Path> totals, Integer limit, Integer offset) Creates an instance of aQuerySpecrecord class.- Parameters:
from- the value for thefromrecord componentselect- the value for theselectrecord componentwhere- the value for thewhererecord componentgroupBy- the value for thegroupByrecord componentorderBy- the value for theorderByrecord componenttotals- the value for thetotalsrecord componentlimit- the value for thelimitrecord componentoffset- the value for theoffsetrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
select
Returns the value of theselectrecord component.- Returns:
- the value of the
selectrecord component
-
where
Returns the value of thewhererecord component.- Returns:
- the value of the
whererecord component
-
groupBy
Returns the value of thegroupByrecord component.- Returns:
- the value of the
groupByrecord component
-
orderBy
Returns the value of theorderByrecord component.- Returns:
- the value of the
orderByrecord component
-
totals
Returns the value of thetotalsrecord component.- Returns:
- the value of the
totalsrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-