com.esri.adf.web.util
Class QueryUtil

java.lang.Object
  extended by com.esri.adf.web.util.QueryUtil

public class QueryUtil
extends Object

This utility class is mainly used for Query Operations.


Method Summary
static LayerDefinition getLayerDefinition(List<? extends LayerDefinition> layerDefinitions, String resourceId, int layerId)
          Returns the layer definition object from the layer definition list based on the specified resource and layer id.
static Map<Integer,String> getLayerMap(List<? extends WebLayerInfo> layerList)
          Returns the key value pair with layer index and layer name of all the resource(s).
static WebLayerInfo getWebLayerInfo(List<? extends WebLayerInfo> layerList, GISResource resource, int layerId)
          Returns the WebLayerInfo object from the list of WebLayerInfo objects based on the specified layer id and resource object.
static Map<String,Object> replaceAliasName(Map<? extends String,?> details, Map<? extends String,? extends String> aliases)
          Convenient method to replace the default field name with the alias field name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLayerDefinition

public static LayerDefinition getLayerDefinition(List<? extends LayerDefinition> layerDefinitions,
                                                 String resourceId,
                                                 int layerId)
Returns the layer definition object from the layer definition list based on the specified resource and layer id.

Parameters:
layerDefinitions - the list of layer definition objects
resourceId - the resource id
layerId - the layer id
Returns:
the LayerDefinition object

replaceAliasName

public static Map<String,Object> replaceAliasName(Map<? extends String,?> details,
                                                  Map<? extends String,? extends String> aliases)
Convenient method to replace the default field name with the alias field name.

Parameters:
details - the default field name and the value
aliases - the default and alias field name
Returns:
the key value pair which has the alias field name and the value

getLayerMap

public static Map<Integer,String> getLayerMap(List<? extends WebLayerInfo> layerList)
Returns the key value pair with layer index and layer name of all the resource(s).
  WebContext wContext = ....;
  Map layers = SearchAttributesUtil.getLayerMap(wContext.getWebQuery().getQueryLayers());
 

Parameters:
layerList - the list of WebLayerInfo objects
Returns:
Map the key value pair with layer index and layer name of all the resource(s).

getWebLayerInfo

public static WebLayerInfo getWebLayerInfo(List<? extends WebLayerInfo> layerList,
                                           GISResource resource,
                                           int layerId)
Returns the WebLayerInfo object from the list of WebLayerInfo objects based on the specified layer id and resource object.

Parameters:
layerList - the list of WebLayerInfo objects
resource - the GISResource object
layerId - the layer id
Returns:
the WebLayerInfo object