Last change
on this file since fc7ec52 was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 22 months ago |
all files
|
-
Property mode
set to
100644
|
File size:
889 bytes
|
Rev | Line | |
---|
[fc7ec52] | 1 | package com.example.demo.model.IS_;
|
---|
| 2 |
|
---|
| 3 | import com.example.demo.model.Genre;
|
---|
| 4 | import com.example.demo.model.Movie;
|
---|
| 5 |
|
---|
| 6 | import javax.persistence.Embeddable;
|
---|
| 7 | import javax.persistence.JoinColumn;
|
---|
| 8 | import javax.persistence.ManyToOne;
|
---|
| 9 | import java.io.Serializable;
|
---|
| 10 |
|
---|
| 11 | @Embeddable
|
---|
| 12 | public class MovieGenreKey implements Serializable {
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 |
|
---|
| 16 | @ManyToOne
|
---|
| 17 | @JoinColumn(name="genre_id")
|
---|
| 18 | public Genre genre;
|
---|
| 19 |
|
---|
| 20 | @ManyToOne
|
---|
| 21 | @JoinColumn(name="movie_id")
|
---|
| 22 | public Movie movie;
|
---|
| 23 |
|
---|
| 24 | public MovieGenreKey( Genre genre,Movie movie) {
|
---|
| 25 |
|
---|
| 26 | this.genre = genre;
|
---|
| 27 | this.movie = movie;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | public MovieGenreKey() {
|
---|
| 31 |
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | public Movie getMovie() {
|
---|
| 35 | return movie;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | public void setMovie(Movie movie) {
|
---|
| 39 | this.movie = movie;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | public Genre getGenre() {
|
---|
| 43 | return genre;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | public void setGenre(Genre genre) {
|
---|
| 47 | this.genre = genre;
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.