UI initial implementation.
[validation.git] / ui / src / main / java / org / akraino / validation / ui / entity / BlueprintInstance.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"); you may
5  * not use this file except in compliance with the License. You may obtain
6  * 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
13  * implied. See the License for the specific language governing
14  * permissions and 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.JoinColumn;
26 import javax.persistence.ManyToOne;
27 import javax.persistence.OneToOne;
28 import javax.persistence.SequenceGenerator;
29 import javax.persistence.Table;
30
31 import org.akraino.validation.ui.data.BlueprintLayer;
32
33 @Entity
34 @Table(name = "akraino.blueprint_instance")
35 public class BlueprintInstance implements Serializable {
36
37     /**
38      *
39      */
40     private static final long serialVersionUID = 1L;
41
42     @Id
43     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "blueprint_instance_id_generator")
44     @SequenceGenerator(name = "blueprint_instance_id_generator", sequenceName = "akraino.seq_blueprint_instance",
45             allocationSize = 1)
46     @Column(name = "blueprint_instance_id")
47     private int blueprintInstId;
48
49     @ManyToOne
50     @JoinColumn(name = "blueprint_id")
51     private Blueprint blueprint;
52
53     @Column(name = "version")
54     private String version;
55
56     @Column(name = "layer")
57     private BlueprintLayer layer;
58
59     @Column(name = "layer_description")
60     private String layerDescription;
61
62     @OneToOne
63     @JoinColumn(name = "timeslot_id")
64     private Timeslot timeslot;
65
66     public int getBlueprintInstanceId() {
67         return blueprintInstId;
68     }
69
70     public void setBlueprintInstanceId(int blueprintInstId) {
71         this.blueprintInstId = blueprintInstId;
72     }
73
74     public Blueprint getBlueprint() {
75         return blueprint;
76     }
77
78     public void setBlueprint(Blueprint blueprint) {
79         this.blueprint = blueprint;
80     }
81
82     public void setVersion(String version) {
83         this.version = version;
84     }
85
86     public String getVersion() {
87         return version;
88     }
89
90     public BlueprintLayer getLayer() {
91         return layer;
92     }
93
94     public void setLayer(BlueprintLayer layer) {
95         this.layer = layer;
96     }
97
98     public void setLayerDescription(String layerDescription) {
99         this.layerDescription = layerDescription;
100     }
101
102     public String getLayerDescription() {
103         return layerDescription;
104     }
105
106     public void setTimeslot(Timeslot timeslot) {
107         this.timeslot = timeslot;
108     }
109
110     public Timeslot getTimeslot() {
111         return this.timeslot;
112     }
113
114 }