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

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

public class OutStatistics
extends Object

The definitions for one or more field-based statistic to be calculated Note:

Values: An array of statistic definitions. A statistic definition specifies the type of statistic, the field on which it is to be calculated, and the resulting output field name.

Since:
10.1.1

Nested Class Summary
static class OutStatistics.Type
           
 
Constructor Summary
OutStatistics(OutStatistics.Type type, String onStatisticField, String outStatisticFieldName)
          Instantiates an object of OutStatistic.
 
Method Summary
 boolean equals(Object obj)
           
 String getOnStatisticField()
          Gets the onStatisticField of the OutStatistic.
 String getOutStatisticFieldName()
          Gets the outStatisticFieldName of the OutStatistic.
 OutStatistics.Type getType()
          Gets the type of the OutStatistic.
 int hashCode()
           
 boolean isEmpty()
          Return true if all the fields are null.
 void setOnStatisticField(String onStatisticField)
          Sets the onStatisticField of the OutStatistic.
 void setOutStatisticFieldName(String outStatisticFieldName)
          Sets the outStatisticFieldName of the OutStatistic.
 void setType(OutStatistics.Type type)
          Sets the type of the OutStatistic.
 String toJson()
          Returns null if the instance is empty.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutStatistics

public OutStatistics(OutStatistics.Type type,
                     String onStatisticField,
                     String outStatisticFieldName)
Instantiates an object of OutStatistic.

Parameters:
type - the type: OutStatistics.Type
onStatisticField - the field name e.g. "pop2007"
outStatisticFieldName - the out field name e.g. "Population_2007"
Since:
10.1.1
Method Detail

getType

public OutStatistics.Type getType()
Gets the type of the OutStatistic.

Returns:
Returns the type.
Since:
10.1.1

setType

public void setType(OutStatistics.Type type)
Sets the type of the OutStatistic.

Parameters:
type - The type to set.
Since:
10.1.1

getOnStatisticField

public String getOnStatisticField()
Gets the onStatisticField of the OutStatistic.

Returns:
Returns the onStatisticField.
Since:
10.1.1

setOnStatisticField

public void setOnStatisticField(String onStatisticField)
Sets the onStatisticField of the OutStatistic.

Parameters:
onStatisticField - The onStatisticField to set.
Since:
10.1.1

getOutStatisticFieldName

public String getOutStatisticFieldName()
Gets the outStatisticFieldName of the OutStatistic.

Returns:
Returns the outStatisticFieldName.
Since:
10.1.1

setOutStatisticFieldName

public void setOutStatisticFieldName(String outStatisticFieldName)
Sets the outStatisticFieldName of the OutStatistic.

Parameters:
outStatisticFieldName - The outStatisticFieldName to set.
Since:
10.1.1

isEmpty

public boolean isEmpty()
Return true if all the fields are null.

Returns:
true if all the fields are null.
Since:
10.1.1

toJson

public String toJson()
Returns null if the instance is empty.

Syntax:

 [
   {
     "statisticType": "",
     "onStatisticField": "Field1", 
     "outStatisticFieldName": "Out_Field_Name1"
   },
   {
     "statisticType": "",
     "onStatisticField": "Field2",
     "outStatisticFieldName": "Out_Field_Name2"
   }  
 ]
 
Example:
 [
   {
     "statisticType": "sum",
     "onStatisticField": "GENDER",
     "outStatisticFieldName": "PopulationByGender"
   },
   {
     "statisticType": "avg",
     "onStatisticField": "INCOME",
     "outStatisticFieldName": "AverageIncome"
   }
 ]
 
 

Returns:
null if the instance is empty.
Since:
10.1.1

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.