1 package com.germinus.merlin.model;
2
3
4
5 import javax.persistence.Column;
6 import javax.persistence.Entity;
7 import javax.persistence.FetchType;
8 import javax.persistence.GeneratedValue;
9 import javax.persistence.Id;
10 import javax.persistence.JoinColumn;
11 import javax.persistence.ManyToOne;
12 import javax.persistence.Table;
13
14 import org.hibernate.annotations.GenericGenerator;
15
16
17
18
19 @Entity
20 @Table(name = "Labels")
21 public class Label extends Resource implements java.io.Serializable {
22
23
24
25
26
27 private static final long serialVersionUID = -7586598568001212408L;
28
29 public Label() {
30 }
31
32 public Label(ResourceContainer resourceContainer, String description,
33 String name) {
34 super();
35 this.resourceContainer = resourceContainer;
36 this.description = description;
37 this.name = name;
38 }
39
40 @Id @GeneratedValue(generator="system-increment")
41 @GenericGenerator(name="system-increment", strategy = "increment")
42 @Column(name = "labelid", unique = true, nullable = false)
43 public long getidLabel() {
44 return this.id;
45 }
46
47 public void setidLabel(long idLabel) {
48 this.id = idLabel;
49 }
50
51 @ManyToOne(fetch = FetchType.LAZY)
52 @JoinColumn(name = "idResourceContainer", nullable = false)
53 public ResourceContainer getResourceContainer() {
54 return this.resourceContainer;
55 }
56
57 public void setResourceContainer(ResourceContainer resourceContainer) {
58 this.resourceContainer = resourceContainer;
59 }
60
61 @Column(name = "name", length = 75)
62 public String getName() {
63 return this.name;
64 }
65
66 public void setName(String name) {
67 this.name = name;
68 }
69
70 @Column(name = "description", length = 200)
71 public String getDescription() {
72 return this.description;
73 }
74
75 public void setDescription(String description) {
76 this.description = description;
77 }
78
79
80 }