annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionDbAccess.java @ 9125:820ae41c81b6

Fixed adding missing files for the river bed collision counts selectable in the datacage
author mschaefer
date Wed, 06 Jun 2018 08:02:55 +0200
parents
children
rev   line source
9125
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
2 * Software engineering by
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
3 * Björnsen Beratende Ingenieure GmbH
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
5 *
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
6 * This file is Free Software under the GNU AGPL (>=v3)
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
8 * documentation coming with Dive4Elements River for details.
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
9 */
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
10
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
11 package org.dive4elements.river.artifacts.sinfo.collision;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
12
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
13 import org.dive4elements.river.artifacts.D4EArtifact;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
14 import org.dive4elements.river.artifacts.access.RangeAccess;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
15
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
16 /**
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
17 * Access to the database loaded river bed collision artifact data
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
18 *
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
19 * @author Matthias Schäfer
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
20 */
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
21 final class CollisionDbAccess extends RangeAccess {
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
22
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
23 /***** FIELDS *****/
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
24
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
25 private Integer id;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
26
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
27 private String name;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
28
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
29
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
30 /***** CONSTRUCTORS *****/
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
31
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
32 public CollisionDbAccess(final D4EArtifact artifact) {
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
33 super(artifact);
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
34 }
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
35
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
36
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
37 /***** METHODS *****/
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
38
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
39 public Integer getId() {
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
40 if (this.id == null) {
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
41 this.id = getInteger("collision_id");
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
42 }
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
43 return this.id;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
44 }
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
45
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
46 public String getName() {
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
47 if (this.name == null) {
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
48 this.name = getString("name");
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
49 }
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
50 return this.name;
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
51 }
820ae41c81b6 Fixed adding missing files for the river bed collision counts selectable in the datacage
mschaefer
parents:
diff changeset
52 }

http://dive4elements.wald.intevation.org