KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Varia


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2001-2005 JasperSoft Corporation http://www.jaspersoft.com
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * JasperSoft Corporation
24  * 303 Second Street, Suite 450 North
25  * San Francisco, CA 94107
26  * http://www.jaspersoft.com
27  */

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 /**
38  * @author Marcel Overdijk (marceloverdijk@hotmail.com)
39  * @version $Id: Varia.java 1251 2006-05-08 14:15:01 +0300 (Mon, 08 May 2006) lucianc $
40  */

41 @Entity
42 @Table(name="movie_varia")
43 public class Varia {
44
45     private int id;
46     private Movie movie;
47     private String JavaDoc type;
48     private String JavaDoc description;
49     private int importance;
50     
51     public Varia() {
52     }
53     
54     public Varia(int id, Movie movie, String JavaDoc type, String JavaDoc 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 JavaDoc getType() {
83         return type;
84     }
85
86     public void setType(String JavaDoc type) {
87         this.type = type;
88     }
89     
90     public String JavaDoc getDescription() {
91         return description;
92     }
93
94     public void setDescription(String JavaDoc 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