annotate app/model/MmtMessprogramm.js @ 745:df684c3d4a7c

Added Messprogramme Store and Model
author Dustin Demuth <dustin@intevation.de>
date Fri, 24 Apr 2015 11:03:18 +0200
parents
children f2db1ae1d012
rev   line source
745
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /**
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * A Messmethoden Messprogramm.
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 * This class represents and defines the model of a 'MmtMessprogramm'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 **/
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 Ext.define('Lada.model.MmtMessprogramm', {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 extend: 'Ext.data.Model',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 fields: [{
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 name: 'id'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 }, {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 name: 'mprId'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 }, {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 name: 'mmtId'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22 }, {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
23 name: 'messgroessen'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
24 }, {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 name: 'letzteAenderung',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 type: 'date',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 convert: function(v) {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 if (!v) {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29 return v;
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 }
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 return new Date(v);
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 },
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 defaultValue: new Date()
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34 }],
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 idProperty: 'id',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38 proxy: {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39 type: 'rest',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40 //url: 'lada-server/mmtmessprogramm', //not yet implemented
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41 reader: {
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 type: 'json',
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 root: 'data'
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 }
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 }
df684c3d4a7c Added Messprogramme Store and Model
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 }

http://lada.wald.intevation.org