Clear Up
SharpKit Reference

Operation Class

Namespace: Ext.data

Base Types

System.Object

Constructors

Name Description
Operation()
Operation(OperationConfig)
Operation(object) Creates new Operation object. @param {Object} config (optional) Config object.

Properties

Name Description
actionCommitRecordsRe @property {RegExp} actionCommitRecordsRe The RegExp used to categorize actions that require_ record commits. This defaults to match 'create' and 'update'.
actionSkipSyncRe @property {RegExp} actionSkipSyncRe The RegExp used to categorize actions that skip local record synchronization. This defaults to match 'destroy'.
Batch @private Associates this Operation with a Batch @param {Ext.data.Batch} batch The batch
complete @property {Boolean} complete Read-only property tracking the completion status of this Operation. Use {@link #isComplete}. @private
Error Returns the error string or object that was set using {@link #setException} @return {String/Object} The error object
exception @property {Boolean} exception Read-only property tracking the exception status of this Operation. Use {@link #hasException} and see {@link #getError}. @private
Exception Marks the Operation as having experienced an exception. Can be supplied with an option error message/object. @param {String/Object} error (optional) error string/object
ResultSet Returns the ResultSet object (if set by the Proxy). This object will contain the {@link Ext.data.Model model} instances as well as meta data such as number of instances fetched, number available etc @return {Ext.data.ResultSet} The ResultSet object
running @property {Boolean} running Read-only property tracking the run status of this Operation. Use {@link #isRunning}. @private
started @property {Boolean} started Read-only property tracking the start status of this Operation. Use {@link #isStarted}. @private
synchronous @cfg {Boolean} synchronous True if this Operation is to be executed synchronously (defaults to true). This property is inspected by a {@link Ext.data.Batch Batch} to see if a series of Operations can be executed in parallel or not.

Methods

Name Description
allowWrite() Checks whether this operation should cause writing to occur. @return {Boolean} Whether the operation should cause a write to occur.
commitRecords(object) This method is called to commit data to this instance's records given the records in the server response. This is followed by calling {@link Ext.data.Model#commit} on all those records (for 'create' and 'update' actions). * If this {@link #action} is 'destroy', any server records are ignored and the {@link Ext.data.Model#commit} method is not called. * @param {Ext.data.Model[]} serverRecords An array of {@link Ext.data.Model} objects returned by the server. @markdown
getError() Returns the error string or object that was set using {@link #setException} @return {String/Object} The error object
getRecords() Returns an array of Ext.data.Model instances as set by the Proxy. @return {Ext.data.Model[]} Any loaded Records
getResultSet() Returns the ResultSet object (if set by the Proxy). This object will contain the {@link Ext.data.Model model} instances as well as meta data such as number of instances fetched, number available etc @return {Ext.data.ResultSet} The ResultSet object
hasException() Returns true if this Operation encountered an exception (see also {@link #getError}) @return {Boolean} True if there was an exception
isComplete() Returns true if the Operation has been completed @return {Boolean} True if the Operation is complete
isRunning() Returns true if the Operation has been started but has not yet completed. @return {Boolean} True if the Operation is currently running
isStarted() Returns true if the Operation has been started. Note that the Operation may have started AND completed, see {@link #isRunning} to test if the Operation is currently running. @return {Boolean} True if the Operation has started
setBatch(Batch) @private Associates this Operation with a Batch @param {Ext.data.Batch} batch The batch
setCompleted() Marks the Operation as completed.
setException(object) Marks the Operation as having experienced an exception. Can be supplied with an option error message/object. @param {String/Object} error (optional) error string/object
setStarted() Marks the Operation as started.
setSuccessful() Marks the Operation as successful.
wasSuccessful() Returns true if the Operation has completed and was successful @return {Boolean} True if successful
© Copyright 2005-2011 SharpKit. All rights reserved.