com.esri.adf.web.tasks
Class QueryAttributesTask

java.lang.Object
  extended by com.esri.adf.web.tasks.QueryAttributesTask
All Implemented Interfaces:
TaskInfoBean, WebContextInitialize, Serializable

public class QueryAttributesTask
extends Object
implements WebContextInitialize, TaskInfoBean, Serializable

See Also:
Serialized Form

Field Summary
static String DATE_TYPE
           
static String NUMERIC_TYPE
           
static String STRING_TYPE
           
 
Constructor Summary
QueryAttributesTask()
           
 
Method Summary
 void clearGraphics()
           
 void destroy()
           The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in this method.
 String getDisplayFieldName()
          Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getDisplayFieldName()
 String getDisplayName()
           
 TaskParamDescriptor[] getExpressionParams()
           
 List<? extends QueryAttributesExpression> getExpressions()
           
 String getFieldName()
          Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.getFieldName()
 String getFieldType()
          Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.getFieldType()
 String getFindButtonText()
           
 String getHelpURL()
           
 LayerDefinition getLayerDefinition()
          Returns the LayerDefinition object.
 int getLayerId()
           
 int getMaxRecordCount()
          Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getMaxRecordCount()
 String getOperator()
          Returns the operator used for combining expressions.
 String getQueryValue()
          Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.getFieldValue()
 GISResource getResource()
          Deprecated. As of ArcGIS Java Server 9.3, instead get the resource from WebContext.getResourceById(String) based on the resource id.
 String getResourceId()
           
 String getReturnFields()
          Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getReturnFields()
 QueryAttributesTaskConfig getTaskConfig()
          Deprecated. As of ArcGIS Java Server 9.3, instead use this class to get all properties
 TaskInfo getTaskInfo()
           
 String getToolTip()
           
 WebContext getWebContext()
           
 String getWhereClause()
           
 void init(WebContext webContext)
           The initialization chores of attributes of a WebContext should be performed in this method.
 boolean isShowInfoWindow()
          Returns true if the task result(s) to be shown in the info window.
 void query(TaskEvent event)
           
 List<QueryResult> query(WebContext webContext)
          Query features on the map based on the specified context.
 void setDisplayFieldName(String displayFieldName)
          Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setDisplayFieldName(String)
 void setDisplayName(String displayName)
           
 void setExpressions(List<QueryAttributesExpression> expressions)
           
 void setFieldName(String fieldName)
          Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.setFieldName(String)
 void setFieldType(String fieldType)
          Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.setFieldType(String)
 void setFindButtonText(String findButtonText)
           
 void setHelpURL(String helpURL)
           
 void setLayerDefinition(LayerDefinition layerDefinition)
          Sets the LayerDefinition object.
 void setLayerId(int layerId)
           
 void setMaxRecordCount(int count)
          Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setMaxRecordCount(int)
 void setOperator(String operator)
          Sets the operator used for combining expressions.
 void setQueryValue(String fieldValue)
          Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.setFieldValue(String)
 void setResource(GISResource resource)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setResourceId(java.lang.String)
 void setResourceId(String resourceId)
           
 void setReturnFields(String returnFields)
          Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setReturnFields(List)
 void setShowInfoWindow(boolean showInfoWindow)
          Sets whether the task result(s) to be shown in the info window or not.
 void setTaskConfig(QueryAttributesTaskConfig config)
          Deprecated. As of ArcGIS Java Server 9.3, instead use this class to set all properties
 void setTaskInfo(TaskInfo taskInfo)
           
 void setToolTip(String toolTip)
           
 void setWebContext(WebContext webContext)
          Deprecated. As of ArcGIS Java Server 9.3, no replacement
 void setWhereClause(String whereClause)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING_TYPE

public static final String STRING_TYPE
See Also:
Constant Field Values

NUMERIC_TYPE

public static final String NUMERIC_TYPE
See Also:
Constant Field Values

DATE_TYPE

public static final String DATE_TYPE
See Also:
Constant Field Values
Constructor Detail

QueryAttributesTask

public QueryAttributesTask()
Method Detail

init

public void init(WebContext webContext)
Description copied from interface: WebContextInitialize

The initialization chores of attributes of a WebContext should be performed in this method.

Typically this method is called by the WebContext when the context itself is initialized. It is important to note that this method is again called by the context when a GISResource is dynamically added to or removed from the context. Classes that implement this method should keep this in mind and adapt the method to react to the callbacks in these circumstances as well.

A WebContext attribute is usable only after this method has been called.

Specified by:
init in interface WebContextInitialize
Parameters:
webContext - WebContext- the WebContext
See Also:
WebContext.init(WebContext), WebContext.addResource(String, GISResource, int), WebContext.removeResource(GISResource)

destroy

public void destroy()
Description copied from interface: WebContextInitialize

The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in this method.

Typically this method is called by the WebContext when the context itself is destroyed.

The WebContext attribute is unusable after this method has been called.

Specified by:
destroy in interface WebContextInitialize
See Also:
WebContext.destroy()

getWebContext

public WebContext getWebContext()

setTaskInfo

public void setTaskInfo(TaskInfo taskInfo)
Specified by:
setTaskInfo in interface TaskInfoBean

getTaskInfo

public TaskInfo getTaskInfo()
Specified by:
getTaskInfo in interface TaskInfoBean

query

public void query(TaskEvent event)

query

public List<QueryResult> query(WebContext webContext)
Query features on the map based on the specified context.

Parameters:
webContext - the context object, passing null will use the context from this object
Returns:
the list of query result(s)

clearGraphics

public void clearGraphics()

setWhereClause

public void setWhereClause(String whereClause)

getWhereClause

public String getWhereClause()

getDisplayName

public String getDisplayName()

setDisplayName

public void setDisplayName(String displayName)

getHelpURL

public String getHelpURL()

setHelpURL

public void setHelpURL(String helpURL)

getToolTip

public String getToolTip()

setToolTip

public void setToolTip(String toolTip)

getFindButtonText

public String getFindButtonText()

setFindButtonText

public void setFindButtonText(String findButtonText)

getResourceId

public String getResourceId()

setResourceId

public void setResourceId(String resourceId)

getLayerId

public int getLayerId()

setLayerId

public void setLayerId(int layerId)

getExpressions

public List<? extends QueryAttributesExpression> getExpressions()

setExpressions

public void setExpressions(List<QueryAttributesExpression> expressions)

getOperator

public String getOperator()
Returns the operator used for combining expressions.

Returns:
the operator used for combining expressions

setOperator

public void setOperator(String operator)
Sets the operator used for combining expressions. By default the operator is "AND".
   For example,
     [expression1 OR expression2]
   where
     expression1 = "CITY_NAME LIKE 'Red%'"
     expression2 = "POP > 10000"
   Here "OR" is set using setOperator(String)
 

Parameters:
operator - the operator used for combining expressions

setLayerDefinition

public void setLayerDefinition(LayerDefinition layerDefinition)
Sets the LayerDefinition object.

Parameters:
layerDefinition - the layer definition object

getLayerDefinition

public LayerDefinition getLayerDefinition()
Returns the LayerDefinition object.

Returns:
the layer definition object

setShowInfoWindow

public void setShowInfoWindow(boolean showInfoWindow)
Sets whether the task result(s) to be shown in the info window or not. By default the value is true

Parameters:
showInfoWindow - if true, info window is shown

isShowInfoWindow

public boolean isShowInfoWindow()
Returns true if the task result(s) to be shown in the info window.

Returns:
true if info window to be shown

getExpressionParams

public TaskParamDescriptor[] getExpressionParams()

setTaskConfig

@Deprecated
public void setTaskConfig(QueryAttributesTaskConfig config)
Deprecated. As of ArcGIS Java Server 9.3, instead use this class to set all properties

Sets the query attributes task config object.

Parameters:
config - the query attributes task config object

getTaskConfig

@Deprecated
public QueryAttributesTaskConfig getTaskConfig()
Deprecated. As of ArcGIS Java Server 9.3, instead use this class to get all properties

Return the query attributes task config object.

Returns:
the query attributes task config object

setWebContext

@Deprecated
public void setWebContext(WebContext webContext)
Deprecated. As of ArcGIS Java Server 9.3, no replacement


setResource

@Deprecated
public void setResource(GISResource resource)
Deprecated. As of ArcGIS Java Server 9.3, instead use setResourceId(java.lang.String)

Set the GISResource object in which the attributes are searched.

Parameters:
resource - the GISResource object.

getResource

@Deprecated
public GISResource getResource()
Deprecated. As of ArcGIS Java Server 9.3, instead get the resource from WebContext.getResourceById(String) based on the resource id.

Returns the GISResource object.

Returns:
the GISResource object

getDisplayFieldName

@Deprecated
public String getDisplayFieldName()
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getDisplayFieldName()


setDisplayFieldName

@Deprecated
public void setDisplayFieldName(String displayFieldName)
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setDisplayFieldName(String)


getReturnFields

@Deprecated
public String getReturnFields()
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getReturnFields()


setReturnFields

@Deprecated
public void setReturnFields(String returnFields)
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setReturnFields(List)


getMaxRecordCount

@Deprecated
public int getMaxRecordCount()
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.getMaxRecordCount()


setMaxRecordCount

@Deprecated
public void setMaxRecordCount(int count)
Deprecated. As of ArcGIS Java Server 9.3, instead use LayerDefinition.setMaxRecordCount(int)


getFieldName

@Deprecated
public String getFieldName()
Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.getFieldName()


setFieldName

@Deprecated
public void setFieldName(String fieldName)
Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.setFieldName(String)


getQueryValue

@Deprecated
public String getQueryValue()
Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.getFieldValue()


setQueryValue

@Deprecated
public void setQueryValue(String fieldValue)
Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.setFieldValue(String)


getFieldType

@Deprecated
public String getFieldType()
Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.getFieldType()


setFieldType

@Deprecated
public void setFieldType(String fieldType)
Deprecated. As of ArcGIS Java Server 9.3, instead use QueryAttributesExpression.setFieldType(String)

Sets the field type, by default the value is STRING_TYPE

Parameters:
fieldType - the field type