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.openecomp.policy.rest.jpa;
33 import java.io.Serializable;
34 import java.util.Date;
36 import javax.persistence.Column;
37 import javax.persistence.Entity;
38 import javax.persistence.GeneratedValue;
39 import javax.persistence.GenerationType;
40 import javax.persistence.Id;
41 import javax.persistence.JoinColumn;
42 import javax.persistence.ManyToOne;
43 import javax.persistence.NamedQuery;
44 import javax.persistence.OrderBy;
45 import javax.persistence.Table;
47 * JPA for the Micro Service Models.
51 import javax.persistence.Temporal;
52 import javax.persistence.TemporalType;
54 import org.openecomp.policy.rest.jpa.UserInfo;
58 @Table(name="MicroServiceModels")
59 @NamedQuery(name="MicroServiceModels.findAll", query="SELECT b FROM MicroServiceModels b ")
60 public class MicroServiceModels implements Serializable{
61 private static final long serialVersionUID = 1L;
64 @GeneratedValue(strategy = GenerationType.AUTO)
68 @Column(name="modelName", nullable=false, unique=true)
70 private String modelName;
72 @Column(name="description", nullable=true, length=2048)
73 private String description;
75 @Column(name="dependency", nullable=true, length=2048)
76 private String dependency;
78 @Column(name="attributes", nullable=false, length=255)
79 private String attributes;
81 @Column(name="ref_attributes", nullable=false, length=255)
82 private String ref_attributes;
84 @Column (name="sub_attributes", nullable=false, length=2000)
85 private String sub_attributes;
87 @Column (name="version", nullable=false, length=2000)
88 private String version;
90 public String getSub_attributes() {
91 return sub_attributes;
94 public void setSub_attributes(String sub_attributes) {
95 this.sub_attributes = sub_attributes;
98 public String getVersion() {
102 public void setVersion(String version) {
103 this.version = version;
107 @JoinColumn(name="imported_by")
108 private UserInfo userCreatedBy;
110 public UserInfo getUserCreatedBy() {
111 return userCreatedBy;
114 public void setUserCreatedBy(UserInfo userCreatedBy) {
115 this.userCreatedBy = userCreatedBy;
118 public MicroServiceModels(){
121 public MicroServiceModels(String userid){
125 public String getAttributes() {
129 public void setAttributes(String attributes) {
130 this.attributes = attributes;
133 public String getRef_attributes() {
134 return ref_attributes;
137 public void setRef_attributes(String ref_attributes) {
138 this.ref_attributes = ref_attributes;
145 public void setId(int id) {
149 public String getDescription() {
150 return this.description;
153 public void setDescription(String description) {
154 this.description = description;
157 public String getDependency() {
161 public void setDependency(String dependency) {
162 this.dependency = dependency;
165 public String getModelName(){
166 return this.modelName;
169 public void setModelName(String modelName){
170 this.modelName = modelName;