aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/zusammen-tools/src
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2017-12-31 11:23:20 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-31 11:29:42 +0000
commitfa79ba2e1b23504e07f1fa8019050594ac7dfdf0 (patch)
tree50439be7db6216b188afbb86328e82f193bf8f46 /openecomp-be/tools/zusammen-tools/src
parent0b566202130593dffbc9590dacea2e57083fd4d9 (diff)
Default ctor and styling in HealingEntity
Change-Id: I489ecbf4cd3789febe3ff56e11c1db31bf5e1d89 Issue-ID: SDC-343 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/tools/zusammen-tools/src')
-rw-r--r--openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java51
1 files changed, 38 insertions, 13 deletions
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
index 8c95f795a6..faaab06c49 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © 2016-2017 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.openecomp.core.tools.store.zusammen.datatypes;
import com.datastax.driver.mapping.annotations.Column;
@@ -9,6 +24,7 @@ import com.datastax.driver.mapping.annotations.Table;
*/
@Table(keyspace = "dox", name = "healing")
public class HealingEntity {
+
@Column(name = "space")
@PartitionKey(0)
private String space;
@@ -25,7 +41,25 @@ public class HealingEntity {
private boolean healingFlag;
@Column(name = "old_version")
- private String old_version;
+ private String oldVersion;
+
+ /**
+ * Every entity class must have a default constructor according to
+ * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
+ * Definition of mapped classes</a>.
+ */
+ public HealingEntity() {
+ // Don't delete! Default constructor is required by DataStax driver
+ }
+
+ public HealingEntity(String space, String itemId, String versionId, boolean healingFlag,
+ String oldVersion) {
+ this.space = space;
+ this.itemId = itemId;
+ this.versionId = versionId;
+ this.healingFlag = healingFlag;
+ this.oldVersion = oldVersion;
+ }
public String getSpace() {
return space;
@@ -59,20 +93,11 @@ public class HealingEntity {
this.healingFlag = healingFlag;
}
- public HealingEntity(String space, String itemId, String versionId, boolean healingFlag,String
- oldVersion) {
- this.space = space;
- this.itemId = itemId;
- this.versionId = versionId;
- this.healingFlag = healingFlag;
- this.old_version = oldVersion;
- }
-
public String getOldVersion() {
- return old_version;
+ return oldVersion;
}
- public void setOldVersion(String old_version) {
- this.old_version = old_version;
+ public void setOldVersion(String oldVersion) {
+ this.oldVersion = oldVersion;
}
} \ No newline at end of file