Package com.iknowbase.api.contentservices.query.content
Provides interfaces for creating and running content queries.
The main workflow follows these steps:
- The infrastructure, using infrastructure magic, provides you with a ContentServicesEngine.
- The ContentServicesEngine provides you with a ContentQueryService.
- To create a query, you first ask the ContentQueryService for a ContentQueryBuilder. You use fluent methods to configure the builder, and finally build a reusable ContentQuery object.
- To run a query, you first ask the ContentQuery for a ContentQueryRunner. You use fluent methods to configure the runner, and finally use the run() method to get a ContentQueryResult.
Example
public class QueryTest { private final ContentQuery query; public QueryTest (ContentQueryService contentQueryService) { query = contentQueryService.builder() .where(dimensionExpression().in("SYSTEST_CONTENTQUERY_DOCUMENTTYPE")) .where(objectReferenceExpression("IKB$DOCUMENT_TYPE").in("SYSTEST_DOCTYPE")) .limit(40) .build(); } public void runQuery(RepositoryClient client, int page) { ContentQueryResult result = query.runner() .skip(40 * page) .run(client); // Do something with result } }
-
Interface Summary Interface Description ContentQuery A reusable content query specification.ContentQueryBuilder A builder used to configure and build a newContentQuery
.ContentQueryExpressions.InternalExpressionFactory Non-public interface; do not use.ContentQueryOrderByClause An ordering-clause used to specifyContentQuery
ordering.ContentQueryResult A result object returned from aContentQuery
.ContentQueryRunner A one-time runner, used to execute a ContentQuery.ContentQueryService A service managing the creation and execution ofContentQuery
s. -
Class Summary Class Description ContentQueryExpressions Expression factory for creating Expression objects, for use with static imports. -
Enum Summary Enum Description ContentQueryOrder Enum constants for order directions ASC and DESC.