Merge "Policy Installation documentation"
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / OptimizationModels.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-REST
4  * ================================================================================
5  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.onap.policy.rest.jpa;
21
22 import java.io.Serializable;
23
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.JoinColumn;
30 import javax.persistence.ManyToOne;
31 import javax.persistence.NamedQuery;
32 import javax.persistence.OrderBy;
33 import javax.persistence.Table;
34 /*
35  * JPA for the OOF Models. 
36  * 
37  * @version: 0.1
38  */
39
40
41 @Entity
42 @Table(name="OptimizationModels")
43 @NamedQuery(name="OptimizationModels.findAll", query="SELECT b FROM OptimizationModels b ")
44 public class OptimizationModels implements Serializable{
45         private static final long serialVersionUID = 1L;
46         
47         @Id
48         @GeneratedValue(strategy = GenerationType.AUTO)
49         @Column(name="id")
50         private int id;
51         
52         @Column(name="modelName", nullable=false, unique=true)
53         @OrderBy("asc")
54         private String modelName;
55         
56         @Column(name="description", nullable=true, length=2048)
57         private String description;
58         
59         @Column(name="dependency", nullable=true, length=2048)
60         private String dependency;
61
62         @Column(name="attributes", nullable=false, length=255)
63         private String attributes;
64         
65         @Column(name="ref_attributes", nullable=false, length=255)
66         private String refattributes;
67
68         @Column (name="sub_attributes", nullable=false, length=2000)
69         private String subattributes;
70         
71         @Column (name="dataOrderInfo", nullable=true, length=2000)
72         private String dataOrderInfo;
73         
74         @Column (name="version", nullable=false, length=2000)
75         private String version;
76         
77         @Column (name="enumValues", nullable=false, length=2000)
78         private String enumValues;
79         
80         @Column (name="annotation", nullable=false, length=2000)
81         private String annotation;
82         
83         public String getSubattributes() {
84                 return subattributes;
85         }
86
87         public void setSubattributes(String subattributes) {
88                 this.subattributes = subattributes;
89         }
90         
91         public String getDataOrderInfo() {
92                 return dataOrderInfo;
93         }
94
95         public void setDataOrderInfo(String dataOrderInfo) {
96                 this.dataOrderInfo = dataOrderInfo;
97         }
98
99         public String getVersion() {
100                 return version;
101         }
102
103         public void setVersion(String version) {
104                 this.version = version;
105         }
106
107         @ManyToOne
108         @JoinColumn(name="imported_by")
109         private UserInfo userCreatedBy;
110         
111         public UserInfo getUserCreatedBy() {
112                 return userCreatedBy;
113         }
114
115         public void setUserCreatedBy(UserInfo userCreatedBy) {
116                 this.userCreatedBy = userCreatedBy;
117         }
118         
119         public String getAttributes() {
120                 return attributes;
121         }
122
123         public void setAttributes(String attributes) {
124                 this.attributes = attributes;
125         }
126
127         public String getRefattributes() {
128                 return refattributes;
129         }
130
131         public void setRefattributes(String refattributes) {
132                 this.refattributes = refattributes;
133         }
134
135         public int getId() {
136                 return this.id;
137         }
138         
139         public void setId(int id) {
140                 this.id = id;
141         }
142         
143         public String getDescription() {
144                 return this.description;
145         }
146
147         public void setDescription(String description) {
148                 this.description = description;
149         }
150         
151         public String getDependency() {
152                 return dependency;
153         }
154
155         public void setDependency(String dependency) {
156                 this.dependency = dependency;
157         }
158         
159         public String getModelName(){
160                 return this.modelName;
161         }
162         
163         public void setModelName(String modelName){
164                 this.modelName = modelName;
165         }
166         
167         public String getEnumValues() {
168                 return enumValues;
169         }
170
171         public void setEnumValues(String enumValues) {
172                 this.enumValues = enumValues;
173         }
174         
175         public String getAnnotation() {
176                 return annotation;
177         }
178
179         public void setAnnotation(String annotation) {
180                 this.annotation = annotation;
181         }
182 }