annotate core/src/js/data/StatefullStoreAdapter.js @ 30:2dfba21cd879

sync
author cin
date Wed, 27 Jun 2018 02:46:14 +0300
parents acdcdf1a8d21
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
93fb6c09f2e1 minor fixes
cin
parents: 0
diff changeset
1 define(["dojo/_base/declare", "dojo/_base/array", "../safe", "./StoreAdapter"], function(declare, array, safe ,AdapterStore){
0
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
2 return declare([AdapterStore], {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
3 _attrs : null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
4
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
5 constructor : function(opts) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
6 safe.argumentNotEmptyArray(opts.attrs, "opts.attrs");
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
7 this._attrs = opts.attrs;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
8 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
9
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
10 mapItem : function(item) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
11 var result = {};
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
12 array.forEach(this._attrs, function(p) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
13 result[p] = item.get(p);
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
14 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
15 return result;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
16 }
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
17 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
18
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
19 });