summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common
diff options
context:
space:
mode:
authorManoop Talasila <talasila@research.att.com>2019-07-09 15:29:19 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-09 15:29:19 +0000
commit7452df539af5dc90596307713c15cae7cc9bd6db (patch)
tree1b9c6cb3de8770b3469b889eae2999235bdd7ed3 /ecomp-portal-BE-common
parent67cd727b3eaa24964a441cb60a18b44d3710a441 (diff)
parent78d887081e8a637ae116948029f37c0760392b7e (diff)
Merge "PortalAdmin class DB constraints"
Diffstat (limited to 'ecomp-portal-BE-common')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdmin.java46
1 files changed, 14 insertions, 32 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdmin.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdmin.java
index d923df8c..62e768db 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdmin.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdmin.java
@@ -45,59 +45,41 @@ import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.Size;
+import lombok.Getter;
+import lombok.Setter;
+import org.hibernate.validator.constraints.SafeHtml;
/**
* This is to handle portal admins
*/
@Entity
@Table(name = "fn_user")
+@Getter
+@Setter
public class PortalAdmin implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "user_id")
+ @Digits(integer = 11, fraction = 0)
public Long userId;
@Column(name = "login_id")
+ @Size(max = 25)
+ @SafeHtml
public String loginId;
@Column(name = "first_name")
+ @Size(max = 50)
+ @SafeHtml
public String firstName;
@Column(name = "last_name")
+ @Size(max = 50)
+ @SafeHtml
public String lastName;
- public Long getUserId() {
- return userId;
- }
-
- public void setUserId(Long userId) {
- this.userId = userId;
- }
-
- public String getLoginId() {
- return loginId;
- }
-
- public void setLoginId(String loginId) {
- this.loginId = loginId;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
}