| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| FiltersMicroSetsDao |
|
| 1.0;1 |
| 1 | /****************************************************************************** | |
| 2 | * FiltersMicroSetsDao.java - Dao interface for the FiltersMicroSets | |
| 3 | * | |
| 4 | * PicMan - The BuckoSoft Picture Manager in Java | |
| 5 | * Copyright(c) 2008 - Dick Balaska | |
| 6 | * | |
| 7 | */ | |
| 8 | package com.buckosoft.PicMan.db; | |
| 9 | ||
| 10 | import java.util.List; | |
| 11 | ||
| 12 | import com.buckosoft.PicMan.domain.FilterMicroSet; | |
| 13 | ||
| 14 | /** Dao interface for the {@link com.buckosoft.PicMan.domain.FilterMicroSet}s. | |
| 15 | * @author Dick Balaska | |
| 16 | * @since 2008/06/09 | |
| 17 | */ | |
| 18 | public interface FiltersMicroSetsDao { | |
| 19 | ||
| 20 | /** Get the <code>FilterMicroSet</code> for this pic in this set | |
| 21 | * @param pid The pid of the pic to query | |
| 22 | * @param sid The SetID to query. | |
| 23 | * @return The <code>FilterMicroSet</code> row in the database for this query, or null if not found. | |
| 24 | */ | |
| 25 | FilterMicroSet getFilterMicroSet(int pid, int sid); | |
| 26 | ||
| 27 | /** Get a List of <code>FilterMicroSet</code>s for this SetID. | |
| 28 | * @param sid The SetID to query. | |
| 29 | * @return A List of <code>FilterMicroSet</code>s that matches this sid. | |
| 30 | */ | |
| 31 | List<FilterMicroSet> getPicsInSet(int sid); | |
| 32 | ||
| 33 | /** Get a List of <code>FilterMicroSet</code>s for this SetID that are greater than or equal to this value. | |
| 34 | * @param sid The SetID to query. | |
| 35 | * @return A List of <code>FilterMicroSet</code>s that matches this sid AND have a value greater than or equal to the specified value. | |
| 36 | */ | |
| 37 | List<FilterMicroSet> getPicsInSet(int sid, int value); | |
| 38 | ||
| 39 | /** Get a List of <code>FilterMicroSet</code>s that match this PicID | |
| 40 | * @param pid The PicID to query | |
| 41 | * @return A List of <code>FilterMicroSet</code>s that contain this PicID | |
| 42 | */ | |
| 43 | List<FilterMicroSet> getFiltersInPid(int pid); | |
| 44 | ||
| 45 | //boolean isPicInSet(int sid, int pid); | |
| 46 | ||
| 47 | /** Delete all references to this pic in any microSets that it may appear. | |
| 48 | * @param pid The Pic id to delete | |
| 49 | */ | |
| 50 | void deleteFilters(int pid); | |
| 51 | ||
| 52 | /** Store the values from this "MicroFilter" in the database | |
| 53 | * @param sid The SetID - Must be a MicroSet | |
| 54 | * @param pid The PicID | |
| 55 | * @param value The rating of this pic in this set | |
| 56 | */ | |
| 57 | void storeFilter(int sid, int pid, int value); | |
| 58 | } |