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.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
\r
22 import org.springframework.data.annotation.LastModifiedDate;
\r
23 import org.springframework.data.jpa.domain.support.AuditingEntityListener;
\r
25 import javax.persistence.*;
\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
42 @Column(name = "name", nullable = false)
\r
43 @ApiModelProperty(required=true)
\r
44 private String name;
\r
46 @Column(name = "data_type", nullable = false)
\r
47 @ApiModelProperty(required=true)
\r
48 private String dataType;
\r
50 @Column(name = "entry_schema")
\r
51 private String entrySchema;
\r
54 @Convert(converter = JpaResourceDefinitionConverter.class)
\r
55 @Column(name = "definition", nullable = false)
\r
56 @ApiModelProperty(required=true)
\r
57 private ResourceDefinition definition;
\r
60 @Column(name = "description", nullable = false)
\r
61 @ApiModelProperty(required=true)
\r
62 private String description;
\r
65 @Column(name = "tags", nullable = false)
\r
66 @ApiModelProperty(required=true)
\r
67 private String tags;
\r
69 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
\r
71 @Temporal(TemporalType.TIMESTAMP)
\r
72 @Column(name = "creation_date")
\r
73 private Date creationDate;
\r
75 @Column(name = "updated_by", nullable = false)
\r
76 @ApiModelProperty(required=true)
\r
77 private String updatedBy;
\r
80 public String toString() {
\r
81 return "[" + ", name = " + name +
\r
82 ", dataType = " + dataType +
\r
83 ", entrySchema = " + entrySchema +
\r
84 ", definition =" + definition +
\r
85 ", description = " + description +
\r
86 ", updatedBy = " + updatedBy +
\r
87 ", tags = " + tags +
\r
88 ", creationDate = " + creationDate +
\r
92 public String getName() {
\r
96 public void setName(String name) {
\r
100 public String getDataType() {
\r
104 public void setDataType(String dataType) {
\r
105 this.dataType = dataType;
\r
108 public String getEntrySchema() {
\r
109 return entrySchema;
\r
112 public void setEntrySchema(String entrySchema) {
\r
113 this.entrySchema = entrySchema;
\r
116 public ResourceDefinition getDefinition() {
\r
120 public void setDefinition(ResourceDefinition definition) {
\r
121 this.definition = definition;
\r
124 public String getDescription() {
\r
125 return description;
\r
128 public void setDescription(String description) {
\r
129 this.description = description;
\r
132 public String getTags() {
\r
136 public void setTags(String tags) {
\r
140 public Date getCreationDate() {
\r
141 return creationDate;
\r
144 public void setCreationDate(Date creationDate) {
\r
145 this.creationDate = creationDate;
\r
148 public String getUpdatedBy() {
\r
152 public void setUpdatedBy(String updatedBy) {
\r
153 this.updatedBy = updatedBy;
\r