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