1 28 import javax.persistence.Column; 29 import javax.persistence.Entity; 30 import javax.persistence.Id; 31 import javax.persistence.JoinColumn; 32 import javax.persistence.ManyToOne; 33 import javax.persistence.Table; 34 35 36 37 41 @Entity 42 @Table(name="movie_varia") 43 public class Varia { 44 45 private int id; 46 private Movie movie; 47 private String type; 48 private String description; 49 private int importance; 50 51 public Varia() { 52 } 53 54 public Varia(int id, Movie movie, String type, String description, int importance) { 55 this.id = id; 56 this.movie = movie; 57 this.type = type; 58 this.description = description; 59 this.importance = importance; 60 } 61 62 @Id 63 public int getId() { 64 return id; 65 } 66 67 public void setId(int id) { 68 this.id = id; 69 } 70 71 @JoinColumn(name="movie") 72 @ManyToOne 73 public Movie getMovie() { 74 return movie; 75 } 76 77 public void setMovie(Movie movie) { 78 this.movie = movie; 79 } 80 81 @Column(name="varia_type") 82 public String getType() { 83 return type; 84 } 85 86 public void setType(String type) { 87 this.type = type; 88 } 89 90 public String getDescription() { 91 return description; 92 } 93 94 public void setDescription(String description) { 95 this.description = description; 96 } 97 98 public int getImportance() { 99 return importance; 100 } 101 102 public void setImportance(int importance) { 103 this.importance = importance; 104 } 105 } 106 | Popular Tags |