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 org.springframework.data.annotation.LastModifiedDate;
\r
20 import org.springframework.data.jpa.domain.support.AuditingEntityListener;
\r
22 import javax.persistence.*;
\r
23 import javax.validation.constraints.NotNull;
\r
24 import java.io.Serializable;
\r
25 import java.util.Date;
\r
29 * AsdcReference.java Purpose: Provide Configuration Generator AsdcReference Entity
\r
31 * @author Brinda Santh
\r
34 @EntityListeners({AuditingEntityListener.class})
\r
36 @Table(name = "MODEL_TYPE")
\r
37 public class ModelType implements Serializable {
\r
38 private static final long serialVersionUID = 1L;
\r
42 @Column(name = "model_name", nullable = false)
\r
43 private String modelName;
\r
46 @Column(name = "derived_from")
\r
47 private String derivedFrom;
\r
50 @Column(name = "definition_type")
\r
51 private String definitionType;
\r
55 @Column(name = "definition")
\r
56 private String definition;
\r
60 @Column(name = "description")
\r
61 private String description;
\r
64 @Column(name = "version")
\r
65 private String version;
\r
69 @Column(name = "tags")
\r
70 private String tags;
\r
72 // @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy KK:mm:ss a Z")
\r
74 @Temporal(TemporalType.TIMESTAMP)
\r
75 @Column(name = "creation_date")
\r
76 private Date creationDate;
\r
79 @Column(name = "updated_by")
\r
80 private String updatedBy;
\r
83 public String toString() {
\r
84 StringBuilder buffer = new StringBuilder("[");
\r
85 buffer.append(", modelName = " + modelName);
\r
86 buffer.append(", derivedFrom = " + derivedFrom);
\r
87 buffer.append(", definitionType = " + definitionType);
\r
88 buffer.append(", description = " + description);
\r
89 buffer.append(", creationDate = " + creationDate);
\r
90 buffer.append(", version = " + version);
\r
91 buffer.append(", updatedBy = " + updatedBy);
\r
92 buffer.append(", tags = " + tags);
\r
94 return buffer.toString();
\r
97 public String getModelName() {
\r
101 public void setModelName(String modelName) {
\r
102 this.modelName = modelName;
\r
105 public String getDerivedFrom() {
\r
106 return derivedFrom;
\r
109 public void setDerivedFrom(String derivedFrom) {
\r
110 this.derivedFrom = derivedFrom;
\r
113 public String getDefinitionType() {
\r
114 return definitionType;
\r
117 public void setDefinitionType(String definitionType) {
\r
118 this.definitionType = definitionType;
\r
121 public String getDefinition() {
\r
125 public void setDefinition(String definition) {
\r
126 this.definition = definition;
\r
129 public String getDescription() {
\r
130 return description;
\r
133 public void setDescription(String description) {
\r
134 this.description = description;
\r
137 public String getVersion() {
\r
141 public void setVersion(String version) {
\r
142 this.version = version;
\r
145 public String getTags() {
\r
149 public void setTags(String tags) {
\r
153 public Date getCreationDate() {
\r
154 return creationDate;
\r
157 public void setCreationDate(Date creationDate) {
\r
158 this.creationDate = creationDate;
\r
161 public String getUpdatedBy() {
\r
165 public void setUpdatedBy(String updatedBy) {
\r
166 this.updatedBy = updatedBy;
\r