1 /******************************************************************************
2 * VirginsDao.java - Dao interface for the Virgins
3 *
4 * PicMan - The BuckoSoft Picture Manager in Java
5 * Copyright(c) 2005 - Dick Balaska
6 *
7 */
8 package com.buckosoft.PicMan.db;
9
10 import java.util.List;
11
12 import org.springframework.dao.DataAccessException;
13
14 import com.buckosoft.PicMan.domain.Virgin;
15
16 /** Dao interface for the {@link com.buckosoft.PicMan.domain.Virgin}s.
17 * @author Dick Balaska
18 * @since 2005/07/31
19 * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/db/VirginsDao.java">VirginsDao.java</a>
20 */
21 public interface VirginsDao {
22
23 /** Add this Pic name as a <code>Virgin</code> in the database.
24 * @param picName The name of the Pic to add.
25 * @throws DataAccessException not today.
26 */
27 void addVirgin(String picName) throws DataAccessException;
28
29 /** Is this picName a <code>Virgin</code>?
30 * @param picName The name of the <code>Pic</code> to query
31 * @return true if this picName is in the <code>Virgin</code>s table.
32 */
33 boolean isVirgin(String picName);
34
35 /** Delete this Pic name from the <code>Virgin</code>s table. This Pic is no longer a <code>Virgin</code>.
36 * @param picName The name of the <code>Pic</code> to remove.
37 * @throws DataAccessException bleh
38 */
39 void deleteVirgin(String picName) throws DataAccessException;
40
41 /** Return the number of <code>Virgin</code>s in the database.
42 * @return The count.
43 */
44 int getVirginCount();
45
46 /** Get a List of all of the <code>Virgin</code>s in the database.
47 * @return The List
48 * @throws DataAccessException non!
49 */
50 List<Virgin> getVirgins() throws DataAccessException;
51
52 /** Get a List of all of the <code>Virgin</code>s in the database up to max number. <br>
53 * This is useful for the "process up to 5 virgins" page.
54 * @param max The Maximum number of <code>Virgin</code>s to put in the List
55 * @return The List.
56 * @throws DataAccessException uh-uh
57 */
58 List<Virgin> getVirgins(int max) throws DataAccessException;
59 }