Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package entities;
  7.  
  8. import java.io.Serializable;
  9. import javax.persistence.Entity;
  10. import javax.persistence.GeneratedValue;
  11. import javax.persistence.GenerationType;
  12. import javax.persistence.Id;
  13.  
  14. /**
  15. *
  16. * @author Nuno
  17. */
  18. @Entity
  19. public class Student implements Serializable {
  20.  
  21. @Id
  22. private String username;
  23. private String password;
  24. private String name;
  25. private String email;
  26.  
  27. public Student() {
  28. }
  29.  
  30.  
  31. public Student(String username, String password, String name, String email) {
  32. this.username = username;
  33. this.password = password;
  34. this.name = name;
  35. this.email = email;
  36. }
  37.  
  38.  
  39.  
  40. public void setName(String name) {
  41. this.name = name;
  42. }
  43.  
  44. public String getName() {
  45. return name;
  46. }
  47.  
  48. public void setEmail(String email) {
  49. this.email = email;
  50. }
  51.  
  52. public String getEmail() {
  53. return email;
  54. }
  55.  
  56.  
  57.  
  58. public String getPassword() {
  59. return password;
  60. }
  61.  
  62. public void setPassword(String password) {
  63. this.password = password;
  64. }
  65.  
  66. public String getUsername() {
  67. return username;
  68. }
  69.  
  70. public void setUsername(String username) {
  71. this.username = username;
  72. }
  73.  
  74. @Override
  75. public String toString() {
  76. return "Student{" + "username=" + username + ", password=" + password + '}';
  77. }
  78.  
  79. @Override
  80. public int hashCode() {
  81. return super.hashCode(); //To change body of generated methods, choose Tools | Templates.
  82. }
  83.  
  84.  
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement