Added oparent to sdc main
[sdc.git] / openecomp-be / tools / zusammen-tools / src / main / java / org / openecomp / core / tools / store / zusammen / datatypes / HealingEntity.java
1 /*
2  * Copyright © 2016-2017 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 package org.openecomp.core.tools.store.zusammen.datatypes;
17
18 import com.datastax.driver.mapping.annotations.Column;
19 import com.datastax.driver.mapping.annotations.PartitionKey;
20 import com.datastax.driver.mapping.annotations.Table;
21
22 /**
23  * Created by ayalaben on 10/15/2017
24  */
25 @Table(keyspace = "dox", name = "healing")
26 public class HealingEntity {
27
28   @Column(name = "space")
29   @PartitionKey(0)
30   private String space;
31
32   @Column(name = "item_id")
33   @PartitionKey(1)
34   private String itemId;
35
36   @Column(name = "version_id")
37   @PartitionKey(2)
38   private String versionId;
39
40   @Column(name = "healing_needed")
41   private boolean healingFlag;
42
43   @Column(name = "old_version")
44   private String oldVersion;
45
46   /**
47    * Every entity class must have a default constructor according to
48    * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
49    * Definition of mapped classes</a>.
50    */
51   public HealingEntity() {
52     // Don't delete! Default constructor is required by DataStax driver
53   }
54
55   public HealingEntity(String space, String itemId, String versionId, boolean healingFlag,
56                        String oldVersion) {
57     this.space = space;
58     this.itemId = itemId;
59     this.versionId = versionId;
60     this.healingFlag = healingFlag;
61     this.oldVersion = oldVersion;
62   }
63
64   public String getSpace() {
65     return space;
66   }
67
68   public void setSpace(String space) {
69     this.space = space;
70   }
71
72   public String getItemId() {
73     return itemId;
74   }
75
76   public void setItemId(String itemId) {
77     this.itemId = itemId;
78   }
79
80   public String getVersionId() {
81     return versionId;
82   }
83
84   public void setVersionId(String versionId) {
85     this.versionId = versionId;
86   }
87
88   public boolean getHealingFlag() {
89     return healingFlag;
90   }
91
92   public void setHealingFlag(boolean healingFlag) {
93     this.healingFlag = healingFlag;
94   }
95
96   public String getOldVersion() {
97     return oldVersion;
98   }
99
100   public void setOldVersion(String oldVersion) {
101     this.oldVersion = oldVersion;
102   }
103 }