Default constructors in action-api module 57/27157/2
authorvempo <vitaliy.emporopulo@amdocs.com>
Fri, 29 Dec 2017 14:02:49 +0000 (16:02 +0200)
committerAvi Gaffa <avi.gaffa@amdocs.com>
Sun, 31 Dec 2017 07:59:32 +0000 (07:59 +0000)
Change-Id: I0ac01140d94cd55e6e15eabe00361a14866aa43f
Issue-ID: SDC-343
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java

index 7e56a04..bc34b8d 100644 (file)
@@ -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) {
index 2c2bfe3..9d0f3d8 100644 (file)
@@ -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());
index 326da71..a5025e5 100644 (file)
@@ -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) {