annotate app/model/Messwert.js @ 315:3159cbc85652

Added docstring
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 13 Aug 2013 08:05:32 +0200
parents 66935692f4b9
children f56e6ee526a2
rev   line source
282
ee5767cd2dde Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 226
diff changeset
1 /**
315
3159cbc85652 Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 300
diff changeset
2 * Model class for Messwerte
282
ee5767cd2dde Added docstring
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 226
diff changeset
3 */
167
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.model.Messwert', {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 extend: 'Ext.data.Model',
300
66935692f4b9 Use ts2date function from lib.Helpers. Remove old code
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 282
diff changeset
6 requires: ['Lada.lib.Helpers'],
167
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 fields: [
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 {name: "id"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 {name: "messungsId", mapping:"id.messungsId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 {name: "probeId", mapping:"id.probeId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 {name: "messgroesseId", mapping:"id.messgroesseId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 {name: "messwert", type:"float"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 {name: "messfehler", type:"float"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 {name: "nwgZuMesswert", type:"float"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 {name: "mehId"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 {name: "grenzwertueberschreitung", type: "boolean"},
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 {name: "letzteAenderung", type:"date"}
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 ],
226
2794341bfc8a Fixed creating messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 223
diff changeset
19 idProperty: "id",
167
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 proxy: {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 type: 'rest',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 appendId: true, //default
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 url: 'server/rest/messwert',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 reader: {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 type: 'json',
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 root: 'data'
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 }
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 },
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 getEidi: function() {
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 var mid = this.get('messgroesseId');
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 var messId = this.get('messungsId');
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 var probeId = this.get('probeId');
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33 return "/" + mid + "/" + messId + "/" + probeId;
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
34 }
3d3ad1f031bf Added model and store for messwert.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
35 });

http://lada.wald.intevation.org