2 * Copyright © 2017-2018 AT&T Intellectual Property.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package org.onap.ccsdk.apps.controllerblueprints.service.domain;
\r
19 import com.fasterxml.jackson.annotation.JsonFormat;
\r
20 import io.swagger.annotations.ApiModelProperty;
\r
21 import org.springframework.data.annotation.LastModifiedDate;
\r
22 import org.springframework.data.jpa.domain.support.AuditingEntityListener;
\r
24 import javax.persistence.*;
\r
25 import java.io.Serializable;
\r
26 import java.util.Date;
\r
30 * AsdcReference.java Purpose: Provide Configuration Generator AsdcReference Entity
\r
32 * @author Brinda Santh
\r
35 @EntityListeners({AuditingEntityListener.class})
\r
37 @Table(name = "MODEL_TYPE")
\r
38 public class ModelType implements Serializable {
\r
39 private static final long serialVersionUID = 1L;
\r
42 @Column(name = "model_name", nullable = false)
\r
43 @ApiModelProperty(required=true)
\r
44 private String modelName;
\r
46 @Column(name = "derived_from", nullable = false)
\r
47 @ApiModelProperty(required=true)
\r
48 private String derivedFrom;
\r
50 @Column(name = "definition_type", nullable = false)
\r
51 @ApiModelProperty(required=true)
\r
52 private String definitionType;
\r
55 @Column(name = "definition", nullable = false)
\r
56 @ApiModelProperty(required=true)
\r
57 private String definition;
\r
60 @Column(name = "description", nullable = false)
\r
61 @ApiModelProperty(required=true)
\r
62 private String description;
\r
64 @Column(name = "version", nullable = false)
\r
65 @ApiModelProperty(required=true)
\r
66 private String version;
\r
69 @Column(name = "tags", nullable = false)
\r
70 @ApiModelProperty(required=true)
\r
71 private String tags;
\r
73 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
\r
75 @Temporal(TemporalType.TIMESTAMP)
\r
76 @Column(name = "creation_date")
\r
77 private Date creationDate;
\r
79 @Column(name = "updated_by", nullable = false)
\r
80 @ApiModelProperty(required=true)
\r
81 private String updatedBy;
\r
84 public String toString() {
\r
85 StringBuilder buffer = new StringBuilder("[");
\r
86 buffer.append(", modelName = " + modelName);
\r
87 buffer.append(", derivedFrom = " + derivedFrom);
\r
88 buffer.append(", definitionType = " + definitionType);
\r
89 buffer.append(", description = " + description);
\r
90 buffer.append(", creationDate = " + creationDate);
\r
91 buffer.append(", version = " + version);
\r
92 buffer.append(", updatedBy = " + updatedBy);
\r
93 buffer.append(", tags = " + tags);
\r
95 return buffer.toString();
\r
98 public String getModelName() {
\r
102 public void setModelName(String modelName) {
\r
103 this.modelName = modelName;
\r
106 public String getDerivedFrom() {
\r
107 return derivedFrom;
\r
110 public void setDerivedFrom(String derivedFrom) {
\r
111 this.derivedFrom = derivedFrom;
\r
114 public String getDefinitionType() {
\r
115 return definitionType;
\r
118 public void setDefinitionType(String definitionType) {
\r
119 this.definitionType = definitionType;
\r
122 public String getDefinition() {
\r
126 public void setDefinition(String definition) {
\r
127 this.definition = definition;
\r
130 public String getDescription() {
\r
131 return description;
\r
134 public void setDescription(String description) {
\r
135 this.description = description;
\r
138 public String getVersion() {
\r
142 public void setVersion(String version) {
\r
143 this.version = version;
\r
146 public String getTags() {
\r
150 public void setTags(String tags) {
\r
154 public Date getCreationDate() {
\r
155 return creationDate;
\r
158 public void setCreationDate(Date creationDate) {
\r
159 this.creationDate = creationDate;
\r
162 public String getUpdatedBy() {
\r
166 public void setUpdatedBy(String updatedBy) {
\r
167 this.updatedBy = updatedBy;
\r