| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| FiltersDao |
|
| 1.0;1 |
| 1 | /****************************************************************************** | |
| 2 | * FiltersDao.java - Dao interface for the Filters | |
| 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 com.buckosoft.PicMan.domain.Filter; | |
| 13 | import com.buckosoft.PicMan.domain.Set; | |
| 14 | ||
| 15 | /** Dao interface for the {@link com.buckosoft.PicMan.domain.Filter}s. | |
| 16 | * @author Dick Balaska | |
| 17 | * @since 2005/07/30 | |
| 18 | * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/db/FiltersDao.java">FiltersDao.java</a> | |
| 19 | */ | |
| 20 | public interface FiltersDao { | |
| 21 | ||
| 22 | /** Get the number of Filters in the database. | |
| 23 | * @return the count. | |
| 24 | */ | |
| 25 | int getFilterCount(); | |
| 26 | ||
| 27 | /** Get a list of the column names from the database. | |
| 28 | * @return The List. | |
| 29 | */ | |
| 30 | List<String> getFilterColumns(); | |
| 31 | ||
| 32 | /** Get a list of all of the <code>Filter</code>s in the database. | |
| 33 | * @return The List. | |
| 34 | */ | |
| 35 | List<Filter> getFilters(); | |
| 36 | ||
| 37 | /** Get a list of all of the <code>Filter</code>s for this set/size. | |
| 38 | * @param setName The name of the Set to query. | |
| 39 | * @param size The thumbnail size to query. | |
| 40 | * @return A List of the <code>Filter</code>s that match this query | |
| 41 | */ | |
| 42 | List<Filter> getFiltersBySet(String setName, int size); | |
| 43 | ||
| 44 | /** Get a List of the Pic Names of the <code>Filter</code>s that match this query. | |
| 45 | * @param set The Set to query | |
| 46 | * @param size The thumbnail size to query | |
| 47 | * @return A List of the Pic Names that match this query | |
| 48 | */ | |
| 49 | List<String> getPicNamesBySet(Set set, int size); | |
| 50 | ||
| 51 | /** Get a List of the Pic Names of the <code>Filter</code>s that match this valued query. | |
| 52 | * This allows to say "mlb < 5". | |
| 53 | * @param set The Set to query. | |
| 54 | * @param size The thumbnail size to query. | |
| 55 | * @return A List of the Pic Names that match this query. | |
| 56 | */ | |
| 57 | List<String> getPicNamesBySet(Set set, int size, int rateOp, int rateVal); | |
| 58 | ||
| 59 | /** Get the filter for the pic named. | |
| 60 | * @param picName The name of the Pic. | |
| 61 | * @return the Filter | |
| 62 | */ | |
| 63 | Filter getFilter(String picName); | |
| 64 | ||
| 65 | /** Add a filter to the database, overwriting any existing filter for this pic. | |
| 66 | * @param filter The new (or used) Filter. | |
| 67 | */ | |
| 68 | void addFilter(Filter filter); | |
| 69 | ||
| 70 | /** Add a new column to the filters table with the name of this set/size. | |
| 71 | * @param setName the name of the set. | |
| 72 | * @param size the size of the set. | |
| 73 | */ | |
| 74 | void addSet(String setName, int size); | |
| 75 | ||
| 76 | /** Delete a column from the filters table with the name of this set/size. | |
| 77 | * @param setName the name of the set. | |
| 78 | * @param size the size of the set. | |
| 79 | */ | |
| 80 | void deleteSet(String setName, int size); | |
| 81 | ||
| 82 | /** Rename a column in the filter table | |
| 83 | * @param oldName The name of the old set | |
| 84 | * @param newName The name of the new set | |
| 85 | * @param size The size field of the column | |
| 86 | */ | |
| 87 | void renameSet(String oldName, String newName, int size); | |
| 88 | ||
| 89 | } |