package edu.pdx.cs410J.rmi;

import java.rmi.*;
import java.util.*;

/**
 * This remote interface allows a client to interact with a database
 * of {@link Movie} objects.
 */
public interface MovieDatabase extends Remote {

  /**
   * Creates a new <code>Movie</code> object on the server.  It
   * returns the id of the movie that was created.
   *
   * @param title
   *        The title of the movie
   * @param year
   *        The year in which the movie was released
   */
  public long createMovie(String title, int year) 
    throws RemoteException; 
  
  /**
   * Returns the <code>Movie</code> with the given id.
   */
  public Movie getMovie(long id) throws RemoteException;

  /**
   * Makes note of a character in a given movie played by a given
   * actor.
   *
   * @throws IllegalArgumentException
   *         The character is already played by someone else
   */
  public void noteCharacter(long movieId, String character, long actorId) 
    throws RemoteException;

  /**
   * Returns the movie in which a given actor acted.  The movies are
   * sorted by release date.
   */
  public SortedSet<Movie> getFilmography(long actorId) 
    throws RemoteException;

  /**
   * Performs a query on the database.  The movies that match the
   * query are sorted using the given comparator.
   */
  public SortedSet<Movie> executeQuery(Query query, Comparator<Movie> sorter) 
    throws RemoteException;

  /**
   * Unregisters this <code>MovieDatabase</code> object with the RMI
   * registry.  Once it is unregistered, this object will no longer be
   * accessible.
   */
  public void shutdown() throws RemoteException;

  /**
   * Returns all of the movies in the database
   */
  public Collection<Movie> getMovies() throws RemoteException;
}

@@ -474,23 +474,16 @@
    */%0A  
-public 
 long cre
@@ -514,17 +514,16 @@
 nt year)
- 
 %0A    thr
@@ -616,23 +616,16 @@
    */%0A  
-public 
 Movie ge
@@ -857,31 +857,24 @@
 lse%0A   */%0A  
-public 
 void noteCha
@@ -917,33 +917,32 @@
 r, long actorId)
- 
 %0A    throws Remo
@@ -1059,39 +1059,32 @@
 e date.%0A   */%0A  
-public 
 SortedSet%3CMovie%3E
@@ -1112,17 +1112,16 @@
 actorId)
- 
 %0A    thr
@@ -1272,23 +1272,16 @@
    */%0A  
-public 
 SortedSe
@@ -1340,17 +1340,16 @@
  sorter)
- 
 %0A    thr
@@ -1541,23 +1541,16 @@
    */%0A  
-public 
 void shu
@@ -1645,17 +1645,10 @@
  */%0A
+
   
-public 
 Coll

Clean up some warnings in preparation for additional changes.