EpRoleNotificationItem class DB constraints 59/90059/1
authorDominik Mizyn <d.mizyn@samsung.com>
Tue, 18 Jun 2019 07:24:16 +0000 (09:24 +0200)
committerDominik Mizyn <d.mizyn@samsung.com>
Tue, 18 Jun 2019 07:24:31 +0000 (09:24 +0200)
Java Bean Validation SR 380 annotations added to classes

Issue-ID: PORTAL-638
Change-Id: I035ad9703f25cc87567700f66c3649ca53aee2df
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/EpRoleNotificationItem.java

index bda6540..b258ab0 100644 (file)
@@ -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;
-       }
-
-
 }