Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/FedState.java @ 5063:de97e0282284 dami
Register new classes in the FLYSCredentials
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 20 Feb 2013 17:05:06 +0100 |
parents | c629719b87e7 |
children | fb7c4ad94bd8 |
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 import java.util.List; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 import java.math.BigDecimal; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Column; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.Entity; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Id; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.JoinColumn; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.OneToOne; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.Table; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 import org.hibernate.Session; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 import org.hibernate.Query; |
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 import de.intevation.flys.backend.SessionHolder; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 @Entity |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 @Table(name = "fed_states") |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 public class FedState implements Serializable { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 private Integer id; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 private String name; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 @Id |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 @Column(name = "id") |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 public Integer getId() { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 return id; |
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 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 public void setId(Integer id) { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 this.id = id; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
33 } |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
34 |
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 * Get name. |
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 * @return name of the Federal State as String. |
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 @Column(name = "name") |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
41 public String getName() |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
42 { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
43 return name; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
44 } |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
45 |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
46 /** |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
47 * Set name. |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
48 * |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
49 * @param name the value to set. |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
50 */ |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
51 public void setName(String name) |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
52 { |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
53 this.name = name; |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
54 } |
c629719b87e7
Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
55 }; |