org.bejug.javacareers.jobs.dao.hibernate
Class CountryDaoHibernateImpl

java.lang.Object
  extended byorg.springframework.dao.support.DaoSupport
      extended byorg.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended byorg.bejug.javacareers.jobs.dao.hibernate.CountryDaoHibernateImpl
All Implemented Interfaces:
CountryDao, org.springframework.beans.factory.InitializingBean

public class CountryDaoHibernateImpl
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements CountryDao

Country Hibernate DAO implementation.

Version:
$Revision: 1.3 $ - $Date: 2005/10/11 08:43:10 $
Author:
Sven Schauwvliege (Last modified by $Author: stephan_janssen $)

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
CountryDaoHibernateImpl()
           
 
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.
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountryDaoHibernateImpl

public CountryDaoHibernateImpl()
Method Detail

store

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

Specified by:
store in interface CountryDao
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.

Specified by:
getCountries in interface CountryDao
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.

Specified by:
deleteCountry in interface CountryDao
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.

Specified by:
deleteCountry in interface CountryDao
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.

Specified by:
getCountry in interface CountryDao
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)

Specified by:
getCountryByName in interface CountryDao
Parameters:
country - a String indicating the country.
Returns:
the country.


Copyright © 2005-2006 BeJUG. All Rights Reserved.