comparison flys-backend/src/main/java/de/intevation/flys/model/WstColumn.java @ 171:4a83e14f40f9

Added entity and id annotations. flys-backend/trunk@1463 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 14 Mar 2011 14:52:58 +0000
parents 86a1bd9cc50e
children 605320b7df94
comparison
equal deleted inserted replaced
170:88c14d5d45be 171:4a83e14f40f9
1 package de.intevation.flys.model; 1 package de.intevation.flys.model;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 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 @Entity
14 @Table(name = "wst_columns")
5 public class WstColumn 15 public class WstColumn
6 implements Serializable 16 implements Serializable
7 { 17 {
8 private Integer id; 18 private Integer id;
9 private Wst wst; 19 private Wst wst;
10 private String name; 20 private String name;
11 private String description; 21 private String description;
12 private TimeInterval timeInterval; 22 private TimeInterval timeInterval;
13 23
14 public WstColumn() { 24 public WstColumn() {
15 } 25 }
16 26
27 @Id
28 @SequenceGenerator(
29 name = "SEQUENCE_WST_COLUMNS_ID_SEQ",
30 sequenceName = "WST_COLUMNS_ID_SEQ",
31 allocationSize = 1)
32 @GeneratedValue(
33 strategy = GenerationType.SEQUENCE,
34 generator = "SEQUENCE_WST_COLUMNS_ID_SEQ")
35 @Column(name = "id")
36 public Integer getId() {
37 return id;
38 }
39
17 public void setId(Integer id) { 40 public void setId(Integer id) {
18 this.id = id; 41 this.id = id;
19 }
20
21 public Integer getId() {
22 return id;
23 } 42 }
24 43
25 public void setWst(Wst wst) { 44 public void setWst(Wst wst) {
26 this.wst = wst; 45 this.wst = wst;
27 } 46 }

http://dive4elements.wald.intevation.org