Merge "Controller Blueprints Microservice"
[ccsdk/apps.git] / ms / controllerblueprints / modules / service / src / main / java / org / onap / ccsdk / apps / controllerblueprints / service / domain / ResourceDictionary.java
1 /*\r
2  * Copyright © 2017-2018 AT&T Intellectual Property.\r
3  *\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
7  *\r
8  *     http://www.apache.org/licenses/LICENSE-2.0\r
9  *\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
15  */\r
16 \r
17 package org.onap.ccsdk.apps.controllerblueprints.service.domain;\r
18 \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
23 \r
24 import javax.persistence.*;\r
25 import java.io.Serializable;\r
26 import java.util.Date;\r
27 \r
28 /**\r
29  * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity\r
30  *\r
31  * @author Brinda Santh\r
32  * @version 1.0\r
33  */\r
34 @EntityListeners({AuditingEntityListener.class})\r
35 @Entity\r
36 @Table(name = "RESOURCE_DICTIONARY")\r
37 public class ResourceDictionary implements Serializable {\r
38     private static final long serialVersionUID = 1L;\r
39 \r
40     @Id\r
41     @Column(name = "name", nullable = false)\r
42     @ApiModelProperty(required=true)\r
43     private String name;\r
44 \r
45     @Column(name = "resource_path", nullable = false)\r
46     @ApiModelProperty(required=true)\r
47     private String resourcePath;\r
48 \r
49     @Column(name = "resource_type", nullable = false)\r
50     @ApiModelProperty(required=true)\r
51     private String resourceType;\r
52 \r
53     @Column(name = "data_type", nullable = false)\r
54     @ApiModelProperty(required=true)\r
55     private String dataType;\r
56 \r
57     @Column(name = "entry_schema")\r
58     private String entrySchema;\r
59 \r
60     @Lob\r
61     @Column(name = "valid_values")\r
62     private String validValues;\r
63 \r
64     @Lob\r
65     @Column(name = "sample_value")\r
66     private String sampleValue;\r
67 \r
68     @Lob\r
69     @Column(name = "definition", nullable = false)\r
70     @ApiModelProperty(required=true)\r
71     private String definition;\r
72 \r
73     @Lob\r
74     @Column(name = "description", nullable = false)\r
75     @ApiModelProperty(required=true)\r
76     private String description;\r
77 \r
78     @Lob\r
79     @Column(name = "tags", nullable = false)\r
80     @ApiModelProperty(required=true)\r
81     private String tags;\r
82 \r
83     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
84     @LastModifiedDate\r
85     @Temporal(TemporalType.TIMESTAMP)\r
86     @Column(name = "creation_date")\r
87     private Date creationDate;\r
88 \r
89     @Column(name = "updated_by", nullable = false)\r
90     @ApiModelProperty(required=true)\r
91     private String updatedBy;\r
92 \r
93     @Override\r
94     public String toString() {\r
95         StringBuilder buffer = new StringBuilder("[");\r
96         buffer.append(", name = " + name);\r
97         buffer.append(", resourcePath = " + resourcePath);\r
98         buffer.append(", resourceType = " + resourceType);\r
99         buffer.append(", dataType = " + dataType);\r
100         buffer.append(", entrySchema = " + entrySchema);\r
101         buffer.append(", validValues = " + validValues);\r
102         buffer.append(", definition =" + definition);\r
103         buffer.append(", description = " + description);\r
104         buffer.append(", updatedBy = " + updatedBy);\r
105         buffer.append(", tags = " + tags);\r
106         buffer.append(", creationDate = " + creationDate);\r
107         buffer.append("]");\r
108         return buffer.toString();\r
109     }\r
110 \r
111     public String getResourcePath() {\r
112         return resourcePath;\r
113     }\r
114 \r
115     public void setResourcePath(String resourcePath) {\r
116         this.resourcePath = resourcePath;\r
117     }\r
118 \r
119     public String getName() {\r
120         return name;\r
121     }\r
122 \r
123     public void setName(String name) {\r
124         this.name = name;\r
125     }\r
126 \r
127     public String getResourceType() {\r
128         return resourceType;\r
129     }\r
130 \r
131     public void setResourceType(String resourceType) {\r
132         this.resourceType = resourceType;\r
133     }\r
134 \r
135     public String getDataType() {\r
136         return dataType;\r
137     }\r
138 \r
139     public void setDataType(String dataType) {\r
140         this.dataType = dataType;\r
141     }\r
142 \r
143     public String getEntrySchema() {\r
144         return entrySchema;\r
145     }\r
146 \r
147     public void setEntrySchema(String entrySchema) {\r
148         this.entrySchema = entrySchema;\r
149     }\r
150 \r
151     public String getValidValues() {\r
152         return validValues;\r
153     }\r
154 \r
155     public void setValidValues(String validValues) {\r
156         this.validValues = validValues;\r
157     }\r
158 \r
159     public String getSampleValue() {\r
160         return sampleValue;\r
161     }\r
162 \r
163     public void setSampleValue(String sampleValue) {\r
164         this.sampleValue = sampleValue;\r
165     }\r
166 \r
167     public String getDefinition() {\r
168         return definition;\r
169     }\r
170 \r
171     public void setDefinition(String definition) {\r
172         this.definition = definition;\r
173     }\r
174 \r
175     public String getDescription() {\r
176         return description;\r
177     }\r
178 \r
179     public void setDescription(String description) {\r
180         this.description = description;\r
181     }\r
182 \r
183     public String getTags() {\r
184         return tags;\r
185     }\r
186 \r
187     public void setTags(String tags) {\r
188         this.tags = tags;\r
189     }\r
190 \r
191     public Date getCreationDate() {\r
192         return creationDate;\r
193     }\r
194 \r
195     public void setCreationDate(Date creationDate) {\r
196         this.creationDate = creationDate;\r
197     }\r
198 \r
199     public String getUpdatedBy() {\r
200         return updatedBy;\r
201     }\r
202 \r
203     public void setUpdatedBy(String updatedBy) {\r
204         this.updatedBy = updatedBy;\r
205     }\r
206 \r
207 \r
208 \r
209 }\r