Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- public class Recipe {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private int recipe_id;
- private String name;
- @JoinColumn(name="user_id" , table="User")
- private int user_id;
- private LocalDate dateUploaded;
- private String description;
- public int getId() {
- return recipe_id;
- }
- public void setId(int recipe_id) {
- this.recipe_id = recipe_id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public int getUser() {
- return user_id;
- }
- public void setUser(int user_id) {
- this.user_id = user_id;
- }
- public LocalDate getDateUploaded() {
- return dateUploaded;
- }
- public void setDateUploaded(LocalDate dateUploaded) {
- this.dateUploaded = dateUploaded;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- @Entity
- public class User {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private int user_id;
- private String firstName;
- private String lastName;
- private String userName;
- private String password;
- public User(int user_id, String firstName, String lastName, String userName, String password, int[] favoriteRecipes, int[] myRecipes) {
- this.user_id = user_id;
- this.firstName = firstName;
- this.lastName = lastName;
- this.userName = userName;
- this.password = password;
- }
- public int getId() {
- return user_id;
- }
- public void setId(int user_id) {
- this.user_id = user_id;
- }
- public String getFirstName() {
- return firstName;
- }
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
- public String getLastName() {
- return lastName;
- }
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement