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

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

public class RegionDaoHibernateImpl
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements RegionDao

Region DAO Hibernate DAO implementation.

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

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
RegionDaoHibernateImpl()
           
 
Method Summary
 void deleteRegion(java.lang.Integer id)
          Delete the given region by id.
 void deleteRegion(org.bejug.javacareers.jobs.model.Region region)
          Delete the given region.
 java.util.List getCountries()
          Get all regions.
 org.bejug.javacareers.jobs.model.Region getRegion(java.lang.Integer id)
          find the given region by id.
 org.bejug.javacareers.jobs.model.Region getRegionByName(java.lang.String region)
          
 void store(org.bejug.javacareers.jobs.model.Region region)
          Add a new region.
 
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

RegionDaoHibernateImpl

public RegionDaoHibernateImpl()
Method Detail

store

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

Specified by:
store in interface RegionDao
Parameters:
region - the new region.
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 regions.

Specified by:
getCountries in interface RegionDao
Returns:
a list of regions.
Throws:
org.springframework.dao.DataAccessException - thrown when something failes will accessing the backend.

deleteRegion

public void deleteRegion(org.bejug.javacareers.jobs.model.Region region)
                  throws org.springframework.dao.DataAccessException
Delete the given region.

Specified by:
deleteRegion in interface RegionDao
Parameters:
region - The region to be removed.
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting

deleteRegion

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

Specified by:
deleteRegion in interface RegionDao
Parameters:
id - The region id.
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting

getRegion

public org.bejug.javacareers.jobs.model.Region getRegion(java.lang.Integer id)
                                                  throws org.springframework.dao.DataAccessException
find the given region by id.

Specified by:
getRegion in interface RegionDao
Parameters:
id - The regionid.
Returns:
the found region.
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting

getRegionByName

public org.bejug.javacareers.jobs.model.Region getRegionByName(java.lang.String region)

Specified by:
getRegionByName in interface RegionDao
Parameters:
region - a String indicating the region to get.
Returns:
the region.


Copyright © 2005-2006 BeJUG. All Rights Reserved.