Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/LocationSystem.java @ 3962:d609fd83310a
merged flys-backend
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:15:04 +0200 |
parents | f283212966e8 |
children |
comparison
equal
deleted
inserted
replaced
3938:c0cab28ba1ea | 3962:d609fd83310a |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import javax.persistence.Entity; | |
6 import javax.persistence.Id; | |
7 import javax.persistence.Table; | |
8 import javax.persistence.GeneratedValue; | |
9 import javax.persistence.Column; | |
10 import javax.persistence.SequenceGenerator; | |
11 import javax.persistence.GenerationType; | |
12 | |
13 | |
14 @Entity | |
15 @Table(name = "location_system") | |
16 public class LocationSystem implements Serializable { | |
17 | |
18 protected Integer id; | |
19 | |
20 protected String name; | |
21 protected String description; | |
22 | |
23 | |
24 public LocationSystem() { | |
25 } | |
26 | |
27 | |
28 public LocationSystem(String name, String description) { | |
29 this.name = name; | |
30 this.description = description; | |
31 } | |
32 | |
33 @Id | |
34 @SequenceGenerator( | |
35 name = "SEQUENCE_LOCATION_SYSTEM_ID_SEQ", | |
36 sequenceName = "LOCATION_SYSTEM_SEQ", | |
37 allocationSize = 1) | |
38 @GeneratedValue( | |
39 strategy = GenerationType.SEQUENCE, | |
40 generator = "SEQUENCE_LOCATION_SYSTEM_ID_SEQ") | |
41 @Column(name = "id") | |
42 public Integer getId() { | |
43 return id; | |
44 } | |
45 | |
46 public void setId(Integer id) { | |
47 this.id = id; | |
48 } | |
49 | |
50 @Column(name = "name") | |
51 public String getName() { | |
52 return name; | |
53 } | |
54 | |
55 public void setName(String name) { | |
56 this.name = name; | |
57 } | |
58 | |
59 @Column(name = "description") | |
60 public String getDescription() { | |
61 return description; | |
62 } | |
63 | |
64 public void setDescription(String description) { | |
65 this.description = description; | |
66 } | |
67 } | |
68 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |