org.modeshape.graph.request
Class SearchRequest

java.lang.Object
  extended by org.modeshape.graph.request.Request
      extended by org.modeshape.graph.request.SearchRequest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccessQueryRequest, FullTextSearchRequest

public abstract class SearchRequest
extends Request

A Request to search or query a graph.

See Also:
Serialized Form

Constructor Summary
SearchRequest()
           
 
Method Summary
 void cancel()
          Cancel this request.
protected  QueryResults.Columns columns()
          Get the specification of the columns for the results.
protected  void doSetResults(QueryResults.Columns resultColumns, List<Object[]> tuples, QueryResults.Statistics statistics)
          Set the results for this request.
 QueryResults.Statistics getStatistics()
          Get the statistics that describe the time metrics for this query.
 List<Object[]> getTuples()
          Get the results of this query.
 boolean isReadOnly()
          Return whether this request only reads information.
 
Methods inherited from class org.modeshape.graph.request.Request
checkNotFrozen, freeze, getError, getType, hasError, isCancelled, isFrozen, printable, printable, setError, setLatchForFreezing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchRequest

public SearchRequest()
Method Detail

isReadOnly

public final boolean isReadOnly()
Return whether this request only reads information.

Specified by:
isReadOnly in class Request
Returns:
true if this request reads information, or false if it requests that the repository content be changed in some way
See Also:
Request.isReadOnly()

doSetResults

protected void doSetResults(QueryResults.Columns resultColumns,
                            List<Object[]> tuples,
                            QueryResults.Statistics statistics)
Set the results for this request.

Parameters:
resultColumns - the definition of the result columns
tuples - the result values
statistics - the statistics, or null if there are none

columns

protected QueryResults.Columns columns()
Get the specification of the columns for the results.

Returns:
the column specifications; never null

getTuples

public List<Object[]> getTuples()
Get the results of this query.

Returns:
the results of the query, or null if this request has not been processed

getStatistics

public QueryResults.Statistics getStatistics()
Get the statistics that describe the time metrics for this query.

Returns:
the statistics; may be null if there are no statistics

cancel

public void cancel()
Cancel this request. After this method is called, the cancellation flag is set, and any current or future processing of the request may be affected by the cancellation. (Note however, that processors may choose to not respect this request.)

This method is safe to be called by different threads.

Overrides:
cancel in class Request
See Also:
Request.cancel()


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.