Package: | Ext.data |
Defined In: | Operation.js |
Class: | Operation |
Extends: | Object |
Represents a single read or write operation performed by a Proxy. Operation objects are used to enable communication between Stores and Proxies. Application developers should rarely need to interact with Operation objects directly.
Several Operations can be batched together in a batch.
Config Options | Defined By | |
---|---|---|
action : String The action being performed by this Operation. Should be one of 'create', 'read', 'update' or 'destroy' | Operation | |
batch : Ext.data.Batch The batch that this Operation is a part of (optional) | Operation | |
filters : Array Optional array of filter objects. Only applies to 'read' actions. | Operation | |
group : Object Optional grouping configuration. Only applies to 'read' actions where grouping is desired. | Operation | |
limit : Number The number of records to load. Used on 'read' actions when paging is being used. | Operation | |
sorters : Array Optional array of sorter objects. Only applies to 'read' actions. | Operation | |
start : Number The start index (offset), used in paging when running a 'read' action. | Operation | |
synchronous : Boolean True if this Operation is to be executed synchronously (defaults to true). This
property is inspected by a Batch to s... True if this Operation is to be executed synchronously (defaults to true). This
property is inspected by a Batch to see if a series of Operations can be executed in
parallel or not. | Operation |
Method | Defined By | |
---|---|---|
Operation( Object config )
Parameters:
| Operation | |
allowWrite()
:
Boolean Checks whether this operation should cause writing to occur. Checks whether this operation should cause writing to occur. Parameters:
| Operation | |
getError()
:
Mixed Returns the error string or object that was set using setException Returns the error string or object that was set using setException Parameters:
| Operation | |
getRecords()
:
Array Returns an array of Ext.data.Model instances as set by the Proxy. Returns an array of Ext.data.Model instances as set by the Proxy. Parameters:
| Operation | |
getResultSet()
:
Ext.data.ResultSet Returns the ResultSet object (if set by the Proxy). This object will contain the model instances
as well as meta data... Returns the ResultSet object (if set by the Proxy). This object will contain the model instances
as well as meta data such as number of instances fetched, number available etc Parameters:
| Operation | |
hasException()
:
Boolean Returns true if this Operation encountered an exception (see also getError) Returns true if this Operation encountered an exception (see also getError) Parameters:
| Operation | |
isComplete()
:
Boolean Returns true if the Operation has been completed Returns true if the Operation has been completed Parameters:
| Operation | |
isRunning()
:
Boolean Returns true if the Operation has been started but has not yet completed. Returns true if the Operation has been started but has not yet completed. Parameters:
| Operation | |
isStarted()
:
Boolean Returns true if the Operation has been started. Note that the Operation may have started AND completed,
see isRunning... Returns true if the Operation has been started. Note that the Operation may have started AND completed,
see isRunning to test if the Operation is currently running. Parameters:
| Operation | |
setCompleted()
:
void Marks the Operation as completed Marks the Operation as completed Parameters:
| Operation | |
setException( Mixed error )
:
voidMarks the Operation as having experienced an exception. Can be supplied with an option error message/object. Marks the Operation as having experienced an exception. Can be supplied with an option error message/object. Parameters:
| Operation | |
setStarted()
:
void Marks the Operation as started Marks the Operation as started Parameters:
| Operation | |
setSuccessful()
:
void Marks the Operation as successful Marks the Operation as successful Parameters:
| Operation | |
wasSuccessful()
:
Boolean Returns true if the Operation has completed and was successful Returns true if the Operation has completed and was successful Parameters:
| Operation |