Package com.stardog.stark.query
Interface ReadQuery
- All Superinterfaces:
Query
- All Known Subinterfaces:
BooleanQuery,GraphQuery,SelectQuery
A read-only query over a semantic graph
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longConstant value used to specify that a query should not have any limit imposed on the number of results it returns.static final longConstant value used to specify that a query has no offset in its query resultsFields inherited from interface com.stardog.stark.query.Query
NO_TIMEOUT -
Method Summary
Modifier and TypeMethodDescriptionlonglimit()Return the current result limit for this query.limit(long theLimit) Set the maximum number of results that can be returned by this query.longoffset()Return the current result offset for this query.offset(long theOffset) Set the offset of the query results.Methods inherited from interface com.stardog.stark.query.Query
baseIRI, dataset, dataset, language, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameter, parameters, reasoning, reasoning, removeParameter, string, timeout, timeout
-
Field Details
-
NO_OFFSET
static final long NO_OFFSETConstant value used to specify that a query has no offset in its query results- See Also:
-
NO_LIMIT
static final long NO_LIMITConstant value used to specify that a query should not have any limit imposed on the number of results it returns.- See Also:
-
-
Method Details
-
limit
long limit()Return the current result limit for this query.- Returns:
- the limit, or
NO_LIMITif the limit is not set
-
offset
long offset()Return the current result offset for this query.- Returns:
- the offset, or
NO_OFFSETif the offset is not set
-
limit
Set the maximum number of results that can be returned by this query. Setting the limit on this query will *override* any limit specified in the original query string, however, setting the limit toNO_LIMITwill *not* remove the limit if it is specified in the query, but you can use it to remove a limit that has already been set if there was not a limit specified in the query originally.- Parameters:
theLimit- the new limit- Returns:
- this query
-
offset
Set the offset of the query results. Similar tolimit()this will override an offset in the query, and you can useNO_OFFSETto remove an offset specified on the query, but not in the query string.- Parameters:
theOffset- the offset- Returns:
- this query
-