org.bejug.javacareers.jobs.dao
Interface CountryDao

All Known Implementing Classes:
CountryDaoHibernateImpl

public interface CountryDao

Version:
$Revision: 1.2 $ - $Date: 2005/09/13 08:11:17 $
Author:
Sven Schauwvliege (Last modified by $Author: schauwvliege $)

Method Summary
 void deleteCountry(org.bejug.javacareers.jobs.model.Country country)
          Delete the given country.
 void deleteCountry(java.lang.Integer id)
          Delete the given country by id.
 java.util.List getCountries()
          Get all countrys.
 org.bejug.javacareers.jobs.model.Country getCountry(java.lang.Integer id)
          find the given country by id.
 org.bejug.javacareers.jobs.model.Country getCountryByName(java.lang.String country)
           
 void store(org.bejug.javacareers.jobs.model.Country country)
          Add a new country.
 

Method Detail

store

public void store(org.bejug.javacareers.jobs.model.Country country)
           throws org.springframework.dao.DataAccessException
Add a new country.

Parameters:
country - the new country.
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong when getting

getCountries

public java.util.List getCountries()
                            throws org.springframework.dao.DataAccessException
Get all countrys.

Returns:
a list of countrys.
Throws:
org.springframework.dao.DataAccessException - thrown when hibernate throws an exception.

deleteCountry

public void deleteCountry(org.bejug.javacareers.jobs.model.Country country)
                   throws org.springframework.dao.DataAccessException
Delete the given country.

Parameters:
country - The country to be removed.
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting

deleteCountry

public void deleteCountry(java.lang.Integer id)
                   throws org.springframework.dao.DataAccessException
Delete the given country by id.

Parameters:
id - The country id.
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting

getCountry

public org.bejug.javacareers.jobs.model.Country getCountry(java.lang.Integer id)
                                                    throws org.springframework.dao.DataAccessException
find the given country by id.

Parameters:
id - The countryid.
Returns:
the found country.
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting

getCountryByName

public org.bejug.javacareers.jobs.model.Country getCountryByName(java.lang.String country)
Parameters:
country - a String indicating the country.
Returns:
the country.


Copyright © 2005-2006 BeJUG. All Rights Reserved.