Mercurial > dive4elements > river
comparison flys-backend/src/main/java/org/dive4elements/river/model/AnnotationType.java @ 5828:dfb26b03b179
Moved directories to org.dive4elements.river
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 11:53:11 +0200 |
parents | flys-backend/src/main/java/de/intevation/flys/model/AnnotationType.java@8076f6a689d0 |
children | 18619c1e7c2a |
comparison
equal
deleted
inserted
replaced
5827:e308d4ecd35a | 5828:dfb26b03b179 |
---|---|
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 = "annotation_types") | |
15 public class AnnotationType | |
16 implements Serializable | |
17 { | |
18 private Integer id; | |
19 private String name; | |
20 | |
21 public AnnotationType() { | |
22 } | |
23 | |
24 public AnnotationType(String name) { | |
25 this.name = name; | |
26 } | |
27 | |
28 @Id | |
29 @SequenceGenerator( | |
30 name = "SEQUENCE_ANNOTATION_TYPES_ID_SEQ", | |
31 sequenceName = "ANNOTATION_TYPES_ID_SEQ", | |
32 allocationSize = 1) | |
33 @GeneratedValue( | |
34 strategy = GenerationType.SEQUENCE, | |
35 generator = "SEQUENCE_ANNOTATION_TYPES_ID_SEQ") | |
36 @Column(name = "id") | |
37 public Integer getId() { | |
38 return id; | |
39 } | |
40 | |
41 public void setId(Integer id) { | |
42 this.id = id; | |
43 } | |
44 | |
45 @Column(name = "name") | |
46 public String getName() { | |
47 return name; | |
48 } | |
49 | |
50 public void setName(String name) { | |
51 this.name = name; | |
52 } | |
53 } | |
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |