Clear Up
SharpKit Reference

AbstractStore Class

Namespace: Ext.data

Base Types

System.Object

Methods

Name Description
afterCommit(Model) @private A model instance should call this method on the Store it has been {@link Ext.data.Model#join joined} to. @param {Ext.data.Model} record The model instance that was edited
afterEdit(Model, object) @private A model instance should call this method on the Store it has been {@link Ext.data.Model#join joined} to. @param {Ext.data.Model} record The model instance that was edited @param {String[]} modifiedFieldNames Array of field names changed during edit.
afterReject(Model) @private A model instance should call this method on the Store it has been {@link Ext.data.Model#join joined} to.. @param {Ext.data.Model} record The model instance that was edited
clearFilter(object)
create(object, object)
decodeFilters(object) @private Normalizes an array of filter objects, ensuring that they are all Ext.util.Filter instances @param {Object[]} filters The filters array @return {Ext.util.Filter[]} Array of Ext.util.Filter objects
destroy(object)
destroyStore()
doSort(object)
filter(object, object)
filterBy(object, object)
filterNew(object) @private Filter function for new records.
filterUpdated(object) @private Filter function for updated records.
getBatchListeners() @private Returns an object which is passed in as the listeners argument to proxy.batch inside this.sync. This is broken out into a separate function to allow for customisation of the listeners @return {Object} The listeners object
getNewRecords() Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not yet been saved on this Store (this happens when adding a non-phantom record from another Store into this one) @return {Ext.data.Model[]} The Model instances
getProxy() Returns the proxy currently attached to this proxy instance @return {Ext.data.proxy.Proxy} The Proxy instance
getRemovedRecords() Returns any records that have been removed from the store but not yet destroyed on the proxy. @return {Ext.data.Model[]} The removed Model instances
getUpdatedRecords() Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy @return {Ext.data.Model[]} The updated Model instances
isFiltered()
isLoading() Returns true if the Store is currently performing a load operation @return {Boolean} True if the Store is currently loading
load(object) Loads the Store using its configured {@link #proxy}. @param {Object} options (optional) config object. This is passed into the {@link Ext.data.Operation Operation} object that is created and then sent to the proxy's {@link Ext.data.proxy.Proxy#read} function
onBatchComplete(object, object) @private Attached as the 'complete' event listener to a proxy's Batch object. Iterates over the batch operations and updates the Store's internal data MixedCollection.
onBatchException(object, object)
onBatchOperationComplete(object, object) @private Attached as the 'operationcomplete' event listener to a proxy's Batch object. By default just calls through to onProxyWrite.
onMetaChange(object, object)
onProxyWrite(object) @private Callback for any write Operation over the Proxy. Updates the Store's MixedCollection to reflect the updates provided by the Proxy
read()
save()
setProxy(object) Sets the Store's Proxy by string, config object or Proxy instance @param {String/Object/Ext.data.proxy.Proxy} proxy The new Proxy, which can be either a type string, a configuration object or an Ext.data.proxy.Proxy instance @return {Ext.data.proxy.Proxy} The attached Proxy object
sync() Synchronizes the Store with its Proxy. This asks the Proxy to batch together any new, updated and deleted records in the store, updating the Store's internal representation of the records as each operation completes.
update(object)

Properties

Name Description
autoLoad @cfg {Boolean/Object} autoLoad If data is not specified, and if autoLoad is true or an Object, this store's load method is automatically called after creation. If the value of autoLoad is an Object, this Object will be passed to the store's load method. Defaults to false.
autoSync @cfg {Boolean} autoSync True to automatically sync the Store with its Proxy after every edit to one of its Records. Defaults to false.
BatchListeners @private Returns an object which is passed in as the listeners argument to proxy.batch inside this.sync. This is broken out into a separate function to allow for customisation of the listeners @return {Object} The listeners object
batchUpdateMode @property {String} batchUpdateMode Sets the updating behavior based on batch synchronization. 'operation' (the default) will update the Store's internal representation of the data after each operation of the batch has completed, 'complete' will wait until the entire batch has been completed before updating the Store's data. 'complete' is a good choice for local storage proxies, 'operation' is better for remote proxies, where there is a comparatively high latency.
defaultProxyType @property {String} defaultProxyType The string type of the Proxy to create if none is specified. This defaults to creating a {@link Ext.data.proxy.Memory memory proxy}.
filterOnLoad @property {Boolean} filterOnLoad If true, any filters attached to this Store will be run after loading data, before the datachanged event is fired. Defaults to true, ignored if {@link Ext.data.Store#remoteFilter remoteFilter} is true
implicitModel @property {Boolean} implicitModel True if a model was created implicitly for this Store. This happens if a fields array is passed to the Store's constructor instead of a model constructor or name. @private
isDestroyed @property {Boolean} isDestroyed True if the Store has already been destroyed. If this is true, the reference to Store should be deleted as it will not function correctly any more.
isStore @property {Boolean} isDestroyed True if the Store has already been destroyed. If this is true, the reference to Store should be deleted as it will not function correctly any more.
Proxy Sets the Store's Proxy by string, config object or Proxy instance @param {String/Object/Ext.data.proxy.Proxy} proxy The new Proxy, which can be either a type string, a configuration object or an Ext.data.proxy.Proxy instance @return {Ext.data.proxy.Proxy} The attached Proxy object Returns the proxy currently attached to this proxy instance @return {Ext.data.proxy.Proxy} The Proxy instance
remoteFilter
remoteSort
sortOnLoad @property {Boolean} sortOnLoad If true, any sorters attached to this Store will be run after loading data, before the datachanged event is fired. Defaults to true, igored if {@link Ext.data.Store#remoteSort remoteSort} is true
sortRoot @cfg {String} model Name of the {@link Ext.data.Model Model} associated with this store. The string is used as an argument for {@link Ext.ModelManager#getModel}.
© Copyright 2005-2011 SharpKit. All rights reserved.