2 * Copyright © 2017-2018 AT&T Intellectual Property.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.controllerblueprints.service.domain;
19 import com.fasterxml.jackson.annotation.JsonFormat;
20 import io.swagger.annotations.ApiModelProperty;
21 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
22 import org.springframework.data.annotation.LastModifiedDate;
23 import org.springframework.data.jpa.domain.support.AuditingEntityListener;
25 import javax.persistence.*;
26 import java.io.Serializable;
27 import java.util.Date;
30 * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
32 * @author Brinda Santh
35 @EntityListeners({AuditingEntityListener.class})
37 @Table(name = "RESOURCE_DICTIONARY")
38 public class ResourceDictionary implements Serializable {
39 private static final long serialVersionUID = 1L;
42 @Column(name = "name", nullable = false)
43 @ApiModelProperty(required=true)
46 @Column(name = "data_type", nullable = false)
47 @ApiModelProperty(required=true)
48 private String dataType;
50 @Column(name = "entry_schema")
51 private String entrySchema;
54 @Convert(converter = JpaResourceDefinitionConverter.class)
55 @Column(name = "definition", nullable = false)
56 @ApiModelProperty(required=true)
57 private ResourceDefinition definition;
60 @Column(name = "description", nullable = false)
61 @ApiModelProperty(required=true)
62 private String description;
65 @Column(name = "tags", nullable = false)
66 @ApiModelProperty(required=true)
69 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
71 @Temporal(TemporalType.TIMESTAMP)
72 @Column(name = "creation_date")
73 private Date creationDate;
75 @Column(name = "updated_by", nullable = false)
76 @ApiModelProperty(required=true)
77 private String updatedBy;
80 public String toString() {
81 return "[" + ", name = " + name +
82 ", dataType = " + dataType +
83 ", entrySchema = " + entrySchema +
84 ", definition =" + definition +
85 ", description = " + description +
86 ", updatedBy = " + updatedBy +
88 ", creationDate = " + creationDate +
92 public String getName() {
96 public void setName(String name) {
100 public String getDataType() {
104 public void setDataType(String dataType) {
105 this.dataType = dataType;
108 public String getEntrySchema() {
112 public void setEntrySchema(String entrySchema) {
113 this.entrySchema = entrySchema;
116 public ResourceDefinition getDefinition() {
120 public void setDefinition(ResourceDefinition definition) {
121 this.definition = definition;
124 public String getDescription() {
128 public void setDescription(String description) {
129 this.description = description;
132 public String getTags() {
136 public void setTags(String tags) {
140 public Date getCreationDate() {
144 public void setCreationDate(Date creationDate) {
145 this.creationDate = creationDate;
148 public String getUpdatedBy() {
152 public void setUpdatedBy(String updatedBy) {
153 this.updatedBy = updatedBy;