Changeset 490 for Dev/trunk/src/client/qed-client/model/classes/_Class.js
- Timestamp:
- 03/08/14 22:51:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/model/classes/_Class.js
r487 r490 27 27 }, 28 28 load: function(id) { 29 return this._store.get(id).then(lang.hitch(this,'_doDeserialize')); 29 return this._store.get(id) 30 .then(lang.hitch(this,'_doDeserialize'), 31 lang.hitch(this,'_deserializeError')); 30 32 }, 31 33 save: function(obj) { 32 return this._store.put(this._doSerialize(obj)); 34 return this._store.put(this._doSerialize(obj)) 35 .otherwise(lang.hitch(this,'_deserializeError')); 33 36 }, 34 37 remove: function(objOrId,rev) { … … 40 43 rev = this.getRev(objOrId); 41 44 } 42 return this._store.remove(id,{headers:{'If-Match':'"'+rev+'"'}}); 45 return this._store.remove(id,{headers:{'If-Match':'"'+rev+'"'}}) 46 .otherwise(lang.hitch(this,'_deserializeError')); 43 47 }, 44 48 getRev: function(obj) { 45 49 return obj._rev; 50 }, 51 getName: function() { 52 return this._type; 53 }, 54 getObjectPath: function(idOrObj) { 55 return '/'+this._collection+'/'+(typeof idOrObj === "string" ? 56 idOrObj : 57 this.getId(idOrObj)); 46 58 } 47 59 });
Note: See TracChangeset
for help on using the changeset viewer.