Add lombok support to simple classes 95/89695/1
authoravigaffa <avi.gaffa@amdocs.com>
Tue, 11 Jun 2019 11:29:20 +0000 (14:29 +0300)
committeravigaffa <avi.gaffa@amdocs.com>
Tue, 11 Jun 2019 12:29:44 +0000 (15:29 +0300)
Change-Id: I02d45d887e0bfe5838ad2f492f4220f5bbee5eca
Issue-ID: SDC-2354
Signed-off-by: avigaffa <avi.gaffa@amdocs.com>
openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/pom.xml
openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationEntityDto.java
openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationsStatusDto.java

index 5f6a857..c074399 100644 (file)
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${lombok.version}</version>
+        </dependency>
     </dependencies>
 
 </project>
index a415d9e..a48b16a 100644 (file)
@@ -22,82 +22,29 @@ package org.openecomp.sdc.notification.types;
 
 import java.util.Map;
 import java.util.UUID;
-
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
 public class NotificationEntityDto {
-  private boolean read;
-  private UUID eventId;
-  private String dateTime;
-  private String eventType;
-  private Map<String, Object> eventAttributes;
-
-  public NotificationEntityDto() {
-  }
-  public NotificationEntityDto(boolean read, UUID eventId, String eventType,
-                               Map<String, Object> eventAttributes) {
-    this.read = read;
-    this.eventId = eventId;
-    this.eventType = eventType;
-    this.eventAttributes = eventAttributes;
-  }
-
-  public NotificationEntityDto(boolean read, UUID eventId,String eventType,
-                               Map<String, Object> eventAttributes, String dateTime) {
-    this.read = read;
-    this.eventId = eventId;
-    this.dateTime = dateTime;
-    this.eventType = eventType;
-    this.eventAttributes = eventAttributes;
-  }
-
-  public boolean isRead() {
-    return read;
-  }
-
-  public void setRead(boolean read) {
-    this.read = read;
-  }
-
-  public UUID getEventId() {
-    return eventId;
-  }
-
-  public void setEventId(UUID eventId) {
-    this.eventId = eventId;
-  }
-
-  public String getEventType() {
-    return eventType;
-  }
-
-  public void setEventType(String eventType) {
-    this.eventType = eventType;
-  }
-
-  public Map<String, Object> getEventAttributes() {
-    return eventAttributes;
-  }
-
-  public void setEventAttributes(Map<String, Object> eventAttributes) {
-    this.eventAttributes = eventAttributes;
-  }
-
-  public String getDateTime() {
-    return dateTime;
-  }
-
-  public void setDateTime(String dateTime) {
-    this.dateTime = dateTime;
-  }
-
-  @Override
-  public String toString() {
-    return "NotificationEntityDto {"
-        + ", state='" + (read ? "Read" : "Noread") + '\''
-        + ", dateTime='" + dateTime + '\''
-        + ", eventId='" + eventId + '\''
-        + ", eventType='" + eventType + '\''
-        + ", eventAttributes='" + eventAttributes + '\''
-        + '}';
-  }
 
+    private boolean read;
+    private UUID eventId;
+    private String dateTime;
+    private String eventType;
+    private Map<String, Object> eventAttributes;
+
+    public NotificationEntityDto(boolean read, UUID eventId, String eventType, Map<String, Object> eventAttributes) {
+        this.read = read;
+        this.eventId = eventId;
+        this.eventType = eventType;
+        this.eventAttributes = eventAttributes;
+    }
 }
index fd8d320..039449c 100644 (file)
@@ -3,70 +3,24 @@ package org.openecomp.sdc.notification.types;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
 
 /**
  * @author avrahamg
  * @since June 29, 2017
  */
+@NoArgsConstructor
+@Getter
+@Setter
+@ToString
 public class NotificationsStatusDto {
+
     private List<NotificationEntityDto> notifications;
     private List<UUID> newEntries = new ArrayList<>();
     private UUID lastScanned;
     private UUID endOfPage;
     private long numOfNotSeenNotifications;
-
-    public NotificationsStatusDto() {
-    }
-
-    public List<NotificationEntityDto> getNotifications() {
-        return notifications;
-    }
-
-    public void setNotifications(
-        List<NotificationEntityDto> notifications) {
-        this.notifications = notifications;
-    }
-
-    public List<UUID> getNewEntries() {
-        return newEntries;
-    }
-
-    public void setNewEntries(List<UUID> newEntries) {
-        this.newEntries = newEntries;
-    }
-
-    public UUID getLastScanned() {
-        return lastScanned;
-    }
-
-    public void setLastScanned(UUID lastScanned) {
-        this.lastScanned = lastScanned;
-    }
-
-    public UUID getEndOfPage() {
-        return endOfPage;
-    }
-
-    public void setEndOfPage(UUID endOfPage) {
-        this.endOfPage = endOfPage;
-    }
-
-    public long getNumOfNotSeenNotifications() {
-        return numOfNotSeenNotifications;
-    }
-
-    public void setNumOfNotSeenNotifications(long numOfNotSeenNotifications) {
-        this.numOfNotSeenNotifications = numOfNotSeenNotifications;
-    }
-
-    @Override
-    public String toString() {
-        return "NotificationsStatusDto{" +
-                "notifications=" + notifications +
-                ", newEntries=" + newEntries +
-                ", lastScanned=" + lastScanned +
-                ", endOfPage=" + endOfPage +
-                ", numOfNotSeenNotifications=" + numOfNotSeenNotifications +
-                '}';
-    }
 }