Skip to content

Commit

Permalink
HSEARCH-1345 Adding JavaDoc for QueryBuilder and QueryContextBuilder#…
Browse files Browse the repository at this point in the history
…forEntity()
  • Loading branch information
gunnarmorling committed Jun 3, 2013
1 parent a99b9b1 commit 7dd9bf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Expand Up @@ -25,6 +25,12 @@
package org.hibernate.search.query.dsl;

/**
* Builds up Lucene queries for a given entity type following the fluent API pattern. The resulting {@link Query} can
* be obtained from the final {@link Termination} object of the invocation chain.
* </p>
* If required, the resulting {@code Query} instance can be modified or combined with other queries, be them created
* via this fluent API or using native Lucene APIs.
*
* @author Emmanuel Bernard
*/
public interface QueryBuilder {
Expand Down
Expand Up @@ -43,5 +43,16 @@
*/
public interface QueryContextBuilder {
//TODO make a forEntities

/**
* Creates an entity context which can be used to obtain a {@link QueryBuilder}.
* </p>
* Note that the passed entity type is used to verify field names, transparently apply analyzers and field bridges
* etc. The query result list, however, is not automatically restricted to the given type. Instead a type filter
* must be applied when creating the full text query in order to restrict the query result to certain entity types.
*
* @param entityType entity type used for meta data retrieval during query creation
* @return an entity context
*/
EntityContext forEntity(Class<?> entityType);
}

0 comments on commit 7dd9bf9

Please sign in to comment.