comparison backend/src/main/java/org/dive4elements/river/seddb/model/SprobeId.java @ 5873:1e68eca26b8a

river backend: Moved SedDB hibernate model to org/dive4elements/river/seddb.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 29 Apr 2013 11:33:01 +0200
parents backend/src/main/java/de/intevation/seddb/model/SprobeId.java@4dd33b86dc61
children 7ba4815a52a4
comparison
equal deleted inserted replaced
5872:bc4e1bf26227 5873:1e68eca26b8a
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU AGPL (>=v3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
6 * documentation coming with Dive4Elements River for details.
7 */
8
9 package org.dive4elements.seddb.model;
10 // Generated 14.06.2012 11:30:57 by Hibernate Tools 3.4.0.CR1
11
12
13 import javax.persistence.Column;
14 import javax.persistence.Embeddable;
15
16 /**
17 * SprobeId generated by hbm2java
18 */
19 @Embeddable
20 public class SprobeId implements java.io.Serializable {
21
22
23 private long slotrechteid;
24 private int lfdnr;
25
26 public SprobeId() {
27 }
28
29 public SprobeId(long slotrechteid, int lfdnr) {
30 this.slotrechteid = slotrechteid;
31 this.lfdnr = lfdnr;
32 }
33
34
35
36 @Column(name="SLOTRECHTEID", nullable=false, precision=11, scale=0)
37 public long getSlotrechteid() {
38 return this.slotrechteid;
39 }
40
41 public void setSlotrechteid(long slotrechteid) {
42 this.slotrechteid = slotrechteid;
43 }
44
45
46 @Column(name="LFDNR", nullable=false, precision=5, scale=0)
47 public int getLfdnr() {
48 return this.lfdnr;
49 }
50
51 public void setLfdnr(int lfdnr) {
52 this.lfdnr = lfdnr;
53 }
54
55
56 public boolean equals(Object other) {
57 if ( (this == other ) ) return true;
58 if ( (other == null ) ) return false;
59 if ( !(other instanceof SprobeId) ) return false;
60 SprobeId castOther = ( SprobeId ) other;
61
62 return (this.getSlotrechteid()==castOther.getSlotrechteid())
63 && (this.getLfdnr()==castOther.getLfdnr());
64 }
65
66 public int hashCode() {
67 int result = 17;
68
69 result = 37 * result + (int) this.getSlotrechteid();
70 result = 37 * result + this.getLfdnr();
71 return result;
72 }
73 }

http://dive4elements.wald.intevation.org