Newer
Older
JerseyDemo / src / main / java / com / example / springtest / demo / entities / User.java
  1. package com.example.springtest.demo.entities;
  2.  
  3. import javax.persistence.*;
  4.  
  5. @Entity // This tells Hibernate to make a table out of this class
  6. @Table(name="USERS")
  7. public class User {
  8. @Id
  9. // @GeneratedValue(strategy= GenerationType.AUTO)
  10. public String uId;
  11. public String name;
  12. public String password;
  13. public String uri;
  14.  
  15. public User() {
  16. }
  17.  
  18. public User(String uId, String name, String password) {
  19. this.uId = uId;
  20. this.name = name;
  21. this.password = password;
  22. }
  23.  
  24. // public User(String uId, String name, String password, String uri) {
  25. // this.uId = uId;
  26. // this.name = name;
  27. // this.password = password;
  28. // this.uri = uri;
  29. // }
  30.  
  31. public String getuId() {
  32. return uId;
  33. }
  34.  
  35. public String getName() {
  36. return name;
  37. }
  38.  
  39. public String getPassword() {
  40. return password;
  41. }
  42.  
  43. public void setuId(String uId) {
  44. this.uId = uId;
  45. }
  46.  
  47. public void setName(String name) {
  48. this.name = name;
  49. }
  50.  
  51. public void setPassword(String password) {
  52. this.password = password;
  53. }
  54.  
  55. public void setUri(String uri) {
  56. this.uri = uri;
  57. }
  58. }