Packagecom.esri.baserver.tasks.businessessearch
Classpublic class SelectBusinessesParameters
InheritanceSelectBusinessesParameters Inheritance BAUtilityParameters Inheritance BABaseParameters Inheritance Object
Implements IBAResultProcessor

The SelectBusinessesParameters class provides input parameters for the Select Businesses task.

Business points can be selected using any combination of three search criteria—a search string criterion, a spatial filter, and business type filters. A business point will be selected if it matches all search criteria specified.

The search string criterion is specified with the searchString parameter. Its value is searched in textual attribute fields of a business point record using the following rules:

ExampleDescription
"Fireproofing" Searches for a single "FIREPROOFING" word.
"Burger King" Searches for both "BURGER" and "KING" words.
"Burger;King" Searches for "BURGER" or "KING" word.
"\"Burger King\"" Searches for "BURGER KING" phrase.
"Don*" Searches for a word starting with "DON".
"*Don" Searches for a word ending with "DON".
"Don*ld" Searches for a word starting with "DON" and ending with "LD".
"\"Burger King\";\"Mc Donald\"" Searches for "BURGER KING" or "MC DONALD" phrase.

The spatial filter is specified with the spatialFilter parameter. It restricts the search in one of three possible ways—by specifying either an analysis extent, a boundary layer, or a list of business locations.

The business type filters are specified with the businessTypeFilters parameter. This parameter contains a list of business type filters of the BusinessTypeFilter type to be subsequently applied to selected business points. For USA, either the NAICS or SIC filter is useful as a business type filter. If both filters are specified in the businessTypeFilters parameter value, selected business points will match both of them.

View the examples

See also

SelectBusinessesTask
SelectLocationsTask


Public Properties
 PropertyDefined By
 InheritedactiveDatasetID : String
Active dataset ID.
BAUtilityParameters
  businessTypeFilters : Array
An array of BusinessTypeFilter items restricting the search.
SelectBusinessesParameters
  featuresLimit : int
The limit of returned business points.
SelectBusinessesParameters
  matchExactly : Boolean
True value of the parameter means the exact match of the string to search.
SelectBusinessesParameters
  outputSpatialReference : SpatialReference
The spatial reference to return the output feature set in.
SelectBusinessesParameters
 InheritedresultType : BAResultType
[read-only] Type of a result returned by the task associated with these parameters.
BABaseParameters
  returnGeometry : Boolean
An option specifying the presence of the shape attribute in the returned record set.
SelectBusinessesParameters
  searchString : String
A string of characters which is used in the search query.
SelectBusinessesParameters
  spatialFilter : SpatialFilter
A spatial filter restricting the search.
SelectBusinessesParameters
 InheritedtaskName : String
[read-only] Name of a Business Analyst Server task associated with these parameters.
BABaseParameters
  useSimpleSearch : Boolean
True value of the parameter means a simple search (in company names only).
SelectBusinessesParameters
Public Methods
 MethodDefined By
  
Creates a new instance of the SelectBusinessesParameters class.
SelectBusinessesParameters
Property Detail
businessTypeFiltersproperty
businessTypeFilters:Array

An array of BusinessTypeFilter items restricting the search.


Implementation
    public function get businessTypeFilters():Array
    public function set businessTypeFilters(value:Array):void

See also

featuresLimitproperty 
featuresLimit:int

The limit of returned business points.

The default value is 1000.


Implementation
    public function get featuresLimit():int
    public function set featuresLimit(value:int):void
matchExactlyproperty 
matchExactly:Boolean

True value of the parameter means the exact match of the string to search.

The default value is false.


Implementation
    public function get matchExactly():Boolean
    public function set matchExactly(value:Boolean):void
outputSpatialReferenceproperty 
outputSpatialReference:SpatialReference

The spatial reference to return the output feature set in.


Implementation
    public function get outputSpatialReference():SpatialReference
    public function set outputSpatialReference(value:SpatialReference):void
returnGeometryproperty 
returnGeometry:Boolean

An option specifying the presence of the shape attribute in the returned record set.

The default value is true.


Implementation
    public function get returnGeometry():Boolean
    public function set returnGeometry(value:Boolean):void
searchStringproperty 
searchString:String

A string of characters which is used in the search query.


Implementation
    public function get searchString():String
    public function set searchString(value:String):void
spatialFilterproperty 
spatialFilter:SpatialFilter

A spatial filter restricting the search.


Implementation
    public function get spatialFilter():SpatialFilter
    public function set spatialFilter(value:SpatialFilter):void
useSimpleSearchproperty 
useSimpleSearch:Boolean

True value of the parameter means a simple search (in company names only).


Implementation
    public function get useSimpleSearch():Boolean
    public function set useSimpleSearch(value:Boolean):void
Constructor Detail
SelectBusinessesParameters()Constructor
public function SelectBusinessesParameters()

Creates a new instance of the SelectBusinessesParameters class.

Examples
ActionScript to create BusinessListingsSearchParameters and then use in the BusinessListingsSearchTask:
                     
     var parameters : SelectBusinessesParameters = new SelectBusinessesParameters();
     
     // All parameters of this task are optional. You can specify any combination of search criteria. 
     
     // Specify a string of words to search for, e.g.
     //parameters.searchString = "Fireproofing";
     
     // The matchExactly option can be used if you want to find the whole phrase as is.
     //parameters.matchExactly = true;
     
     // The useSimpleSearch option can be used if you want to search in company names only.
     //parameters.useSimpleSearch = true;
     
     // The spatialFilter parameter can restrict the analysis to a spatial/geographic extent, or to
     // a boundary layer or to a list of business locations. Allowed business locations can be retrieved
     // with the Select Locations task. When specified in spatial filter, business location fields are joined
     // into comma-separated string.
     //parameters.spatialFilter = new SpatialFilter(analysisExtent);
     //parameters.spatialFilter = new SpatialFilter(boundaries);
     //parameters.spatialFilter = new SpatialFilter(["CA,REDDING,96002", "CA,Red Mountain,93558"]);
     
     // The businessTypeFilters array can specify filters restricting the analysis to required business categories.
     // Business classification codes are considered matching if they start with any code specified in the
     // business type filter.
     //parameters.businessTypeFilters = [ new BusinessTypeFilter("NAICS", ["55", "212111", "56291001"]) ];
     
     // The featuresLimit parameter specifies the maximum number of business points to be returned.
     // Its default value is 1000.
     parameters.featuresLimit = 100;
     
     selectBusinessesTask.execute(parameters, new Responder(resultHandler, faultHandler));