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.Region;
22 import org.springframework.dao.DataAccessException;
23
24 /***
25 *
26 * @author Sven Schauwvliege (Last modified by $Author: ge0ffrey $)
27 * @version $Revision: 1.1 $ - $Date: 2005/08/26 07:58:30 $
28 */
29
30 public interface RegionDao {
31 /***
32 * Add a new region.
33 * @param region the new region.
34 * @throws DataAccessException thrown when something goes wrong when getting
35 */
36 void store(Region region) throws DataAccessException;
37
38 /***
39 * Get all regions.
40 * @return a list of regions.
41 * @throws DataAccessException thrown when something failes will accessing
42 * the backend.
43 */
44 List getCountries()
45 throws DataAccessException;
46
47 /***
48 * Delete the given region.
49 * @param region The region to be removed.
50 * @throws DataAccessException thrown zhen something goes wrong when getting
51 */
52 void deleteRegion(Region region) throws DataAccessException;
53
54 /***
55 * Delete the given region by id.
56 * @param id The region id.
57 * @throws DataAccessException thrown zhen something goes wrong when getting
58 */
59 void deleteRegion(Integer id) throws DataAccessException;
60
61 /***
62 * find the given region by id.
63 * @param id The regionid.
64 * @return the found region.
65 * @throws DataAccessException thrown zhen something goes wrong when getting
66 */
67 Region getRegion(Integer id) throws DataAccessException;
68
69 /***
70 * @param region a String indicating the region to get.
71 * @return the region.
72 */
73 Region getRegionByName(String region);
74
75 }
76
77 /***
78 * $Log: RegionDao.java,v $
79 * Revision 1.1 2005/08/26 07:58:30 ge0ffrey
80 * split up the sources in service, serviceimpl and webclient
81 *
82 * Revision 1.2 2005/08/16 09:10:15 bme_jcs
83 * checkstyle errors resolved
84 *
85 * Revision 1.1 2005/08/10 13:58:10 schauwvliege
86 * added RegioDao
87 *
88 *
89 **/