com.esri.arcgis.geodatabaseui
Class CalculatorCallback

java.lang.Object
  extended by com.esri.arcgis.geodatabaseui.CalculatorCallback
All Implemented Interfaces:
ICalculatorCallback, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class CalculatorCallback
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ICalculatorCallback

If the calculation engine has a class of CalculatorCallback, then it can interact with the client on the current progress.

Remarks

The default CalculatorCallback object will automatically handle status, warnings and errors generated by the Calculator object. However, more advanced users may wish to implement their own CalculatorCallback object with more sophisticated error handling capabilities.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
CalculatorCallback()
          Constructs a CalculatorCallback using ArcGIS Engine.
CalculatorCallback(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
CalculatorCallback theCalculatorCallback = (CalculatorCallback) obj;
 
Method Summary
 boolean calculatorError(int rowID, boolean bHasOID, int errorType, boolean bShowPrompt, String errorMsg)
          Error message provided by the calculator.
 void calculatorWarning(int rowID, boolean bHasOID, int errorType, String errorMsg)
          Warning message provided by the calculator.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 boolean status(int rowsWritten, boolean lastStatus)
          Current Status of the calculator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

CalculatorCallback

public CalculatorCallback()
                   throws IOException,
                          UnknownHostException
Constructs a CalculatorCallback using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

CalculatorCallback

public CalculatorCallback(Object obj)
                   throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
CalculatorCallback theCalculatorCallback = (CalculatorCallback) obj;

Construct a CalculatorCallback using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to CalculatorCallback.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

status

public boolean status(int rowsWritten,
                      boolean lastStatus)
               throws IOException,
                      AutomationException
Current Status of the calculator.

Remarks

The Status method is called for each record to be processed during the calculation operation. Feedback may be provided to the user on the number of records processed and if the calculation should be aborted. This method would normally be set to true if for example, the user pressed the ESC key.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
status in interface ICalculatorCallback
Parameters:
rowsWritten - The rowsWritten (in)
lastStatus - The lastStatus (in)
Returns:
The pAbort
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculatorError

public boolean calculatorError(int rowID,
                               boolean bHasOID,
                               int errorType,
                               boolean bShowPrompt,
                               String errorMsg)
                        throws IOException,
                               AutomationException
Error message provided by the calculator.

Remarks

CalculatorError is called when calculation process will no longer continue. Error messages, error types and the row id of the record where the calculation failed, may be written to an error log for reference.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
calculatorError in interface ICalculatorCallback
Parameters:
rowID - The rowID (in)
bHasOID - The bHasOID (in)
errorType - A com.esri.arcgis.geodatabaseui.esriCalculatorErrorType constant (in)
bShowPrompt - The bShowPrompt (in)
errorMsg - The errorMsg (in)
Returns:
The pAbort
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculatorWarning

public void calculatorWarning(int rowID,
                              boolean bHasOID,
                              int errorType,
                              String errorMsg)
                       throws IOException,
                              AutomationException
Warning message provided by the calculator.

Remarks

CalculatorWarning is called when an issue was encountered during the calculation, but the calculation can continue.You can return a flag to abort, if you want to stop processing.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
calculatorWarning in interface ICalculatorCallback
Parameters:
rowID - The rowID (in)
bHasOID - The bHasOID (in)
errorType - A com.esri.arcgis.geodatabaseui.esriCalculatorErrorType constant (in)
errorMsg - The errorMsg (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.geoDatabaseUI.ICalculator#setCursorByRef(com.esri.arcgis.geodatabase.ICursor), com.esri.arcgis.geoDatabaseUI.ICalculator#setCallbackByRef(com.esri.arcgis.geodatabaseui.ICalculatorCallback), com.esri.arcgis.geoDatabaseUI.ICalculatorCallback#calculatorError(int, boolean, int, boolean, String), com.esri.arcgis.geoDatabaseUI.ICalculator#calculate(), com.esri.arcgis.geoDatabaseUI.ICalculatorCallback#calculatorWarning(int, boolean, int, String), com.esri.arcgis.geoDatabaseUI.ICalculatorCallback, com.esri.arcgis.geoDatabaseUI.Calculator, com.esri.arcgis.geoDatabaseUI.ICalculatorCallback#status(int, boolean), com.esri.arcgis.geoDatabaseUI.ICalculator