Coverage Report - org.jtheque.primary.dao.able.IDaoTypes
 
Classes in this File Line Coverage Branch Coverage Complexity
IDaoTypes
N/A
N/A
1
 
 1  
 package org.jtheque.primary.dao.able;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.core.managers.persistence.able.JThequeDao;
 20  
 import org.jtheque.primary.od.able.Type;
 21  
 
 22  
 import java.util.Collection;
 23  
 
 24  
 /**
 25  
  * A DAO for types specification.
 26  
  *
 27  
  * @author Baptiste Wicht
 28  
  */
 29  
 public interface IDaoTypes extends JThequeDao {
 30  
     String TABLE = "T_TYPES";
 31  
 
 32  
     /**
 33  
      * Return all the types.
 34  
      *
 35  
      * @return A List containing all the types.
 36  
      */
 37  
     Collection<Type> getTypes();
 38  
 
 39  
     /**
 40  
      * Return the type with the specified ID.
 41  
      *
 42  
      * @param id The ID of the searched type.
 43  
      * @return The type.
 44  
      */
 45  
     Type getType(int id);
 46  
 
 47  
     /**
 48  
      * Return the type with the specified name.
 49  
      *
 50  
      * @param name The searched name.
 51  
      * @return The type.
 52  
      */
 53  
     Type getType(String name);
 54  
 
 55  
     /**
 56  
      * Save the type.
 57  
      *
 58  
      * @param type The type to save.
 59  
      */
 60  
     void save(Type type);
 61  
 
 62  
     /**
 63  
      * Create the type.
 64  
      *
 65  
      * @param type The type to create.
 66  
      */
 67  
     void create(Type type);
 68  
 
 69  
     /**
 70  
      * Delete the type.
 71  
      *
 72  
      * @param type The type to delete.
 73  
      * @return true if the object is deleted else false.
 74  
      */
 75  
     boolean delete(Type type);
 76  
 
 77  
     /**
 78  
      * Indicate if this type exists or not.
 79  
      *
 80  
      * @param type The type to test.
 81  
      * @return <code>true</code> if the type exists else <code>false</code>.
 82  
      */
 83  
     boolean exists(Type type);
 84  
 
 85  
     /**
 86  
      * Create a new <code>Type</code>.
 87  
      *
 88  
      * @return The create <code>Type</code>.
 89  
      */
 90  
     Type createType();
 91  
 }