A Dojo Data implementation that wraps Dojo object stores for backwards compatibility.
Parameter | Type | Description |
---|---|---|
options | undefined | The configuration information to pass into the data store.
The object store to use as the source provider for this data store |
See the dojo/data/ObjectStore reference documentation for more information.
adds an object to the list of dirty objects. This object contains a reference to the object itself as well as a cloned and trimmed version of old object for use with revert.
Parameter | Type | Description |
---|---|---|
object | Object | Indicates that the given object is changing and should be marked as dirty for the next save |
_deleting | Boolean |
See dojo/data/api/Read.close()
Parameter | Type | Description |
---|---|---|
request | undefined |
Checks to see if 'item' has 'value' at 'attribute'
Parameter | Type | Description |
---|---|---|
item | Object | The item to check |
attribute | String | The attribute to check |
value | Anything | The value to look for |
deletes item and any references to that item from the store.
Parameter | Type | Description |
---|---|---|
item | undefined | item to delete |
See dojo/data/api/Read.fetch()
Parameter | Type | Description |
---|---|---|
args | undefined |
fetch an item by its identity, by looking in our index of what we have loaded
Parameter | Type | Description |
---|---|---|
args | undefined |
Gets the available attributes of an item's 'property' and returns it as an array.
Parameter | Type | Description |
---|---|---|
item | Object |
returns the identity of the given item See dojo/data/api/Read.getIdentity()
Parameter | Type | Description |
---|---|---|
item | undefined |
returns the attributes which are used to make up the identity of an item. Basically returns this.objectStore.idProperty See dojo/data/api/Read.getIdentityAttributes()
Parameter | Type | Description |
---|---|---|
item | undefined |
See dojo/data/api/Read.getLabel()
Parameter | Type | Description |
---|---|---|
item | dojo/data/api/Item |
See dojo/data/api/Read.getLabelAttributes()
Parameter | Type | Description |
---|---|---|
item | dojo/data/api/Item |
Gets the value of an item's 'property'
Parameter | Type | Description |
---|---|---|
item | Object | The item to get the value from |
property | String | property to look up value for |
defaultValue | value |
Optional the default value |
the default value
Gets the value of an item's 'property' and returns it. If this value is an array it is just returned, if not, the value is added to an array and that is returned.
Parameter | Type | Description |
---|---|---|
item | Object | |
property | String | property to look up value for |
Checks to see if item has attribute
Parameter | Type | Description |
---|---|---|
item | Object | The item to check |
attribute | String | The attribute to check |
returns true if the item is marked as dirty or true if there are any dirty items
Parameter | Type | Description |
---|---|---|
item | Object | The item to check |
Checks to see if the argument is an item
Parameter | Type | Description |
---|---|---|
item | Object | The item to check |
Checks to see if the item is loaded.
Parameter | Type | Description |
---|---|---|
item | Object | The item to check |
Loads an item and calls the callback handler. Note, that this will call the callback handler even if the item is loaded. Consequently, you can use loadItem to ensure that an item is loaded is situations when the item may or may not be loaded yet. If you access a value directly through property access, you can use this to load a lazy value as well (doesn't need to be an item).
Parameter | Type | Description |
---|---|---|
args | Object | See dojo/data/api/Read.fetch() |
store.loadItem({ item: item, // this item may or may not be loaded onItem: function(item){ // do something with the item } });
adds a new item to the store at the specified point. Takes two parameters, data, and options.
Parameter | Type | Description |
---|---|---|
data | Object | See dojo/data/api/Write.newItem() |
parentInfo | undefined |
See dojo/data/api/Write.newItem()
Parameter | Type | Description |
---|---|---|
type | undefined | |
listener | undefined |
returns any modified data to its original state prior to a save();
Saves the dirty data using object store provider. See dojo/data/api/Write for API.
Parameter | Type | Description |
---|---|---|
kwArgs | undefined |
|
sets 'attribute' on 'item' to 'value' See dojo/data/api/Write.setValue()
Parameter | Type | Description |
---|---|---|
item | undefined | |
attribute | undefined | |
value | undefined |
sets 'attribute' on 'item' to 'value' value must be an array. See dojo/data/api/Write.setValues()
Parameter | Type | Description |
---|---|---|
item | undefined | |
attribute | undefined | |
values | undefined |
unsets 'attribute' on 'item' See dojo/data/api/Write.unsetAttribute()
Parameter | Type | Description |
---|---|---|
item | undefined | |
attribute | undefined |
store.loadItem({ item: item, // this item may or may not be loaded onItem: function(item){ // do something with the item } });
Called when a fetch occurs
Parameter | Type | Description |
---|---|---|
results | undefined |
store.loadItem({ item: item, // this item may or may not be loaded onItem: function(item){ // do something with the item } });
store.loadItem({ item: item, // this item may or may not be loaded onItem: function(item){ // do something with the item } });
store.loadItem({ item: item, // this item may or may not be loaded onItem: function(item){ // do something with the item } });