org.modeshape.graph.request
Class AccessQueryRequest

java.lang.Object
  extended by org.modeshape.graph.request.Request
      extended by org.modeshape.graph.request.SearchRequest
          extended by org.modeshape.graph.request.AccessQueryRequest
All Implemented Interfaces:
Serializable

public class AccessQueryRequest
extends SearchRequest

A Request to issue an access query a graph, where an access query is a low-level atomic query that is part of a large, planned query.

See Also:
Serialized Form

Constructor Summary
AccessQueryRequest(String workspace, SelectorName tableName, QueryResults.Columns resultColumns, List<Constraint> andedConstraints, Limit limit, Schemata schemata, Map<String,Object> variables)
          Create a new request to execute the supplied query against the name workspace.
 
Method Summary
 List<Constraint> andedConstraints()
          Get the immutable list of constraints that are AND-ed together in this query.
 boolean equals(Object obj)
          
 RequestType getType()
          Returns the type of the request
 int hashCode()
          
 Limit limit()
          Get the limit of the result tuples, which can specify a maximum number of rows as well as an initial offset for the first row.
 QueryResults.Columns resultColumns()
          Get the specification of the columns for the results.
 Schemata schemata()
          Get the schemata that defines the table structure and columns definitions available to this query.
 SelectorName selectorName()
          Get the name of the selector (or table) that is being queried.
 void setResults(List<Object[]> tuples, QueryResults.Statistics statistics)
          Set the results for this request.
 String toString()
          
 Map<String,Object> variables()
          The variables that are available to be substituted upon execution.
 String workspace()
          Get the name of the workspace in which the node exists.
 
Methods inherited from class org.modeshape.graph.request.SearchRequest
cancel, columns, doSetResults, getStatistics, getTuples, isReadOnly
 
Methods inherited from class org.modeshape.graph.request.Request
checkNotFrozen, freeze, getError, hasError, isCancelled, isFrozen, setError, setLatchForFreezing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessQueryRequest

public AccessQueryRequest(String workspace,
                          SelectorName tableName,
                          QueryResults.Columns resultColumns,
                          List<Constraint> andedConstraints,
                          Limit limit,
                          Schemata schemata,
                          Map<String,Object> variables)
Create a new request to execute the supplied query against the name workspace.

Parameters:
workspace - the name of the workspace to be queried
tableName - the name of the selector (or table) being queried
resultColumns - the specification of the expected columns in the result tuples
andedConstraints - the list of AND-ed constraints; may be empty or null if there are no constraints
limit - the limit on the results; may be null if there is no limit
schemata - the schemata that defines the table and columns being queried; may not be null
variables - the variables that are available to be substituted upon execution; may be null if there are no variables
Throws:
IllegalArgumentException - if the query or workspace name is null
Method Detail

workspace

public String workspace()
Get the name of the workspace in which the node exists.

Returns:
the name of the workspace; never null

selectorName

public SelectorName selectorName()
Get the name of the selector (or table) that is being queried.

Returns:
the selector name; never null

resultColumns

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

Returns:
the column specifications; never null

andedConstraints

public List<Constraint> andedConstraints()
Get the immutable list of constraints that are AND-ed together in this query. Every tuple in the results must satisfy all of these constraints.

Returns:
the AND-ed constraints; never null but possibly empty if there are no constraints

variables

public Map<String,Object> variables()
The variables that are available to be substituted upon execution.

Returns:
the variables; never null but possibly empty

schemata

public Schemata schemata()
Get the schemata that defines the table structure and columns definitions available to this query.

Returns:
the schemata; never null

limit

public Limit limit()
Get the limit of the result tuples, which can specify a maximum number of rows as well as an initial offset for the first row.

Returns:
the limit; never null but may be unlimited if there is no effective limit

setResults

public void setResults(List<Object[]> tuples,
                       QueryResults.Statistics statistics)
Set the results for this request.

Parameters:
tuples - the result values
statistics - the statistics, or null if there are none

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

getType

public RequestType getType()
Description copied from class: Request
Returns the type of the request

Specified by:
getType in class Request
Returns:
the type of the request


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