From fa79ba2e1b23504e07f1fa8019050594ac7dfdf0 Mon Sep 17 00:00:00 2001 From: vempo Date: Sun, 31 Dec 2017 11:23:20 +0200 Subject: Default ctor and styling in HealingEntity Change-Id: I489ecbf4cd3789febe3ff56e11c1db31bf5e1d89 Issue-ID: SDC-343 Signed-off-by: vempo --- .../store/zusammen/datatypes/HealingEntity.java | 51 ++++++++++++++++------ 1 file changed, 38 insertions(+), 13 deletions(-) (limited to 'openecomp-be/tools/zusammen-tools/src/main/java/org') 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 + * + * Definition of mapped classes. + */ + 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 -- cgit 1.2.3-korg