Advertisement
Guest User

Untitled

a guest
May 26th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. package models;
  2.  
  3.  
  4. import java.util.*;
  5. import javax.persistence.*;
  6.  
  7. @Entity
  8. @NamedQuery(name="Restaurant.findAll", query="SELECT c FROM restaurants c")
  9. @Table(name = "restaurants")
  10. public class Restaurant{
  11. @Id
  12. @GeneratedValue
  13. @Column(name="id")
  14. public Integer id;
  15.  
  16. @Column(name = "restaurantName")
  17. private String restaurantName;
  18. @Column(name = "description")
  19. private String description;
  20. @Column(name = "latitude")
  21. private double latitude;
  22. @Column(name = "longitude")
  23. private double longitude;
  24. @Column(name = "mark")
  25. private int mark;
  26. @Column(name = "votes")
  27. private int votes;
  28. @Column(name = "priceRange")
  29. private int priceRange;
  30. @Column(name = "imageFileName")
  31. private String imageFileName;
  32. @Column(name = "coverFileName")
  33. private String coverFileName;
  34. @Column(name = "location")
  35. private int location;
  36. @Column(name = "foodType")
  37. private String foodType;
  38. @Column(name = "booked")
  39. private int booked;
  40.  
  41. public Restaurant() {
  42. }
  43.  
  44. public Restaurant(Integer id, String restaurantName, String description, double latitude, double longitude, int mark, int votes, int priceRange, String imageFileName, String coverFileName, int location, String foodType, int booked) {
  45. this.id = id;
  46. this.restaurantName = restaurantName;
  47. this.description = description;
  48. this.latitude = latitude;
  49. this.longitude = longitude;
  50. this.mark = mark;
  51. this.votes = votes;
  52. this.priceRange = priceRange;
  53. this.imageFileName = imageFileName;
  54. this.coverFileName = coverFileName;
  55. this.location = location;
  56. this.foodType = foodType;
  57. this.booked = booked;
  58. }
  59.  
  60. public Integer getId() {
  61. return id;
  62. }
  63.  
  64. public String getRestaurantName() {
  65. return restaurantName;
  66. }
  67.  
  68. public String getDescription() {
  69. return description;
  70. }
  71.  
  72. public double getLatitude() {
  73. return latitude;
  74. }
  75.  
  76. public double getLongitude() {
  77. return longitude;
  78. }
  79.  
  80. public int getMark() {
  81. return mark;
  82. }
  83.  
  84. public int getVotes() {
  85. return votes;
  86. }
  87.  
  88. public int getPriceRange() {
  89. return priceRange;
  90. }
  91.  
  92. public String getImageFileName() {
  93. return imageFileName;
  94. }
  95.  
  96. public String getCoverFileName() {
  97. return coverFileName;
  98. }
  99.  
  100. public int getLocation() {
  101. return location;
  102. }
  103.  
  104. public String getFoodType() {
  105. return foodType;
  106. }
  107.  
  108. public int getBooked() {
  109. return booked;
  110. }
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement