Guest User

Untitled

a guest
Dec 12th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. package com.example.demo;
  2.  
  3. import javax.persistence.Column;
  4. import javax.persistence.Entity;
  5. import javax.persistence.GeneratedValue;
  6. import javax.persistence.GenerationType;
  7. import javax.persistence.Id;
  8. import javax.persistence.JoinColumn;
  9. import javax.persistence.ManyToOne;
  10. import javax.persistence.Table;
  11.  
  12. @Entity
  13. @Table(name = "groups")
  14. public class Group {
  15. @Id
  16. @GeneratedValue(strategy = GenerationType.IDENTITY)
  17. private int id;
  18.  
  19. @Column(name = "group_name")
  20. private String groupName;
  21.  
  22. public Group() {}
  23.  
  24. public Group(int id, String groupName) {
  25. this.id = id;
  26. this.groupName = groupName;
  27. }
  28.  
  29. public int getId() {
  30. return id;
  31. }
  32.  
  33. public void setId(int id) {
  34. this.id = id;
  35. }
  36.  
  37. public String getGroupName() {
  38. return groupName;
  39. }
  40.  
  41. public void setGroupName(String groupName) {
  42. this.groupName = groupName;
  43. }
  44.  
  45.  
  46. }
Add Comment
Please, Sign In to add comment