2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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=========================================================
23 * THIS FILE CONTAINS PROPRIETARY INFORMATION OF
24 * AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
25 * ACCORDANCE WITH APPLICABLE AGREEMENTS.
27 * Copyright (c) 2015 AT&T Knowledge Ventures
28 * Unpublished and Not for Publication
31 package org.onap.policy.rest.jpa;
33 import java.io.Serializable;
35 import javax.persistence.Column;
36 import javax.persistence.Entity;
37 import javax.persistence.GeneratedValue;
38 import javax.persistence.GenerationType;
39 import javax.persistence.Id;
40 import javax.persistence.JoinColumn;
41 import javax.persistence.ManyToOne;
42 import javax.persistence.NamedQuery;
43 import javax.persistence.OrderBy;
44 import javax.persistence.Table;
46 * JPA for the Micro Service Models.
53 @Table(name="MicroServiceModels")
54 @NamedQuery(name="MicroServiceModels.findAll", query="SELECT b FROM MicroServiceModels b ")
55 public class MicroServiceModels implements Serializable{
56 private static final long serialVersionUID = 1L;
59 @GeneratedValue(strategy = GenerationType.AUTO)
63 @Column(name="modelName", nullable=false, unique=true)
65 private String modelName;
67 @Column(name="description", nullable=true, length=2048)
68 private String description;
70 @Column(name="dependency", nullable=true, length=2048)
71 private String dependency;
73 @Column(name="attributes", nullable=false, length=255)
74 private String attributes;
76 @Column(name="ref_attributes", nullable=false, length=255)
77 private String ref_attributes;
79 @Column (name="sub_attributes", nullable=false, length=2000)
80 private String sub_attributes;
82 @Column (name="version", nullable=false, length=2000)
83 private String version;
85 @Column (name="enumValues", nullable=false, length=2000)
86 private String enumValues;
88 @Column (name="annotation", nullable=false, length=2000)
89 private String annotation;
91 public String getSub_attributes() {
92 return sub_attributes;
95 public void setSub_attributes(String sub_attributes) {
96 this.sub_attributes = sub_attributes;
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 MicroServiceModels(){
122 public MicroServiceModels(String userid){
126 public String getAttributes() {
130 public void setAttributes(String attributes) {
131 this.attributes = attributes;
134 public String getRef_attributes() {
135 return ref_attributes;
138 public void setRef_attributes(String ref_attributes) {
139 this.ref_attributes = ref_attributes;
146 public void setId(int id) {
150 public String getDescription() {
151 return this.description;
154 public void setDescription(String description) {
155 this.description = description;
158 public String getDependency() {
162 public void setDependency(String dependency) {
163 this.dependency = dependency;
166 public String getModelName(){
167 return this.modelName;
170 public void setModelName(String modelName){
171 this.modelName = modelName;
174 public String getEnumValues() {
178 public void setEnumValues(String enumValues) {
179 this.enumValues = enumValues;
182 public String getAnnotation() {
186 public void setAnnotation(String annotation) {
187 this.annotation = annotation;