test
Форк от lirfrnk/test
1package com.bittercode.model;
2
3import java.io.Serializable;
4import java.util.List;
5
6public class User implements Serializable {
7
8private String emailId;
9private String password;
10private String firstName;
11private String lastName;
12private Long phone;
13private String address;
14private List<UserRole> roles;
15
16public String getEmailId() {
17return emailId;
18}
19
20public void setEmailId(String emailId) {
21this.emailId = emailId;
22}
23
24public String getPassword() {
25return password;
26}
27
28public void setPassword(String password) {
29this.password = password;
30}
31
32public String getFirstName() {
33return firstName;
34}
35
36public void setFirstName(String firstName) {
37this.firstName = firstName;
38}
39
40public String getLastName() {
41return lastName;
42}
43
44public void setLastName(String lastName) {
45this.lastName = lastName;
46}
47
48public Long getPhone() {
49return phone;
50}
51
52public void setPhone(Long phone) {
53this.phone = phone;
54}
55
56public String getAddress() {
57return address;
58}
59
60public void setAddress(String address) {
61this.address = address;
62}
63
64public List<UserRole> getRoles() {
65return roles;
66}
67
68public void setRoles(List<UserRole> roles) {
69this.roles = roles;
70}
71
72// public static User retrieveFromHttpServletRequest(HttpServletRequest req) {
73// User user = new User();
74// String pWord = req.getParameter(UsersDBConstants.COLUMN_PASSWORD);
75// String fName = req.getParameter(UsersDBConstants.COLUMN_FIRSTNAME);
76// String lName = req.getParameter(UsersDBConstants.COLUMN_LASTNAME);
77// String addr = req.getParameter(UsersDBConstants.COLUMN_ADDRESS);
78// String phNo = req.getParameter(UsersDBConstants.COLUMN_PHONE);
79// String mailId = req.getParameter(UsersDBConstants.COLUMN_MAILID);
80// user.setEmailId(mailId);
81// user.setFirstName(fName);
82// user.setLastName(lName);
83// user.setPassword(pWord);
84// user.setPhone(Long.parseLong(phNo));
85// user.setAddress(addr);
86// return user;
87// }
88}
89