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
29 * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
\r
31 * @author Brinda Santh
\r
34 @EntityListeners({AuditingEntityListener.class})
\r
36 @Table(name = "RESOURCE_DICTIONARY")
\r
37 public class ResourceDictionary implements Serializable {
\r
38 private static final long serialVersionUID = 1L;
\r
41 @Column(name = "name", nullable = false)
\r
42 @ApiModelProperty(required=true)
\r
43 private String name;
\r
45 @Column(name = "resource_path", nullable = false)
\r
46 @ApiModelProperty(required=true)
\r
47 private String resourcePath;
\r
49 @Column(name = "resource_type", nullable = false)
\r
50 @ApiModelProperty(required=true)
\r
51 private String resourceType;
\r
53 @Column(name = "data_type", nullable = false)
\r
54 @ApiModelProperty(required=true)
\r
55 private String dataType;
\r
57 @Column(name = "entry_schema")
\r
58 private String entrySchema;
\r
61 @Column(name = "valid_values")
\r
62 private String validValues;
\r
65 @Column(name = "sample_value")
\r
66 private String sampleValue;
\r
69 @Column(name = "definition", nullable = false)
\r
70 @ApiModelProperty(required=true)
\r
71 private String definition;
\r
74 @Column(name = "description", nullable = false)
\r
75 @ApiModelProperty(required=true)
\r
76 private String description;
\r
79 @Column(name = "tags", nullable = false)
\r
80 @ApiModelProperty(required=true)
\r
81 private String tags;
\r
83 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
\r
85 @Temporal(TemporalType.TIMESTAMP)
\r
86 @Column(name = "creation_date")
\r
87 private Date creationDate;
\r
89 @Column(name = "updated_by", nullable = false)
\r
90 @ApiModelProperty(required=true)
\r
91 private String updatedBy;
\r
94 public String toString() {
\r
95 String buffer = "[" + ", name = " + name +
\r
96 ", resourcePath = " + resourcePath +
\r
97 ", resourceType = " + resourceType +
\r
98 ", dataType = " + dataType +
\r
99 ", entrySchema = " + entrySchema +
\r
100 ", validValues = " + validValues +
\r
101 ", definition =" + definition +
\r
102 ", description = " + description +
\r
103 ", updatedBy = " + updatedBy +
\r
104 ", tags = " + tags +
\r
105 ", creationDate = " + creationDate +
\r
110 public String getResourcePath() {
\r
111 return resourcePath;
\r
114 public void setResourcePath(String resourcePath) {
\r
115 this.resourcePath = resourcePath;
\r
118 public String getName() {
\r
122 public void setName(String name) {
\r
126 public String getResourceType() {
\r
127 return resourceType;
\r
130 public void setResourceType(String resourceType) {
\r
131 this.resourceType = resourceType;
\r
134 public String getDataType() {
\r
138 public void setDataType(String dataType) {
\r
139 this.dataType = dataType;
\r
142 public String getEntrySchema() {
\r
143 return entrySchema;
\r
146 public void setEntrySchema(String entrySchema) {
\r
147 this.entrySchema = entrySchema;
\r
150 public String getValidValues() {
\r
151 return validValues;
\r
154 public void setValidValues(String validValues) {
\r
155 this.validValues = validValues;
\r
158 public String getSampleValue() {
\r
159 return sampleValue;
\r
162 public void setSampleValue(String sampleValue) {
\r
163 this.sampleValue = sampleValue;
\r
166 public String getDefinition() {
\r
170 public void setDefinition(String definition) {
\r
171 this.definition = definition;
\r
174 public String getDescription() {
\r
175 return description;
\r
178 public void setDescription(String description) {
\r
179 this.description = description;
\r
182 public String getTags() {
\r
186 public void setTags(String tags) {
\r
190 public Date getCreationDate() {
\r
191 return creationDate;
\r
194 public void setCreationDate(Date creationDate) {
\r
195 this.creationDate = creationDate;
\r
198 public String getUpdatedBy() {
\r
202 public void setUpdatedBy(String updatedBy) {
\r
203 this.updatedBy = updatedBy;
\r