comparison backend/src/main/java/org/dive4elements/river/seddb/model/MessunguferbezugId.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/MessunguferbezugId.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 java.math.BigDecimal;
14 import javax.persistence.Column;
15 import javax.persistence.Embeddable;
16
17 /**
18 * MessunguferbezugId generated by hbm2java
19 */
20 @Embeddable
21 public class MessunguferbezugId implements java.io.Serializable {
22
23
24 private long messungid;
25 private boolean uferistlinks;
26 private BigDecimal hmabst;
27
28 public MessunguferbezugId() {
29 }
30
31 public MessunguferbezugId(long messungid, boolean uferistlinks) {
32 this.messungid = messungid;
33 this.uferistlinks = uferistlinks;
34 }
35 public MessunguferbezugId(long messungid, boolean uferistlinks, BigDecimal hmabst) {
36 this.messungid = messungid;
37 this.uferistlinks = uferistlinks;
38 this.hmabst = hmabst;
39 }
40
41
42
43 @Column(name="MESSUNGID", nullable=false, precision=11, scale=0)
44 public long getMessungid() {
45 return this.messungid;
46 }
47
48 public void setMessungid(long messungid) {
49 this.messungid = messungid;
50 }
51
52
53 @Column(name="UFERISTLINKS", nullable=false, precision=1, scale=0)
54 public boolean isUferistlinks() {
55 return this.uferistlinks;
56 }
57
58 public void setUferistlinks(boolean uferistlinks) {
59 this.uferistlinks = uferistlinks;
60 }
61
62
63 @Column(name="HMABST", precision=8, scale=3)
64 public BigDecimal getHmabst() {
65 return this.hmabst;
66 }
67
68 public void setHmabst(BigDecimal hmabst) {
69 this.hmabst = hmabst;
70 }
71
72
73 public boolean equals(Object other) {
74 if ( (this == other ) ) return true;
75 if ( (other == null ) ) return false;
76 if ( !(other instanceof MessunguferbezugId) ) return false;
77 MessunguferbezugId castOther = ( MessunguferbezugId ) other;
78
79 return (this.getMessungid()==castOther.getMessungid())
80 && (this.isUferistlinks()==castOther.isUferistlinks())
81 && ( (this.getHmabst()==castOther.getHmabst()) || ( this.getHmabst()!=null && castOther.getHmabst()!=null && this.getHmabst().equals(castOther.getHmabst()) ) );
82 }
83
84 public int hashCode() {
85 int result = 17;
86
87 result = 37 * result + (int) this.getMessungid();
88 result = 37 * result + (this.isUferistlinks()?1:0);
89 result = 37 * result + ( getHmabst() == null ? 0 : this.getHmabst().hashCode() );
90 return result;
91 }
92 }

http://dive4elements.wald.intevation.org