UI initial implementation.
[validation.git] / ui / src / main / java / org / akraino / validation / ui / entity / Timeslot.java
1 /*
2  * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.akraino.validation.ui.entity;
17
18 import java.io.Serializable;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.GeneratedValue;
23 import javax.persistence.GenerationType;
24 import javax.persistence.Id;
25 import javax.persistence.SequenceGenerator;
26 import javax.persistence.Table;
27
28 import org.akraino.validation.ui.data.Lab;
29
30 @Entity
31 @Table(name = "akraino.timeslot")
32 public class Timeslot implements Serializable {
33
34     /**
35      *
36      */
37     private static final long serialVersionUID = 1L;
38
39     @Id
40     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "timeslot_id_generator")
41     @SequenceGenerator(name = "timeslot_id_generator", sequenceName = "akraino.seq_timeslot", allocationSize = 1)
42     @Column(name = "timeslot_id")
43     private int timeslotId;
44
45     @Column(name = "start_date_time")
46     private String startDateTime;
47
48     @Column(name = "duration")
49     private int duration;
50
51     @Column(name = "lab")
52     private Lab lab;
53
54     public void setTimeslotId(int timeslotId) {
55         this.timeslotId = timeslotId;
56     }
57
58     public int getTimeslotId() {
59         return timeslotId;
60     }
61
62     public void setStartDateTime(String startDateTime) {
63         this.startDateTime = startDateTime;
64     }
65
66     public String getStartDateTime() {
67         return startDateTime;
68     }
69
70     public void setDuration(int duration) {
71         this.duration = duration;
72     }
73
74     public int getDuration() {
75         return duration;
76     }
77
78     public void setLab(Lab lab) {
79         this.lab = lab;
80     }
81
82     public Lab getLab() {
83         return lab;
84     }
85 }