org.qi4j.index.solr.internal
Class SolrEntityQueryMixin

java.lang.Object
  extended by org.qi4j.index.solr.internal.SolrEntityQueryMixin
All Implemented Interfaces:
SolrSearch, EntityFinder

public class SolrEntityQueryMixin
extends java.lang.Object
implements EntityFinder, SolrSearch

JAVADOC


Constructor Summary
SolrEntityQueryMixin()
           
 
Method Summary
 long countEntities(java.lang.Class<?> resultType, Specification<Composite> whereClause, java.util.Map<java.lang.String,java.lang.Object> variables)
          Count entities matching the query criterion.
 java.lang.Iterable<EntityReference> findEntities(java.lang.Class<?> resultType, Specification<Composite> whereClause, OrderBy[] orderBySegments, java.lang.Integer firstResult, java.lang.Integer maxResults, java.util.Map<java.lang.String,java.lang.Object> variables)
          Find entities matching the query criterion.
 EntityReference findEntity(java.lang.Class<?> resultType, Specification<Composite> whereClause, java.util.Map<java.lang.String,java.lang.Object> variables)
          Find a single entity matching the query criterion.
 org.apache.solr.common.SolrDocumentList search(java.lang.String queryString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolrEntityQueryMixin

public SolrEntityQueryMixin()
Method Detail

findEntities

public java.lang.Iterable<EntityReference> findEntities(java.lang.Class<?> resultType,
                                                        @Optional
                                                        Specification<Composite> whereClause,
                                                        @Optional
                                                        OrderBy[] orderBySegments,
                                                        @Optional
                                                        java.lang.Integer firstResult,
                                                        @Optional
                                                        java.lang.Integer maxResults,
                                                        java.util.Map<java.lang.String,java.lang.Object> variables)
                                                 throws EntityFinderException
Description copied from interface: EntityFinder
Find entities matching the query criterion.

Specified by:
findEntities in interface EntityFinder
Parameters:
resultType - Type that the entities must have.
whereClause - Where clause specification.
orderBySegments - Ordering
firstResult - Index of the first returned entity.
maxResults - Maximum returned entities.
variables - Query variables
Returns:
Single entity matching the query criterion.
Throws:
EntityFinderException

findEntity

public EntityReference findEntity(java.lang.Class<?> resultType,
                                  @Optional
                                  Specification<Composite> whereClause,
                                  java.util.Map<java.lang.String,java.lang.Object> variables)
                           throws EntityFinderException
Description copied from interface: EntityFinder
Find a single entity matching the query criterion.

Specified by:
findEntity in interface EntityFinder
Parameters:
resultType - Type that the entity must have.
whereClause - Where clause specification.
variables - Query variables
Returns:
Single entity matching the query criterion.
Throws:
EntityFinderException

countEntities

public long countEntities(java.lang.Class<?> resultType,
                          @Optional
                          Specification<Composite> whereClause,
                          java.util.Map<java.lang.String,java.lang.Object> variables)
                   throws EntityFinderException
Description copied from interface: EntityFinder
Count entities matching the query criterion.

Specified by:
countEntities in interface EntityFinder
Parameters:
resultType - Type that the entities must have.
whereClause - Where clause specification.
variables - Query variables
Returns:
Count entities matching the query criterion.
Throws:
EntityFinderException

search

public org.apache.solr.common.SolrDocumentList search(java.lang.String queryString)
                                               throws org.apache.solr.client.solrj.SolrServerException
Specified by:
search in interface SolrSearch
Throws:
org.apache.solr.client.solrj.SolrServerException