|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NamedQueryDescriptor
Descriptor of Named Query.
Named queries are a way to support native complex queries that are not possible to express with the Fluent Query API.
The upside is that Named Queries can express arbitrarily complex queries, at the expense of being tied to the query language(s) supported by the indexing engine AND that the storage format of the indexing engine must be known since the named query is not expressed in domain model terms.
Named queries must be declared at bootstrap, and can not be added adhoc while the application is running. This is to ensure that programmers don't litter the domain code with index engine specific code, making a change much harder.
Named Queries are indexing engine specific, and aggregated to the NamedQueries
class. For the standard
Sparql indexing engine, it would look like this;
NamedQueries namedQueries = new NamedQueries();
NamedQueryDescriptor queryDescriptor = new NamedSparqlDescriptor( queryString );
namedQueries.addQuery( queryName, queryDescriptor );
module.services( RdfIndexerExporterComposite.class ).setMetaInfo( namedQueries );
Method Summary | |
---|---|
String |
compose(Map<String,Object> variables,
OrderBy[] orderBySegments,
Integer firstResult,
Integer maxResults)
Creates a valid Query string. |
String |
language()
Returns the name of the query language. |
String |
name()
Returns the name of the query. |
List<String> |
variableNames()
Returns a list of variable names allowed in the query. |
Method Detail |
---|
String name()
String compose(Map<String,Object> variables, OrderBy[] orderBySegments, Integer firstResult, Integer maxResults)
variables
- The variables used, and their values.orderBySegments
- The list of OrderBy instrctions.firstResult
- The offset into the resultset.maxResults
- The maximum number of results to be returned.
String language()
List<String> variableNames()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |