From e8bffd119fd2dcd3b9389087e51772d9a38f912e Mon Sep 17 00:00:00 2001 From: Dominik Mizyn Date: Tue, 18 Jun 2019 09:24:16 +0200 Subject: [PATCH] EpRoleNotificationItem class DB constraints Java Bean Validation SR 380 annotations added to classes Issue-ID: PORTAL-638 Change-Id: I035ad9703f25cc87567700f66c3649ca53aee2df Signed-off-by: Dominik Mizyn --- .../portal/transport/EpRoleNotificationItem.java | 53 +++++----------------- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/EpRoleNotificationItem.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/EpRoleNotificationItem.java index bda65401..b258ab0d 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/EpRoleNotificationItem.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/EpRoleNotificationItem.java @@ -2,7 +2,7 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed @@ -44,65 +44,36 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; +import javax.validation.constraints.Digits; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import org.onap.portalsdk.core.domain.support.DomainVo; @Entity @Table(name="ep_role_notification") +@NoArgsConstructor +@Getter +@Setter public class EpRoleNotificationItem extends DomainVo { - public EpRoleNotificationItem(){}; - private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name = "ID") + @Digits(integer = 11, fraction = 0) public Long id; @Column(name = "notification_ID") + @Digits(integer = 11, fraction = 0) public Long notificationId; @Column(name = "role_ID") + @Digits(integer = 11, fraction = 0) public Integer roleId; @Column(name = "recv_user_id") + @Digits(integer = 11, fraction = 0) public Integer RecvUserId; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getNotificationId() { - return notificationId; - } - - public void setNotificationId(Long notificationId) { - this.notificationId = notificationId; - } - - public Integer getRoleId() { - return roleId; - } - - public void setRoleId(Integer roleId) { - this.roleId = roleId; - } - - public static long getSerialversionuid() { - return serialVersionUID; - } - - public Integer getRecvUserId() { - return RecvUserId; - } - - public void setRecvUserId(Integer recvUserId) { - RecvUserId = recvUserId; - } - - } -- 2.16.6