d1fd93dd713910503317d4cb10d5a0c6600a9a23
[sdc.git] /
1 /*
2 * Copyright © 2016-2018 European Support Limited
3 *
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
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17 package org.openecomp.core.tools.store.zusammen.datatypes;
18
19 import com.datastax.driver.mapping.annotations.Column;
20 import com.datastax.driver.mapping.annotations.PartitionKey;
21 import com.datastax.driver.mapping.annotations.Table;
22
23 import java.nio.ByteBuffer;
24 import java.util.Set;
25
26 /**
27  * CREATE TABLE zusammen_dox.element (
28  * space text,
29  * item_id text,
30  * version_id text,
31  * element_id text,
32  * data blob,
33  * info text,
34  * namespace text,
35  * parent_id text,
36  * relations text,
37  * searchable_data blob,
38  * sub_element_ids set<text>,
39  * visualization blob,
40  * PRIMARY KEY ((space, item_id, version_id, element_id))
41  * )
42  */
43 @Table(
44         keyspace = "zusammen_dox",
45         name = "element"
46 )
47 public class ElementEntity {
48     @Column( name = "space" )
49     @PartitionKey(0)
50     private String space;
51
52     @Column(   name = "item_id" )
53     @PartitionKey(1)
54     private String itemId;
55
56     @Column(  name = "version_id" )
57     @PartitionKey(2)
58     private String versionId;
59
60     @Column(name = "element_id")
61     @PartitionKey(3)
62     private String elementId;
63
64     @Column(name = "data")
65     private ByteBuffer data;
66
67     @Column(name = "info")
68     private String info;
69
70     @Column(name = "namespace")
71     private String namespace;
72
73     @Column(name = "parent_id")
74     private String parentId;
75
76     @Column(name = "relations")
77     private String relations;
78
79     @Column(name = "searchable_data")
80     private ByteBuffer searchableData;
81
82     @Column(name = "sub_element_ids")
83     private Set<String> subElementIds;
84
85
86     @Column(name = "visualization")
87     private ByteBuffer visualization;
88
89     public String getSpace() {
90         return space;
91     }
92
93     public void setSpace(String space) {
94         this.space = space;
95     }
96
97     public String getItemId() {
98         return itemId;
99     }
100
101     public void setItemId(String itemId) {
102         this.itemId = itemId;
103     }
104
105     public String getVersionId() {
106         return versionId;
107     }
108
109     public void setVersionId(String versionId) {
110         this.versionId = versionId;
111     }
112
113     public String getElementId() {
114         return elementId;
115     }
116
117     public void setElementId(String elementId) {
118         this.elementId = elementId;
119     }
120
121     public ByteBuffer getData() {
122         return data;
123     }
124
125     public void setData(ByteBuffer data) {
126         this.data = data;
127     }
128
129     public String getInfo() {
130         return info;
131     }
132
133     public void setInfo(String info) {
134         this.info = info;
135     }
136
137     public String getNamespace() {
138         return namespace;
139     }
140
141     public void setNamespace(String namespace) {
142         this.namespace = namespace;
143     }
144
145     public String getParentId() {
146         return parentId;
147     }
148
149     public void setParentId(String parentId) {
150         this.parentId = parentId;
151     }
152
153     public String getRelations() {
154         return relations;
155     }
156
157     public void setRelations(String relations) {
158         this.relations = relations;
159     }
160
161     public ByteBuffer getSearchableData() {
162         return searchableData;
163     }
164
165     public void setSearchableData(ByteBuffer searchableData) {
166         this.searchableData = searchableData;
167     }
168
169     public Set<String> getSubElementIds() {
170         return subElementIds;
171     }
172
173     public void setSubElementIds(Set<String> subElementIds) {
174         this.subElementIds = subElementIds;
175     }
176
177     public ByteBuffer getVisualization() {
178         return visualization;
179     }
180
181     public void setVisualization(ByteBuffer visualization) {
182         this.visualization = visualization;
183     }
184 }