From 36c7892927de3d26606454db514078cb69be5972 Mon Sep 17 00:00:00 2001 From: avigaffa Date: Tue, 11 Jun 2019 14:29:20 +0300 Subject: Add lombok support to simple classes Change-Id: I02d45d887e0bfe5838ad2f492f4220f5bbee5eca Issue-ID: SDC-2354 Signed-off-by: avigaffa --- .../notification/types/NotificationEntityDto.java | 99 +++++----------------- .../notification/types/NotificationsStatusDto.java | 64 ++------------ 2 files changed, 32 insertions(+), 131 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main') diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationEntityDto.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationEntityDto.java index a415d9e081..a48b16add6 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationEntityDto.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationEntityDto.java @@ -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 eventAttributes; - - public NotificationEntityDto() { - } - public NotificationEntityDto(boolean read, UUID eventId, String eventType, - Map eventAttributes) { - this.read = read; - this.eventId = eventId; - this.eventType = eventType; - this.eventAttributes = eventAttributes; - } - - public NotificationEntityDto(boolean read, UUID eventId,String eventType, - Map 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 getEventAttributes() { - return eventAttributes; - } - - public void setEventAttributes(Map 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 eventAttributes; + + public NotificationEntityDto(boolean read, UUID eventId, String eventType, Map eventAttributes) { + this.read = read; + this.eventId = eventId; + this.eventType = eventType; + this.eventAttributes = eventAttributes; + } } diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationsStatusDto.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationsStatusDto.java index fd8d32090e..039449c5d5 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationsStatusDto.java +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/src/main/java/org/openecomp/sdc/notification/types/NotificationsStatusDto.java @@ -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 notifications; private List newEntries = new ArrayList<>(); private UUID lastScanned; private UUID endOfPage; private long numOfNotSeenNotifications; - - public NotificationsStatusDto() { - } - - public List getNotifications() { - return notifications; - } - - public void setNotifications( - List notifications) { - this.notifications = notifications; - } - - public List getNewEntries() { - return newEntries; - } - - public void setNewEntries(List 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 + - '}'; - } } -- cgit 1.2.3-korg