com.esri.core.tasks.ags.query
Class Query

java.lang.Object
  extended by com.esri.core.tasks.ags.query.Query

public class Query
extends Object

Class holding the parameters of a query to be executed on the server.

In this class, you can define:

  • a where clause
  • a literal search text
  • a geometry to apply as the spatial filter
  • a spatial relationship to be applied on the input geometry
  • the spatial reference of the input geometry
  • the spatial reference of the returned geometry
  • if the result set must include the geometry associated with each result
  • the list of fields to be included in the returned result set
  • the object IDs of this layer / table to be queried
  • if the response should only include an array of object IDs or otherwise, a feature set

  • Constructor Summary
    Query()
              Default constructor
     
    Method Summary
     boolean equals(Object obj)
               
     Geometry getGeometry()
              Returns the geometry to apply as the spatial filter.
     SpatialReference getInSpatialReference()
              Returns the spatial reference of the input geometry.
     double getMaxAllowableOffset()
              Returns the maximum allowable offset.
     int getMaxFeatures()
               
     int[] getObjectIds()
              Returns the object IDs of this layer/table to be queried.
     String[] getOutFields()
              Returns the array of fields to be included in the returned result set.
     SpatialReference getOutSpatialReference()
              Returns the spatial reference of the returned geometry.
     SpatialRelationship getSpatialRelationship()
              Returns the spatial relationship to be applied on the input geometry.
     String getText()
              Returns the literal search text.
     String getWhere()
              Returns the where clause for the query.
     int hashCode()
               
     boolean isReturnGeometry()
              Returns true if the result set includes the geometry associated with each result.
     boolean isReturnIdsOnly()
              Returns true if the response only includes an array of object IDs.
     void setGeometry(Geometry geometry)
              Sets the geometry to apply as the spatial filter.
     void setInSpatialReference(SpatialReference inSR)
              Sets the spatial reference of the input geometry.
     void setMaxAllowableOffset(double maxAllowableOffset)
              Sets the maximum allowable offset.
     void setMaxFeatures(int maxFeatures)
               
     void setObjectIds(int[] objectIds)
              Sets the object IDs of this layer/table to be queried.
     void setOutFields(String[] outFields)
              Sets the array of fields to be included in the returned result set.
     void setOutSpatialReference(SpatialReference outSR)
              Sets the spatial reference of the returned geometry.
     void setReturnGeometry(boolean returnGeometry)
              Sets if the result set should include the geometry associated with each result
     void setReturnIdsOnly(boolean returnIdsOnly)
              Sets if the response should only include the object IDs
     void setSpatialRelationship(SpatialRelationship spatialRelationship)
              Sets the spatial relationship to be applied on the input geometry.
     void setText(String text)
              Sets the literal search text.
     void setWhere(String where)
              Sets the where clause for the query.
     
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    Query

    public Query()
    Default constructor

    Method Detail

    getWhere

    public String getWhere()
    Returns the where clause for the query.

    Returns:
    the where clause

    setWhere

    public void setWhere(String where)
    Sets the where clause for the query.

    Parameters:
    where - the where clause to set

    getText

    public String getText()
    Returns the literal search text.

    Returns:
    the literal search text

    setText

    public void setText(String text)
    Sets the literal search text.

    Parameters:
    text - the literal search text

    getGeometry

    public Geometry getGeometry()
    Returns the geometry to apply as the spatial filter.

    Returns:
    the geometry to apply as the spatial filter

    setGeometry

    public void setGeometry(Geometry geometry)
    Sets the geometry to apply as the spatial filter.

    Parameters:
    geometry - the geometry to apply as the spatial filter

    getSpatialRelationship

    public SpatialRelationship getSpatialRelationship()
    Returns the spatial relationship to be applied on the input geometry.

    Returns:
    the spatial relationship

    setSpatialRelationship

    public void setSpatialRelationship(SpatialRelationship spatialRelationship)
    Sets the spatial relationship to be applied on the input geometry.

    Parameters:
    spatialRelationship - the spatial relationship

    getOutSpatialReference

    public SpatialReference getOutSpatialReference()
    Returns the spatial reference of the returned geometry.

    Returns:
    the spatial reference of the returned geometry.

    setOutSpatialReference

    public void setOutSpatialReference(SpatialReference outSR)
    Sets the spatial reference of the returned geometry.

    Parameters:
    outSR - the spatial reference of the returned geometry.

    getInSpatialReference

    public SpatialReference getInSpatialReference()
    Returns the spatial reference of the input geometry.

    Returns:
    the spatial reference of the input geometry

    setInSpatialReference

    public void setInSpatialReference(SpatialReference inSR)
    Sets the spatial reference of the input geometry.

    Parameters:
    inSR - the spatial reference of the input geometry

    setReturnGeometry

    public void setReturnGeometry(boolean returnGeometry)
    Sets if the result set should include the geometry associated with each result

    Parameters:
    returnGeometry - true for the result set to include the geometry associated with each result

    isReturnGeometry

    public boolean isReturnGeometry()
    Returns true if the result set includes the geometry associated with each result. The default is true.

    Returns:
    true if the result set includes the geometry associated with each result, false otherwise

    setOutFields

    public void setOutFields(String[] outFields)
    Sets the array of fields to be included in the returned result set.

    Parameters:
    outFields - an array of field names

    getOutFields

    public String[] getOutFields()
    Returns the array of fields to be included in the returned result set.

    Returns:
    an array of field names

    setObjectIds

    public void setObjectIds(int[] objectIds)
    Sets the object IDs of this layer/table to be queried.

    Parameters:
    objectIds - an array of ObjectIds

    getObjectIds

    public int[] getObjectIds()
    Returns the object IDs of this layer/table to be queried.

    Returns:
    the array of ObjectIDs

    setReturnIdsOnly

    public void setReturnIdsOnly(boolean returnIdsOnly)
    Sets if the response should only include the object IDs

    Parameters:
    returnIdsOnly - true for the response only to include the object IDs

    isReturnIdsOnly

    public boolean isReturnIdsOnly()
    Returns true if the response only includes an array of object IDs.

    Returns:
    true if the response only includes an array of object IDs, false otherwise

    setMaxAllowableOffset

    public void setMaxAllowableOffset(double maxAllowableOffset)
    Sets the maximum allowable offset.

    Parameters:
    maxAllowableOffset -

    getMaxAllowableOffset

    public double getMaxAllowableOffset()
    Returns the maximum allowable offset.

    Returns:
    the maximum allowable offset

    setMaxFeatures

    public void setMaxFeatures(int maxFeatures)
    Parameters:
    maxFeatures - the maxFeatures to set

    getMaxFeatures

    public int getMaxFeatures()
    Returns:
    the maxFeatures

    hashCode

    public int hashCode()
    Overrides:
    hashCode in class Object

    equals

    public boolean equals(Object obj)
    Overrides:
    equals in class Object


    Copyright © 2012. All Rights Reserved.