edu.pdx.cs399J.rmi
Class Movie

java.lang.Object
  extended by edu.pdx.cs399J.rmi.Movie
All Implemented Interfaces:
Serializable

public class Movie
extends Object
implements Serializable

This class represents a remote Movie object. It is Serializable because instances of Movie are sent from the server to client. Because it does not implement the Remote interface, the client JVM receives copies of the Movie object. That is, changes to a Movie made on by the client are not reflected in the server.

See Also:
Serialized Form

Method Summary
 boolean equals(Object o)
          Two Movies are equal if they have the same id
 Set<Long> getActors()
          Returns the ids of the actors that are in this movie
 Map<String,Long> getCharacters()
          Returns a map of character names to the actor that played them.
 long getId()
          Returns this Movie's id
 String getTitle()
          Returns the title of this Movie
 int getYear()
          Returns the year in which this movie was released
 void setTitle(String title)
          Sets the title of this Movie
 void setYear(int year)
          Sets the year in which this movie was released
 String toString()
          Returns a brief textual representation of this Movie
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public long getId()
Returns this Movie's id


getTitle

public String getTitle()
Returns the title of this Movie


setTitle

public void setTitle(String title)
Sets the title of this Movie


getYear

public int getYear()
Returns the year in which this movie was released


setYear

public void setYear(int year)
Sets the year in which this movie was released


getCharacters

public Map<String,Long> getCharacters()
Returns a map of character names to the actor that played them.


getActors

public Set<Long> getActors()
Returns the ids of the actors that are in this movie


toString

public String toString()
Returns a brief textual representation of this Movie

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Two Movies are equal if they have the same id

Overrides:
equals in class Object


Copyright © 2000-2009 Portland State University. All Rights Reserved.