Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/SobekKind.java @ 5181:9d36ddf7dbd3
Change IllegalArgumentException to HibernateException.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 07 Mar 2013 10:44:27 +0100 |
parents | 1d95391d056b |
children |
rev | line source |
---|---|
5060
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 import javax.persistence.Column; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 import javax.persistence.Entity; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Id; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.Table; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 @Entity |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 @Table(name = "sobek_kinds") |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 public class SobekKind implements Serializable { |
5081
1d95391d056b
Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5064
diff
changeset
|
13 |
5060
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 private Integer id; |
5064
fb7c4ad94bd8
Fix build: some more imports some less imports some copy paste errors
Andre Heinecke <aheinecke@intevation.de>
parents:
5060
diff
changeset
|
15 private String name; |
5060
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 @Id |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 @Column(name = "id") |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 public Integer getId() { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 return id; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 } |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 public void setId(Integer id) { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 this.id = id; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 } |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 /** |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 * Get name. |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 * |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 * @return name of the kind of sobek as String. |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 */ |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 @Column(name = "name") |
5081
1d95391d056b
Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5064
diff
changeset
|
33 public String getName() { |
5060
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
34 return name; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
35 } |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
36 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
37 /** |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
38 * Set name. |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
39 * |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
40 * @param name the value to set. |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
41 */ |
5081
1d95391d056b
Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5064
diff
changeset
|
42 public void setName(String name) { |
5060
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
43 this.name = name; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
44 } |
5081
1d95391d056b
Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5064
diff
changeset
|
45 } |