Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/MainValueType.java @ 174:249390dd24e7
Added foreign key constraint annotations to model classes.
flys-backend/trunk@1473 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 15 Mar 2011 14:49:56 +0000 |
parents | 605320b7df94 |
children | bc3747a371cc |
comparison
equal
deleted
inserted
replaced
173:8e2f2ddc507f | 174:249390dd24e7 |
---|---|
1 package de.intevation.flys.model; | 1 package de.intevation.flys.model; |
2 | |
3 import java.math.BigDecimal; | |
2 | 4 |
3 import java.io.Serializable; | 5 import java.io.Serializable; |
4 | 6 |
5 import javax.persistence.Entity; | 7 import javax.persistence.Entity; |
6 import javax.persistence.Id; | 8 import javax.persistence.Id; |
13 @Entity | 15 @Entity |
14 @Table(name = "main_value_types") | 16 @Table(name = "main_value_types") |
15 public class MainValueType | 17 public class MainValueType |
16 implements Serializable | 18 implements Serializable |
17 { | 19 { |
18 private Integer id; | 20 private Integer id; |
19 | 21 private BigDecimal value; |
20 private String value; | |
21 | 22 |
22 public MainValueType() { | 23 public MainValueType() { |
23 } | 24 } |
24 | 25 |
25 @Id | 26 @Id |
37 | 38 |
38 public void setId(Integer id) { | 39 public void setId(Integer id) { |
39 this.id = id; | 40 this.id = id; |
40 } | 41 } |
41 | 42 |
42 @Column(name = "value") | 43 @Column(name = "value") // FIXME: Type conversion needed? |
43 public String getValue() { | 44 public BigDecimal getValue() { |
44 return value; | 45 return value; |
45 } | 46 } |
46 | 47 |
47 public void setValue(String value) { | 48 public void setValue(BigDecimal value) { |
48 this.value = value; | 49 this.value = value; |
49 } | 50 } |
50 } | 51 } |
51 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 52 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |