From: avigaffa Date: Tue, 11 Jun 2019 11:29:20 +0000 (+0300) Subject: Add lombok support to simple classes X-Git-Tag: 1.6.1~298 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F89695%2F1;p=sdc.git Add lombok support to simple classes Change-Id: I02d45d887e0bfe5838ad2f492f4220f5bbee5eca Issue-ID: SDC-2354 Signed-off-by: avigaffa --- diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/pom.xml b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/pom.xml index 5f6a857ec5..c0743998a3 100644 --- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-worker/pom.xml @@ -70,6 +70,11 @@ junit test + + org.projectlombok + lombok + ${lombok.version} + 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 + - '}'; - } }