Added oparent to sdc main
[sdc.git] / openecomp-be / tools / zusammen-tools / src / main / java / org / openecomp / core / tools / store / zusammen / datatypes / VersionEntity.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.core.tools.store.zusammen.datatypes;
22
23 import com.datastax.driver.mapping.annotations.Column;
24 import com.datastax.driver.mapping.annotations.PartitionKey;
25 import com.datastax.driver.mapping.annotations.Table;
26
27 import java.util.Date;
28
29 /**
30  * CREATE TABLE zusammen_dox.version (
31  * space text,
32  * item_id text,
33  * version_id text,
34  * base_version_id text,
35  * creation_time timestamp,
36  * info text,
37  * modification_time timestamp,
38  * relations text,
39  * PRIMARY KEY ((space, item_id), version_id)
40  * ) WITH CLUSTERING ORDER BY (version_id ASC)
41  * AND bloom_filter_fp_chance = 0.01
42  * AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
43  * AND comment = ''
44  * AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
45  * AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
46  * AND dclocal_read_repair_chance = 0.1
47  * AND default_time_to_live = 0
48  * AND gc_grace_seconds = 864000
49  * AND max_index_interval = 2048
50  * AND memtable_flush_period_in_ms = 0
51  * AND min_index_interval = 128
52  * AND read_repair_chance = 0.0
53  * AND speculative_retry = '99.0PERCENTILE';
54  */
55 @Table(
56         keyspace = "zusammen_dox",
57         name = "version"
58 )
59 public class VersionEntity {
60     @Column(name = "space")
61     @PartitionKey(0)
62     private String space;
63
64     @Column(name = "item_id")
65     @PartitionKey(1)
66     private String itemId;
67
68     @Column(name = "version_id")
69     @PartitionKey(2)
70     private String versionId;
71
72     @Column(name = "base_version_id")
73     private String baseVersionId;
74
75     @Column(name = "creation_time")
76     private Date creationTime;
77
78     @Column(name = "info")
79     private String info;
80
81     @Column(name = "modification_time")
82     private Date modificationTime;
83
84     @Column(name = "relations")
85     private String relations;
86
87     public String getSpace() {
88         return space;
89     }
90
91     public void setSpace(String space) {
92         this.space = space;
93     }
94
95     public String getItemId() {
96         return itemId;
97     }
98
99     public void setItemId(String itemId) {
100         this.itemId = itemId;
101     }
102
103     public String getVersionId() {
104         return versionId;
105     }
106
107     public void setVersionId(String versionId) {
108         this.versionId = versionId;
109     }
110
111     public String getBaseVersionId() {
112         return baseVersionId;
113     }
114
115     public void setBaseVersionId(String baseVersionId) {
116         this.baseVersionId = baseVersionId;
117     }
118
119     public Date getCreationTime() {
120         return creationTime;
121     }
122
123     public void setCreationTime(Date creationTime) {
124         this.creationTime = creationTime;
125     }
126
127     public String getInfo() {
128         return info;
129     }
130
131     public void setInfo(String info) {
132         this.info = info;
133     }
134
135     public Date getModificationTime() {
136         return modificationTime;
137     }
138
139     public void setModificationTime(Date modificationTime) {
140         this.modificationTime = modificationTime;
141     }
142
143     public String getRelations() {
144         return relations;
145     }
146
147     public void setRelations(String relations) {
148         this.relations = relations;
149     }
150 }