View Javadoc

1   /***
2   Copyright (C) 2005 The Java Community
3   
4   This program is free software; you can redistribute it and/or modify  it under
5   the terms of the GNU General Public License as published by  the Free Software
6   Foundation; either version 2 of the License, or  (at your option) any later
7   version.
8   
9   This program is distributed in the hope that it will be useful,  but WITHOUT
10  ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the  GNU General Public License for more details.
12  
13  You should have received a copy of the GNU General Public License  along with
14  this program; if not, write to the Free Software  Foundation, Inc., 59 Temple
15  Place, Suite 330, Boston, MA 02111-1307 USA.
16  */
17  package org.bejug.javacareers.jobs.dao;
18  
19  import java.util.List;
20  
21  import org.bejug.javacareers.jobs.model.Country;
22  import org.springframework.dao.DataAccessException;
23  
24  /***
25   *
26   * @author Sven Schauwvliege (Last modified by $Author: schauwvliege $)
27   * @version $Revision: 1.2 $ - $Date: 2005/09/13 08:11:17 $
28   */
29  
30  public interface CountryDao {
31      /***
32       * Add a new country.
33       * @param country the new country.
34       * @throws DataAccessException thrown when something goes wrong when getting
35       */
36      void store(Country country) throws DataAccessException;
37  
38      /***
39       * Get all countrys.
40       * @return a list of countrys.
41       * @throws DataAccessException thrown when hibernate throws an exception.
42       */
43      List getCountries()
44              throws DataAccessException;
45  
46      /***
47       * Delete the given country.
48       * @param country The country to be removed.
49       * @throws DataAccessException thrown zhen something goes wrong when getting
50       */
51      void deleteCountry(Country country) throws DataAccessException;
52      
53      /***
54       * Delete the given country by id.
55       * @param id The country id.
56       * @throws DataAccessException thrown zhen something goes wrong when getting
57       */
58      void deleteCountry(Integer id) throws DataAccessException;
59      
60      /***
61       * find the given country by id.
62       * @param id The countryid.
63       * @return the found country.
64       * @throws DataAccessException thrown zhen something goes wrong when getting
65       */
66      Country getCountry(Integer id) throws DataAccessException;
67  
68      /***
69       * @param country a String indicating the country.
70       * @return the country.
71       */
72      Country getCountryByName(String country);
73  
74  }
75  
76  /*** 
77   * $Log: CountryDao.java,v $
78   * Revision 1.2  2005/09/13 08:11:17  schauwvliege
79   * organize imports
80   *
81   * Revision 1.1  2005/08/26 07:58:30  ge0ffrey
82   * split up the sources in service, serviceimpl and webclient
83   *
84   * Revision 1.5  2005/08/10 09:04:49  bavo_jcs
85   * Optimized imports according to checkstyle
86   *
87   * Revision 1.4  2005/08/09 12:59:55  bavo_jcs
88   * Optimized imports
89   *
90   * Revision 1.3  2005/08/08 09:38:17  bme_jcs
91   * resolved checkstyle errors
92   *
93   * Revision 1.2  2005/08/03 13:14:18  bme_jcs
94   * getDao's removed and storeObject renamed to store
95   *
96   * Revision 1.1  2005/07/05 15:13:10  schauwvliege
97   * added person/contact and location to model
98   * 
99   **/