01: /**
02: * Copyright (C) 2006 NetMind Consulting Bt.
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 3 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */package hu.netmind.persistence;
18:
19: /**
20: * A movie script is a form of screenplay, at least for test purposes.
21: * @author Brautigam Robert
22: * @version Revision: $Revision$
23: */
24: public class MovieScript extends ScreenPlay {
25: private int movieType;
26:
27: public MovieScript() {
28: super ();
29: }
30:
31: public MovieScript(String title, int numberOfActors, int movieType) {
32: super (title, numberOfActors);
33: setMovieType(movieType);
34: }
35:
36: public int getMovieType() {
37: return movieType;
38: }
39:
40: public void setMovieType(int movieType) {
41: this .movieType = movieType;
42: }
43:
44: public int hashCode() {
45: return movieType ^ super .hashCode();
46: }
47:
48: public boolean equals(Object rhs) {
49: if ((rhs == null) || (!(rhs instanceof MovieScript)))
50: return false;
51: return movieType == (((MovieScript) rhs).movieType)
52: && super.equals(rhs);
53: }
54:
55: }
|