T - They type of query. Used to support fluency.public abstract class Query<T extends Query<T>> extends Object implements QueryElement
| Modifier and Type | Field and Description |
|---|---|
protected int |
bnodeCount |
protected Optional<Dataset> |
from |
protected Optional<GroupBy> |
groupBy |
protected Optional<Having> |
having |
protected int |
limit |
protected static String |
LIMIT |
protected int |
offset |
protected static String |
OFFSET |
protected Optional<OrderBy> |
orderBy |
protected int |
varCount |
protected QueryPattern |
where |
| Constructor and Description |
|---|
Query() |
| Modifier and Type | Method and Description |
|---|---|
RdfBlankNode.LabeledBlankNode |
bNode()
A shortcut.
|
T |
from(Dataset from)
Set the Dataset clause for this query
|
T |
from(From... graphs)
Add datasets to this query
|
protected abstract String |
getQueryActionString() |
String |
getQueryString() |
T |
groupBy(Groupable... groupables)
Add grouping specifiers for the query results.
|
T |
groupBy(GroupBy groupBy)
Set this query's Group By clause
|
T |
having(Expression<?>... constraints)
Specify constraints for this query's Having clause.
|
T |
having(Having having)
Set this query's Having clause
|
T |
limit(int limit)
Set a limit on the number of results returned by this query.
|
T |
offset(int offset)
Specify an offset in query results.
|
T |
orderBy(Orderable... conditions)
Specify orderings for the query results
|
T |
orderBy(OrderBy orderBy)
Set this query's Order By clause
|
Variable |
var()
A shortcut.
|
T |
where(GraphPattern... queryPatterns)
Add graph patterns to this query's query pattern
|
T |
where(QueryPattern where)
Set the query pattern of this query
|
protected static final String LIMIT
protected static final String OFFSET
protected QueryPattern where
protected int limit
protected int offset
protected int varCount
protected int bnodeCount
public T from(From... graphs)
graphs - the graph specifiers to addpublic T from(Dataset from)
from - the Dataset clause to setpublic T where(GraphPattern... queryPatterns)
queryPatterns - the patterns to addQueryPatternpublic T where(QueryPattern where)
where - the query pattern to setpublic T groupBy(Groupable... groupables)
groupables - the objects to group on, in order (appended to the end of any existing grouping specifiers)GroupBypublic T groupBy(GroupBy groupBy)
groupBy - the GroupBy clause to setpublic T orderBy(Orderable... conditions)
conditions - the objects to order on, in orderOrderBypublic T orderBy(OrderBy orderBy)
orderBy - the OrderBy clause to setpublic T having(Expression<?>... constraints)
constraints - the constraints to add to the clauseHavingpublic T having(Having having)
having - the Having clause to setpublic T limit(int limit)
limit - public T offset(int offset)
offset - public Variable var()
Variable that is unique (i.e., has a unique alias) to
this query instance.Variable object that is unique to this query instancepublic RdfBlankNode.LabeledBlankNode bNode()
RdfBlankNode.LabeledBlankNode that is
unique (i.e., has a unique alias) to this query instance.RdfBlankNode.LabeledBlankNode
object that is unique to this query instanceprotected abstract String getQueryActionString()
public String getQueryString()
getQueryString in interface QueryElementCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.