com.esri.arcgis.geodatabaseui
Interface ICalculator

All Superinterfaces:
Serializable
All Known Implementing Classes:
Calculator

public interface ICalculator
extends Serializable

Provides access to members that calculate field values in a table.

When To Use

Use ICalculator interface whenever you wish to update field values in a table, which may be either a stand-alone table or the attribute table of a featureclass.

Product Availability

Available with ArcGIS Desktop.


Method Summary
 IEnvelope calculate()
          Performs the calculation by executing the pre-expression and expression.
 String getExpression()
          Expression or value applied to a field in each row of the cursor.
 String getPreExpression()
          A pre-calculation determination of a value or variable that may be used as the expression (or value) of the calculation.
 boolean isShowErrorPrompt()
          Indicates whether to show a message prompt when an error occurs during calculation.
 void setCallbackByRef(ICalculatorCallback rhs1)
          The call back routine.
 void setCursorByRef(ICursor rhs1)
          Cursor used to access the rows on which the calculation will be performed.
 void setExpression(String pExpression)
          Expression or value applied to a field in each row of the cursor.
 void setField(String rhs1)
          Field to perform the calculation on.
 void setPreExpression(String pPreExpression)
          A pre-calculation determination of a value or variable that may be used as the expression (or value) of the calculation.
 void setShowErrorPrompt(boolean pShowPrompt)
          Indicates whether to show a message prompt when an error occurs during calculation.
 

Method Detail

setCursorByRef

void setCursorByRef(ICursor rhs1)
                    throws IOException,
                           AutomationException
Cursor used to access the rows on which the calculation will be performed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
rhs1 - A reference to a com.esri.arcgis.geodatabase.ICursor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IQueryFilter

setCallbackByRef

void setCallbackByRef(ICalculatorCallback rhs1)
                      throws IOException,
                             AutomationException
The call back routine.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
rhs1 - A reference to a com.esri.arcgis.geodatabaseui.ICalculatorCallback (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setField

void setField(String rhs1)
              throws IOException,
                     AutomationException
Field to perform the calculation on.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IField

setPreExpression

void setPreExpression(String pPreExpression)
                      throws IOException,
                             AutomationException
A pre-calculation determination of a value or variable that may be used as the expression (or value) of the calculation.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
pPreExpression - The pPreExpression (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPreExpression

String getPreExpression()
                        throws IOException,
                               AutomationException
A pre-calculation determination of a value or variable that may be used as the expression (or value) of the calculation.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The pPreExpression
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExpression

void setExpression(String pExpression)
                   throws IOException,
                          AutomationException
Expression or value applied to a field in each row of the cursor.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
pExpression - The pExpression (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExpression

String getExpression()
                     throws IOException,
                            AutomationException
Expression or value applied to a field in each row of the cursor.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The pExpression
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculate

IEnvelope calculate()
                    throws IOException,
                           AutomationException
Performs the calculation by executing the pre-expression and expression.

Remarks

The calculate method returns an Envelope which covers features that have been modified by the calculation. This envelope can be used to refresh the display for the calculated area only. If the table used in the calculate is non-spatial, a null is returned.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowErrorPrompt

void setShowErrorPrompt(boolean pShowPrompt)
                        throws IOException,
                               AutomationException
Indicates whether to show a message prompt when an error occurs during calculation.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
pShowPrompt - The pShowPrompt (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowErrorPrompt

boolean isShowErrorPrompt()
                          throws IOException,
                                 AutomationException
Indicates whether to show a message prompt when an error occurs during calculation.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The pShowPrompt
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.