Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/Attribute.java @ 2877:f0a67bc0e777 2.7
merged flys-backend/2.7
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:31 +0200 |
parents | ecf90018563b |
children |
comparison
equal
deleted
inserted
replaced
2793:6310b1582f2d | 2877:f0a67bc0e777 |
---|---|
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 @Entity | |
14 @Table(name = "attributes") | |
15 public class Attribute | |
16 implements Serializable | |
17 { | |
18 private Integer id; | |
19 | |
20 private String value; | |
21 | |
22 public Attribute() { | |
23 } | |
24 | |
25 public Attribute(String value) { | |
26 this.value = value; | |
27 } | |
28 | |
29 @Id | |
30 @SequenceGenerator( | |
31 name = "SEQUENCE_ATTRIBUTES_ID_SEQ", | |
32 sequenceName = "ATTRIBUTES_ID_SEQ", | |
33 allocationSize = 1) | |
34 @GeneratedValue( | |
35 strategy = GenerationType.SEQUENCE, | |
36 generator = "SEQUENCE_ATTRIBUTES_ID_SEQ") | |
37 @Column(name = "id") | |
38 public Integer getId() { | |
39 return id; | |
40 } | |
41 | |
42 public void setId(Integer id) { | |
43 this.id = id; | |
44 } | |
45 | |
46 @Column(name = "value") | |
47 public String getValue() { | |
48 return value; | |
49 } | |
50 | |
51 public void setValue(String value) { | |
52 this.value = value; | |
53 } | |
54 } | |
55 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |