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
30 * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
\r
32 * @author Brinda Santh
\r
35 @EntityListeners({AuditingEntityListener.class})
\r
37 @Table(name = "RESOURCE_DICTIONARY")
\r
38 public class ResourceDictionary implements Serializable {
\r
39 private static final long serialVersionUID = 1L;
\r
43 @Column(name = "name")
\r
44 @ApiModelProperty(required=true)
\r
45 private String name;
\r
48 @Column(name = "resource_path")
\r
49 @ApiModelProperty(required=true)
\r
50 private String resourcePath;
\r
53 @Column(name = "resource_type")
\r
54 @ApiModelProperty(required=true)
\r
55 private String resourceType;
\r
58 @Column(name = "data_type")
\r
59 @ApiModelProperty(required=true)
\r
60 private String dataType;
\r
62 @Column(name = "entry_schema")
\r
63 private String entrySchema;
\r
66 @Column(name = "valid_values")
\r
67 private String validValues;
\r
70 @Column(name = "sample_value")
\r
71 private String sampleValue;
\r
75 @Column(name = "definition")
\r
76 @ApiModelProperty(required=true)
\r
77 private String definition;
\r
81 @Column(name = "description")
\r
82 @ApiModelProperty(required=true)
\r
83 private String description;
\r
87 @Column(name = "tags")
\r
88 @ApiModelProperty(required=true)
\r
89 private String tags;
\r
91 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
\r
93 @Temporal(TemporalType.TIMESTAMP)
\r
94 @Column(name = "creation_date")
\r
95 private Date creationDate;
\r
98 @Column(name = "updated_by")
\r
99 @ApiModelProperty(required=true)
\r
100 private String updatedBy;
\r
103 public String toString() {
\r
104 StringBuilder buffer = new StringBuilder("[");
\r
105 buffer.append(", name = " + name);
\r
106 buffer.append(", resourcePath = " + resourcePath);
\r
107 buffer.append(", resourceType = " + resourceType);
\r
108 buffer.append(", dataType = " + dataType);
\r
109 buffer.append(", entrySchema = " + entrySchema);
\r
110 buffer.append(", validValues = " + validValues);
\r
111 buffer.append(", definition =" + definition);
\r
112 buffer.append(", description = " + description);
\r
113 buffer.append(", updatedBy = " + updatedBy);
\r
114 buffer.append(", tags = " + tags);
\r
115 buffer.append(", creationDate = " + creationDate);
\r
116 buffer.append("]");
\r
117 return buffer.toString();
\r
120 public String getResourcePath() {
\r
121 return resourcePath;
\r
124 public void setResourcePath(String resourcePath) {
\r
125 this.resourcePath = resourcePath;
\r
128 public String getName() {
\r
132 public void setName(String name) {
\r
136 public String getResourceType() {
\r
137 return resourceType;
\r
140 public void setResourceType(String resourceType) {
\r
141 this.resourceType = resourceType;
\r
144 public String getDataType() {
\r
148 public void setDataType(String dataType) {
\r
149 this.dataType = dataType;
\r
152 public String getEntrySchema() {
\r
153 return entrySchema;
\r
156 public void setEntrySchema(String entrySchema) {
\r
157 this.entrySchema = entrySchema;
\r
160 public String getValidValues() {
\r
161 return validValues;
\r
164 public void setValidValues(String validValues) {
\r
165 this.validValues = validValues;
\r
168 public String getSampleValue() {
\r
169 return sampleValue;
\r
172 public void setSampleValue(String sampleValue) {
\r
173 this.sampleValue = sampleValue;
\r
176 public String getDefinition() {
\r
180 public void setDefinition(String definition) {
\r
181 this.definition = definition;
\r
184 public String getDescription() {
\r
185 return description;
\r
188 public void setDescription(String description) {
\r
189 this.description = description;
\r
192 public String getTags() {
\r
196 public void setTags(String tags) {
\r
200 public Date getCreationDate() {
\r
201 return creationDate;
\r
204 public void setCreationDate(Date creationDate) {
\r
205 this.creationDate = creationDate;
\r
208 public String getUpdatedBy() {
\r
212 public void setUpdatedBy(String updatedBy) {
\r
213 this.updatedBy = updatedBy;
\r