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 javax.validation.constraints.NotNull;
\r
26 import java.io.Serializable;
\r
27 import java.util.Date;
\r
31 * AsdcReference.java Purpose: Provide Configuration Generator AsdcReference Entity
\r
33 * @author Brinda Santh
\r
36 @EntityListeners({AuditingEntityListener.class})
\r
38 @Table(name = "MODEL_TYPE")
\r
39 public class ModelType implements Serializable {
\r
40 private static final long serialVersionUID = 1L;
\r
44 @Column(name = "model_name", nullable = false)
\r
45 @ApiModelProperty(required=true)
\r
46 private String modelName;
\r
49 @Column(name = "derived_from")
\r
50 @ApiModelProperty(required=true)
\r
51 private String derivedFrom;
\r
54 @Column(name = "definition_type")
\r
55 @ApiModelProperty(required=true)
\r
56 private String definitionType;
\r
60 @Column(name = "definition")
\r
61 @ApiModelProperty(required=true)
\r
62 private String definition;
\r
66 @Column(name = "description")
\r
67 @ApiModelProperty(required=true)
\r
68 private String description;
\r
71 @Column(name = "version")
\r
72 @ApiModelProperty(required=true)
\r
73 private String version;
\r
77 @Column(name = "tags")
\r
78 @ApiModelProperty(required=true)
\r
79 private String tags;
\r
81 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
\r
83 @Temporal(TemporalType.TIMESTAMP)
\r
84 @Column(name = "creation_date")
\r
85 private Date creationDate;
\r
88 @Column(name = "updated_by")
\r
89 @ApiModelProperty(required=true)
\r
90 private String updatedBy;
\r
93 public String toString() {
\r
94 StringBuilder buffer = new StringBuilder("[");
\r
95 buffer.append(", modelName = " + modelName);
\r
96 buffer.append(", derivedFrom = " + derivedFrom);
\r
97 buffer.append(", definitionType = " + definitionType);
\r
98 buffer.append(", description = " + description);
\r
99 buffer.append(", creationDate = " + creationDate);
\r
100 buffer.append(", version = " + version);
\r
101 buffer.append(", updatedBy = " + updatedBy);
\r
102 buffer.append(", tags = " + tags);
\r
103 buffer.append("]");
\r
104 return buffer.toString();
\r
107 public String getModelName() {
\r
111 public void setModelName(String modelName) {
\r
112 this.modelName = modelName;
\r
115 public String getDerivedFrom() {
\r
116 return derivedFrom;
\r
119 public void setDerivedFrom(String derivedFrom) {
\r
120 this.derivedFrom = derivedFrom;
\r
123 public String getDefinitionType() {
\r
124 return definitionType;
\r
127 public void setDefinitionType(String definitionType) {
\r
128 this.definitionType = definitionType;
\r
131 public String getDefinition() {
\r
135 public void setDefinition(String definition) {
\r
136 this.definition = definition;
\r
139 public String getDescription() {
\r
140 return description;
\r
143 public void setDescription(String description) {
\r
144 this.description = description;
\r
147 public String getVersion() {
\r
151 public void setVersion(String version) {
\r
152 this.version = version;
\r
155 public String getTags() {
\r
159 public void setTags(String tags) {
\r
163 public Date getCreationDate() {
\r
164 return creationDate;
\r
167 public void setCreationDate(Date creationDate) {
\r
168 this.creationDate = creationDate;
\r
171 public String getUpdatedBy() {
\r
175 public void setUpdatedBy(String updatedBy) {
\r
176 this.updatedBy = updatedBy;
\r