Coverage Report - com.buckosoft.PicMan.db.RootsDao
 
Classes in this File Line Coverage Branch Coverage Complexity
RootsDao
N/A
N/A
1
 
 1  
 /******************************************************************************
 2  
  * RootsDao.java - Dao interface for the Roots
 3  
  * 
 4  
  * PicMan - The BuckoSoft Picture Manager in Java
 5  
  * Copyright(c) 2006 - 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.Root;
 14  
 
 15  
 /** Dao interface for the {@link com.buckosoft.PicMan.domain.Root}s. <br>
 16  
  * Note: The <code>Root</code>s are cached and any changes made external to the program will not be properly picked up.
 17  
  * @author Dick Balaska
 18  
  * @since 2006/09/30
 19  
  * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/db/RootsDao.java">RootsDao.java</a>
 20  
  */
 21  
 public interface RootsDao {
 22  
 
 23  
         /** Fetch the number of Roots in the database.
 24  
          * @return The count.
 25  
          * @throws DataAccessException It broke.
 26  
          */
 27  
         public int        getRootCount() throws DataAccessException;
 28  
         
 29  
         /** Fetch a List of all <code>Root</code>s in the database.
 30  
          * @return The List of <code>Root</code>s.
 31  
          * @throws DataAccessException broken.
 32  
          */
 33  
         public List<Root> getRoots() throws DataAccessException;
 34  
 
 35  
         /** Fetch the <code>Root</code> that matches this Root ID.
 36  
          * @param rid The Root ID to query.
 37  
          * @return The Root that matches this Root ID or null if not found.
 38  
          * @throws DataAccessException Didn't happen.
 39  
          */
 40  
         public Root        getRoot(int rid) throws DataAccessException;
 41  
         
 42  
         /** Get the <code>Root</code> that matches this name.
 43  
          * @param rootName The name of the <code>Root</code> to query.
 44  
          * @return The Root that matches this name or null if not found.
 45  
          * @throws DataAccessException needs fixin'.
 46  
          */
 47  
         public Root        getRoot(String rootName) throws DataAccessException;
 48  
         
 49  
         /** Set the <code>Root</code>s in the database to be this list. <br>
 50  
          * Why you would want to do this, is beyond me.  But, here it is...
 51  
          * @param roots The <code>Root</code>s to store.
 52  
          * @throws DataAccessException Help me Lawdy!
 53  
          */
 54  
         public void        setRoots(List<Root> roots) throws DataAccessException;
 55  
         
 56  
         /** Add this <code>Root</code> to the database.
 57  
          * @param root The <code>Root</code> to store.
 58  
          * @throws DataAccessException not ... gonna ... make ... it.
 59  
          */
 60  
         public void        addRoot(Root root) throws DataAccessException;
 61  
         
 62  
         /** Delete this <code>Root</code> from the database.
 63  
          * @param root The <code>Root</code> to delete.
 64  
          * @throws DataAccessException died.
 65  
          */
 66  
         public void        deleteRoot(Root root) throws DataAccessException;
 67  
 
 68  
         /** Get a List of <code>Root</code>s that the user has NOT marked as inactive.
 69  
          * @return The List of <code>Root</code>s.
 70  
          * @throws DataAccessException no joy.
 71  
          */
 72  
         public List<Root>        getActiveRoots() throws DataAccessException;
 73  
         
 74  
         /** Get a List of <code>Root</code>s that the user has marked as inactive.
 75  
          * @return The List of <code>Root</code>s.
 76  
          * @throws DataAccessException Sorry.
 77  
          */
 78  
         public List<Root>        getInactiveRoots() throws DataAccessException;
 79  
         
 80  
         /** Update an existing root in the database.
 81  
          * @param root The root to store
 82  
          * @throws DataAccessException
 83  
          */
 84  
         public void storeRoot(Root root) throws DataAccessException;
 85  
 }