View Javadoc
1   /******************************************************************************
2    * SetsDao.java - Dao interface for the Sets
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  import org.springframework.dao.DataAccessException;
12  
13  import com.buckosoft.PicMan.domain.Set;
14  
15  /** Dao interface for the {@link com.buckosoft.PicMan.domain.Set}s.
16   * @author Dick Balaska
17   * @since 2005/07/30
18   * @version $Revision: 1.1 $ <br> $Date: 2013/12/26 01:25:43 $
19   * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/db/SetsDao.java">SetsDao.java</a>
20   */
21  public interface SetsDao {
22  
23  	/** Get the number of <code>Set</code>s in the database.
24  	 * @return The number of Sets
25  	 * @throws DataAccessException
26  	 */
27  	public int	getSetCount() throws DataAccessException;
28  	
29  	/** Get a List of all of the <code>Set</code>s in the database.
30  	 * @return The List of all of the <code>Set</code>s.
31  	 * @throws DataAccessException broke.
32  	 */
33  	public List<Set> getSets() throws DataAccessException;
34  	
35  	/** Get a cloned List of all of the {@link com.buckosoft.PicMan.domain.Set}s in the database.
36  	 * This is useful for when you want to prune the list without altering the sets cache.
37  	 * @return The List of {@link com.buckosoft.PicMan.domain.Set}s
38  	 */
39  	List<Set>		getSetsClone();
40  
41  	/** Fetch the <code>Set</code> who's Set ID matches this sid.
42  	 * @param sid The Set ID to query.
43  	 * @return The Set that matches this sid, or null if not found.
44  	 * @throws DataAccessException
45  	 */
46  	public Set	getSet(int sid) throws DataAccessException;
47  	
48  	/** Fetch the <code>Set</code> who's name matches this setName.
49  	 * @param setName The name of the <code>Set</code> to query for.
50  	 * @return The <code>Set</code> that matches this name, or null if not found.
51  	 * @throws DataAccessException boo boo.
52  	 */
53  	public Set	getSet(String setName) throws DataAccessException;
54  	
55  	/** Set the <code>Set</code>s in the database to be this List.
56  	 * Why you would want to do this, is beyond me.  But, here it is...
57  	 * @param sets The <code>Set</code>s to set.
58  	 * @throws DataAccessException didn't happen.
59  	 */
60  	public void	setSets(List<Set> sets) throws DataAccessException;
61  	
62  	/** Add this <code>Set</code> to the database.
63  	 * @param set The <code>Set</code> to add.
64  	 * @throws DataAccessException not today.
65  	 */
66  	public void	addSet(Set set) throws DataAccessException;
67  	
68  	/** Delete this <code>Set</code> from the database.
69  	 * @param set The <code>Set</code> to delete.
70  	 * @throws DataAccessException nyet.
71  	 */
72  	public void	deleteSet(Set set) throws DataAccessException;
73  
74  	/** Get a List of <code>Set</code>s that the user has NOT marked as inactive.
75  	 * @return The List of Active <code>Set</code>s.
76  	 * @throws DataAccessException nein.
77  	 */
78  	public List<Set>	getActiveSets() throws DataAccessException;
79  	
80  	/** Get a List of <code>Set</code>s that the user has marked as inactive.
81  	 * @return The List of Inactive <code>Set</code>s.
82  	 * @throws DataAccessException nein.
83  	 */
84  	public List<Set>	getInactiveSets() throws DataAccessException;
85  	
86  	/** Update an existing set in the database
87  	 * @param set The set to store
88  	 * @throws DataAccessException
89  	 */
90  	public void storeSet(Set set) throws DataAccessException;
91  }