1 // $Header: /cvsroot/daoexamples/daoexamples/src/java/daoexamples/movie/MovieDAO.java,v 1.3 2003/08/13 04:04:23 sullis Exp $
2
3 /*
4 *
5 *
6 *
7 *
8 */
9 package daoexamples.movie;
10
11 import daoexamples.movie.MovieNotFoundException;
12
13 /***
14 *
15 * Movie Data Access Object (DAO)
16 *
17 * <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html">
18 * DAO pattern</a>
19 *
20 * @author Sean C. Sullivan
21 *
22 * @see MovieDAOFactory
23 *
24 */
25 public interface MovieDAO
26 {
27 /***
28 *
29 * @param id must be non-null
30 * @return a non-null object
31 *
32 * @throws MovieNotFoundException
33 *
34 * @see #findMoviesByYear(String)
35 *
36 */
37 public Movie findMovieById(String id)
38 throws MovieNotFoundException;
39
40 /***
41 *
42 * @param year must be non-null
43 *
44 * @return a Collection that contains zero or more {@link Movie} objects
45 *
46 * @see #findMovieById(String)
47 *
48 */
49 public java.util.Collection findMoviesByYear(String year);
50
51 /***
52 *
53 * @param id must be non-null
54 *
55 * @throws MovieNotFoundException
56 *
57 * @see #createMovie(String, String, String)
58 *
59 */
60 public void deleteMovie(String id)
61 throws MovieNotFoundException;
62
63 /***
64 *
65 *
66 * @param rating must be non-null
67 * @param year must be non-null
68 * @param title must be non-null
69 *
70 * @return a non-null {@link Movie} object
71 *
72 * @see #deleteMovie(String)
73 *
74 */
75 public Movie createMovie(String rating, String year, String title);
76
77 /***
78 *
79 *
80 * @param id must be non-null
81 * @param rating must be non-null
82 * @param year must be non-null
83 * @param title must be non-null
84 *
85 *
86 */
87 public void updateMovie(String id, String rating, String year, String title)
88 throws MovieNotFoundException;
89
90 /***
91 *
92 * @see #isClosed()
93 *
94 */
95 public void close();
96
97 /***
98 *
99 *
100 * @see #close()
101 *
102 */
103 public boolean isClosed();
104 }
This page was automatically generated by Maven