a:16:{s:9:"#provides";s:19:"dojo.data.api.Write";s:9:"#resource";s:17:"data/api/Write.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:18:"dojo.data.api.Read";}}s:19:"dojo.data.api.Write";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:18:"dojo.data.api.Read";}s:4:"call";a:1:{i:0;s:18:"dojo.data.api.Read";}}s:7:"summary";s:167:"This is an abstract API that data provider implementations conform to. This file defines function signatures and intentionally leaves all the functionss unimplemented.";s:9:"classlike";b:1;}s:31:"dojo.data.api.Write.getFeatures";a:4:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:6:"source";s:77:" return { 'dojo.data.api.Read': true, 'dojo.data.api.Write': true };";s:7:"summary";s:36:"See dojo.data.api.Read.getFeatures()";}s:27:"dojo.data.api.Write.newItem";a:8:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:11:"keywordArgs";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"Object";s:7:"summary";s:113:"A javascript object defining the initial content of the item as a set of JavaScript 'property name: value' pairs.";}s:10:"parentInfo";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"Object";s:7:"summary";s:461:"An optional javascript object defining what item is the parent of this item (in a hierarchical store. Not all stores do hierarchical items), and what attribute of that parent to assign the new item to. If this is present, and the attribute specified is a multi-valued attribute, it will append this item into the array of values for that attribute. The structure of the object is as follows: { parent: someItem, attribute: "attribute-name-string" }";}}s:6:"source";s:109:" var newItem; throw new Error('Unimplemented API: dojo.data.api.Write.newItem'); return newItem; // item";s:7:"summary";s:669:"Returns a newly created item. Sets the attributes of the new item based on the *keywordArgs* provided. In general, the attribute names in the keywords become the attributes in the new item and as for the attribute values in keywordArgs, they become the values of the attributes in the new item. In addition, for stores that support hierarchical item creation, an optional second parameter is accepted that defines what item is the parent of the new item and what attribute of that item should the new item be assigned to. In general, this will assume that the attribute targetted is multi-valued and a new item is appended onto the list of values for that attribute.";s:10:"exceptions";s:238:"Throws an exception if *keywordArgs* is a string or a number or anything other than a simple anonymous object. Throws an exception if the item in parentInfo is not an item from the store or if the attribute isn't an attribute name string.";s:7:"returns";s:4:"item";s:8:"examples";a:1:{i:0;s:69:" var kermit = store.newItem({name: "Kermit", color:[blue, green]});";}}s:30:"dojo.data.api.Write.deleteItem";a:8:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:19:"The item to delete.";}}s:6:"source";s:98:" throw new Error('Unimplemented API: dojo.data.api.Write.deleteItem'); return false; // boolean";s:7:"summary";s:31:"Deletes an item from the store.";s:10:"exceptions";s:96:"Throws an exception if the argument *item* is not an item (if store.isItem(item) returns false).";s:7:"returns";s:7:"boolean";s:8:"examples";a:1:{i:0;s:42:" var success = store.deleteItem(kermit);";}}s:28:"dojo.data.api.Write.setValue";a:8:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:19:"The item to modify.";}s:9:"attribute";a:2:{s:4:"type";s:6:"string";s:7:"summary";s:65:"The attribute of the item to change represented as a string name.";}s:5:"value";a:2:{s:4:"type";s:15:"almost anything";s:7:"summary";s:32:"The value to assign to the item.";}}s:6:"source";s:96:" throw new Error('Unimplemented API: dojo.data.api.Write.setValue'); return false; // boolean";s:7:"summary";s:81:"Sets the value of an attribute on an item. Replaces any previous value or values.";s:10:"exceptions";s:152:"Throws an exception if *item* is not an item, or if *attribute* is neither an attribute object or a string. Throws an exception if *value* is undefined.";s:7:"returns";s:7:"boolean";s:8:"examples";a:1:{i:0;s:53:" var success = store.set(kermit, "color", "green");";}}s:29:"dojo.data.api.Write.setValues";a:8:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:19:"The item to modify.";}s:9:"attribute";a:2:{s:4:"type";s:6:"string";s:7:"summary";s:65:"The attribute of the item to change represented as a string name.";}s:6:"values";a:2:{s:4:"type";s:5:"array";s:7:"summary";s:47:"An array of values to assign to the attribute..";}}s:6:"source";s:97:" throw new Error('Unimplemented API: dojo.data.api.Write.setValues'); return false; // boolean";s:7:"summary";s:256:"Adds each value in the *values* array as a value of the given attribute on the given item. Replaces any previous value or values. Calling store.setValues(x, y, []) (with *values* as an empty array) has the same effect as calling store.unsetAttribute(x, y).";s:10:"exceptions";s:136:"Throws an exception if *values* is not an array, if *item* is not an item, or if *attribute* is neither an attribute object or a string.";s:7:"returns";s:7:"boolean";s:8:"examples";a:1:{i:0;s:180:" var success = store.setValues(kermit, "color", ["green", "aqua"]); success = store.setValues(kermit, "color", []); if (success) {assert(!store.hasAttribute(kermit, "color"));}";}}s:34:"dojo.data.api.Write.unsetAttribute";a:8:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:19:"The item to modify.";}s:9:"attribute";a:2:{s:4:"type";s:6:"string";s:7:"summary";s:59:"The attribute of the item to unset represented as a string.";}}s:6:"source";s:93:" throw new Error('Unimplemented API: dojo.data.api.Write.clear'); return false; // boolean";s:7:"summary";s:50:"Deletes all the values of an attribute on an item.";s:10:"exceptions";s:107:"Throws an exception if *item* is not an item, or if *attribute* is neither an attribute object or a string.";s:7:"returns";s:7:"boolean";s:8:"examples";a:1:{i:0;s:117:" var success = store.unsetAttribute(kermit, "color"); if (success) {assert(!store.hasAttribute(kermit, "color"));}";}}s:24:"dojo.data.api.Write.save";a:7:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"keywordArgs";a:2:{s:4:"type";s:6:"object";s:7:"summary";s:982:"{ onComplete: function onError: function scope: object } The *onComplete* parameter. function(); If an onComplete callback function is provided, the callback function will be called just once, after the save has completed. No parameters are generally passed to the onComplete. The *onError* parameter. function(errorData); If an onError callback function is provided, the callback function will be called if there is any sort of error while attempting to execute the save. The onError function will be based one parameter, the error. The *scope* parameter. If a scope object is provided, all of the callback function ( onComplete, onError, etc) will be invoked in the context of the scope object. In the body of the callback function, the value of the "this" keyword will be the scope object. If no scope object is provided, the callback functions will be called in the context of dojo.global. For example, onComplete.call(scope) vs. onComplete.call(dojo.global)";}}s:6:"source";s:65:" throw new Error('Unimplemented API: dojo.data.api.Write.save');";s:7:"summary";s:252:"Saves to the server all the changes that have been made locally. The save operation may take some time and is generally performed in an asynchronous fashion. The outcome of the save action is is passed into the set of supported callbacks for the save.";s:14:"return_summary";s:129:"Nothing. Since the saves are generally asynchronous, there is no need to return anything. All results are passed via callbacks.";s:8:"examples";a:1:{i:0;s:107:" store.save({onComplete: onSave}); store.save({scope: fooObj, onComplete: onSave, onError: saveFailed});";}}s:26:"dojo.data.api.Write.revert";a:7:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:6:"source";s:94:" throw new Error('Unimplemented API: dojo.data.api.Write.revert'); return false; // boolean";s:7:"summary";s:29:"Discards any unsaved changes.";s:11:"description";s:29:"Discards any unsaved changes.";s:7:"returns";s:7:"boolean";s:8:"examples";a:1:{i:0;s:32:" var success = store.revert();";}}s:27:"dojo.data.api.Write.isDirty";a:8:{s:9:"prototype";s:19:"dojo.data.api.Write";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:3:{s:8:"optional";b:1;s:4:"type";s:4:"item";s:7:"summary";s:18:"The item to check.";}}s:6:"source";s:95:" throw new Error('Unimplemented API: dojo.data.api.Write.isDirty'); return false; // boolean";s:7:"summary";s:224:"Given an item, isDirty() returns true if the item has been modified since the last save(). If isDirty() is called with no *item* argument, then this function returns true if any item has been modified since the last save().";s:10:"exceptions";s:87:"Throws an exception if isDirty() is passed an argument and the argument is not an item.";s:7:"returns";s:7:"boolean";s:8:"examples";a:1:{i:0;s:141:" var trueOrFalse = store.isDirty(kermit); // true if kermit is dirty var trueOrFalse = store.isDirty(); // true if any item is dirty";}}s:13:"dojo.data.api";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:9:"dojo.data";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:4:"dojo";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}