//>>built
define("dojox/mobile/_StoreMixin",["dojo/_base/Deferred","dojo/_base/declare"],function(e,f){return f("dojox.mobile._StoreMixin",null,{store:null,query:null,queryOptions:null,labelProperty:"label",childrenProperty:"children",setStore:function(b,a,c){if(b===this.store)return null;if(b)b.getValue=function(b,a){return b[a]};this.store=b;this._setQuery(a,c);return this.refresh()},setQuery:function(b,a){this._setQuery(b,a);return this.refresh()},_setQuery:function(b,a){this.query=b;this.queryOptions=a||
this.queryOptions},refresh:function(){if(!this.store)return null;var b=this,a=this.store.query(this.query,this.queryOptions);e.when(a,function(c){if(c.items)c=c.items;a.observe&&a.observe(function(a,c,d){if(-1<c)b.onDelete(a,c);else if(-1<d)b.onUpdate(a,d)});b.onComplete(c)},function(a){b.onError(a)});return a}})});