summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java77
1 files changed, 14 insertions, 63 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java
index bdd2ad4fad..97aba63f1c 100644
--- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-api/src/main/java/org/openecomp/sdc/notification/dao/types/LastSeenNotificationEntity.java
@@ -20,74 +20,25 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
-import java.util.Objects;
import java.util.UUID;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.ToString;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
@Table(keyspace = "dox", name = "last_notification")
public class LastSeenNotificationEntity {
- public static final String ENTITY_TYPE = "Event Notification";
-
- @PartitionKey
- @Column(name = "owner_id")
- private String ownerId;
-
- @Column(name = "event_id")
- private UUID lastEventId;
-
- /**
- * 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 LastSeenNotificationEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
- /**
- * Instantiates a new Notification entity.
- *
- * @param ownerId the owner id
- * @param lastEventId the last event id
- */
- public LastSeenNotificationEntity(String ownerId, UUID lastEventId) {
- this.ownerId = ownerId;
- this.lastEventId = lastEventId;
- }
-
- public String getOwnerId() {
- return ownerId;
- }
-
- public void setOwnerId(String ownerId) {
- this.ownerId = ownerId;
- }
-
- public UUID getLastEventId() {
- return lastEventId;
- }
-
- public void setLastEventId(UUID lastEventId) {
- this.lastEventId = lastEventId;
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- LastSeenNotificationEntity that = (LastSeenNotificationEntity) o;
- return Objects.equals(ownerId, that.ownerId) &&
- Objects.equals(lastEventId, that.lastEventId);
- }
+ public static final String ENTITY_TYPE = "Event Notification";
- @Override
- public int hashCode() {
- return Objects.hash(ownerId, lastEventId);
- }
+ @PartitionKey
+ @Column(name = "owner_id")
+ private String ownerId;
- @Override
- public String toString() {
- return "LastSeenNotificationEntity {"
- + "ownerId='" + ownerId + '\''
- + '}';
- }
+ @Column(name = "event_id")
+ private UUID lastEventId;
}