aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2017-12-29 16:02:49 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2017-12-31 07:59:32 +0000
commit29c64b6bc8ad6506454759e68f32ca62d4aa69fc (patch)
tree9df27da2d36b3ba0d753bf3956fb801501729e3b /openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main
parent1de05ba162b61b32976b0e7d2e29fe3182a106cc (diff)
Default constructors in action-api module
Change-Id: I0ac01140d94cd55e6e15eabe00361a14866aa43f Issue-ID: SDC-343 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main')
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java7
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java12
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java6
3 files changed, 20 insertions, 5 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
index 7e56a04e1b..bc34b8dfda 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
@@ -41,8 +41,13 @@ public class ActionArtifactEntity {
@Column(name = "artifact")
private ByteBuffer artifact;
+ /**
+ * 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 ActionArtifactEntity() {
- //Default constructor implementation
+ // Don't delete! Default constructor is required by DataStax driver
}
public ActionArtifactEntity(String artifactUuId, int effectiveVersion) {
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
index 2c2bfe3ae9..9d0f3d830d 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
@@ -65,7 +65,13 @@ public class ActionEntity {
@Column(name = "data")
private String data;
+ /**
+ * 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 ActionEntity() {
+ // Don't delete! Default constructor is required by DataStax driver
}
public ActionEntity(String actionInvariantUuId, Version version) {
@@ -124,7 +130,7 @@ public class ActionEntity {
*/
public void setVendorList(List<String> vendorList) {
if (vendorList != null && !vendorList.isEmpty()) {
- List<String> lowerCaseVendorList = new ArrayList<String>();
+ List<String> lowerCaseVendorList = new ArrayList<>();
lowerCaseVendorList
.addAll(vendorList.stream().map(String::toLowerCase).collect(Collectors.toList()));
this.vendorList = lowerCaseVendorList;
@@ -144,7 +150,7 @@ public class ActionEntity {
*/
public void setCategoryList(List<String> categoryList) {
if (categoryList != null && !categoryList.isEmpty()) {
- List<String> lowerCaseCategoryList = new ArrayList<String>();
+ List<String> lowerCaseCategoryList = new ArrayList<>();
lowerCaseCategoryList
.addAll(categoryList.stream().map(String::toLowerCase).collect(Collectors.toList()));
this.categoryList = lowerCaseCategoryList;
@@ -199,8 +205,6 @@ public class ActionEntity {
* @return the action
*/
public Action toDto() {
- //Action destination = new Action();
-
Action destination = JsonUtil.json2Object(this.getData(), Action.class);
destination.setData(this.getData());
destination.setTimestamp(this.getTimestamp());
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java
index 326da718dd..a5025e5de8 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java
@@ -35,7 +35,13 @@ public class OpenEcompComponentEntity {
@Column(name = "name")
private String name;
+ /**
+ * 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 OpenEcompComponentEntity() {
+ // Don't delete! Default constructor is required by DataStax driver
}
public OpenEcompComponentEntity(String id, String name) {