Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amentra.metamatrix.solr
Class SyncQueryExecution

    java.lang.Object
      com.amentra.metamatrix.solr.SyncQueryExecution

All Implemented Interfaces:
  com.metamatrix.data.api.BatchedExecution, com.metamatrix.data.api.Execution, com.metamatrix.data.api.SynchQueryExecution

    public class SyncQueryExecution

extends java.lang.Object
implements com.metamatrix.data.api.SynchQueryExecution

Supports read-only, synchronious queries that are translated to Solr searches and executed.

Author:
  Michael Walker

Constructor Summary
`SyncQueryExecution(com.metamatrix.data.metadata.runtime.RuntimeMetadata md, org.apache.solr.client.solrj.impl.CommonsHttpSolrServer server, com.metamatrix.data.api.ConnectorLogger logger, boolean useLowerCase)`

Method Summary
`void` | `cancel()` Does nothing, since we call the query synchronously.
`void` | `close()` Does nothing, since there is no matching close() method for the QueryResponse.
`void` | `execute(com.metamatrix.data.language.IQuery query, int maxBatchSize)` Uses a visitor to process the IQuery and extract the parameters for a SolrQuery search, and then executes the search, retrieving a list of Documents that match the criteria.
`com.metamatrix.data.api.Batch` | `nextBatch()` Pull the field values from the list of documents until a batch is fulfilled or the end of the document list is reached.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SyncQueryExecution

    public SyncQueryExecution(com.metamatrix.data.metadata.runtime.RuntimeMetadata md,
                              org.apache.solr.client.solrj.impl.CommonsHttpSolrServer server,
                              com.metamatrix.data.api.ConnectorLogger logger,
                              boolean useLowerCase)

Method Detail

### execute

    public void execute(com.metamatrix.data.language.IQuery query,
                        int maxBatchSize)
                 throws com.metamatrix.data.exception.ConnectorException

  Uses a visitor to process the IQuery and extract the parameters for a SolrQuery search, and then executes the search, retrieving a list of Documents that match the criteria.

  Specified by:
    `execute` in interface `com.metamatrix.data.api.SynchQueryExecution`
  Throws:
    `com.metamatrix.data.exception.ConnectorException`
  See Also:
    `SynchQueryExecution.execute(com.metamatrix.data.language.IQuery, int)`

### nextBatch

    public com.metamatrix.data.api.Batch nextBatch()
                                            throws com.metamatrix.data.exception.ConnectorException

  Pull the field values from the list of documents until a batch is fulfilled or the end of the document list is reached. If a field contains multiple values, only the first value returned by Solr will be returned. Only string values will be handled.

  Specified by:
    `nextBatch` in interface `com.metamatrix.data.api.BatchedExecution`
  Throws:
    `com.metamatrix.data.exception.ConnectorException`
  See Also:
    `BatchedExecution.nextBatch()`

### cancel

    public void cancel()
                throws com.metamatrix.data.exception.ConnectorException

  Does nothing, since we call the query synchronously.

  Specified by:
    `cancel` in interface `com.metamatrix.data.api.Execution`
  Throws:
    `com.metamatrix.data.exception.ConnectorException`
  See Also:
    `Execution.cancel()`

### close

    public void close()
               throws com.metamatrix.data.exception.ConnectorException

  Does nothing, since there is no matching close() method for the QueryResponse.

  Specified by:
    `close` in interface `com.metamatrix.data.api.Execution`
  Throws:
    `com.metamatrix.data.exception.ConnectorException`
  See Also:
    `Execution.close()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD