2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.onap.policy.rest.jpa;
22 import java.io.Serializable;
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;
35 * JPA for the Micro Service Models.
42 @Table(name="MicroServiceModels")
43 @NamedQuery(name="MicroServiceModels.findAll", query="SELECT b FROM MicroServiceModels b ")
44 public class MicroServiceModels implements Serializable{
45 private static final long serialVersionUID = 1L;
48 @GeneratedValue(strategy = GenerationType.AUTO)
52 @Column(name="modelName", nullable=false, unique=true)
54 private String modelName;
56 @Column(name="description", nullable=true, length=2048)
57 private String description;
59 @Column(name="dependency", nullable=true, length=2048)
60 private String dependency;
62 @Column(name="attributes", nullable=false, length=255)
63 private String attributes;
65 @Column(name="ref_attributes", nullable=false, length=255)
66 private String ref_attributes;
68 @Column (name="sub_attributes", nullable=false, length=2000)
69 private String sub_attributes;
71 @Column (name="dataOrderInfo", nullable=true, length=2000)
72 private String dataOrderInfo;
74 @Column (name="version", nullable=false, length=2000)
75 private String version;
77 @Column (name="enumValues", nullable=false, length=2000)
78 private String enumValues;
80 @Column (name="annotation", nullable=false, length=2000)
81 private String annotation;
83 public String getSub_attributes() {
84 return sub_attributes;
87 public void setSub_attributes(String sub_attributes) {
88 this.sub_attributes = sub_attributes;
91 public String getDataOrderInfo() {
95 public void setDataOrderInfo(String dataOrderInfo) {
96 this.dataOrderInfo = dataOrderInfo;
99 public String getVersion() {
103 public void setVersion(String version) {
104 this.version = version;
108 @JoinColumn(name="imported_by")
109 private UserInfo userCreatedBy;
111 public UserInfo getUserCreatedBy() {
112 return userCreatedBy;
115 public void setUserCreatedBy(UserInfo userCreatedBy) {
116 this.userCreatedBy = userCreatedBy;
119 public String getAttributes() {
123 public void setAttributes(String attributes) {
124 this.attributes = attributes;
127 public String getRef_attributes() {
128 return ref_attributes;
131 public void setRef_attributes(String ref_attributes) {
132 this.ref_attributes = ref_attributes;
139 public void setId(int id) {
143 public String getDescription() {
144 return this.description;
147 public void setDescription(String description) {
148 this.description = description;
151 public String getDependency() {
155 public void setDependency(String dependency) {
156 this.dependency = dependency;
159 public String getModelName(){
160 return this.modelName;
163 public void setModelName(String modelName){
164 this.modelName = modelName;
167 public String getEnumValues() {
171 public void setEnumValues(String enumValues) {
172 this.enumValues = enumValues;
175 public String getAnnotation() {
179 public void setAnnotation(String annotation) {
180 this.annotation = annotation;