org.bejug.javacareers.jobs.dao
Interface OfferDao

All Known Subinterfaces:
JobOfferDao
All Known Implementing Classes:
JobOfferDaoHibernateImpl, OfferDaoHibernateImpl

public interface OfferDao

General interface for OfferDao's.

Version:
$Revision: 1.2 $ - $Date: 2005/09/13 08:11:17 $
Author:
bme (last modified by $Author: schauwvliege $

Method Summary
 void deleteOffer(java.lang.Integer id)
          Delete an Offer by id.
 void deleteOffer(org.bejug.javacareers.jobs.model.Offer offer)
          Delete an Offer by id.
 int deleteOffersByUrl(java.lang.String url)
          Delete an Offers by Url field.
 org.bejug.javacareers.jobs.model.Offer getOffer(java.lang.Integer id)
          Gets an Offer by id.
 int getOfferCount()
          Get the total number of offers.
 java.util.List getOffers()
          Lists all offers.
 void store(org.bejug.javacareers.jobs.model.Offer offer)
          Adds and updates an offer to the database.
 

Method Detail

getOffers

public java.util.List getOffers()
                         throws org.springframework.dao.DataAccessException
Lists all offers.

Returns:
a List containing all offers
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong

store

public void store(org.bejug.javacareers.jobs.model.Offer offer)
           throws org.springframework.dao.DataAccessException
Adds and updates an offer to the database.

Parameters:
offer - the offer to add
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong when adding an offer

getOffer

public org.bejug.javacareers.jobs.model.Offer getOffer(java.lang.Integer id)
                                                throws org.springframework.dao.DataAccessException
Gets an Offer by id.

Parameters:
id - the id of the Offer
Returns:
the wanted Offer of null if not found
Throws:
org.springframework.dao.DataAccessException - thrown zhen something goes wrong when getting an Offer

deleteOffer

public void deleteOffer(org.bejug.javacareers.jobs.model.Offer offer)
                 throws org.springframework.dao.DataAccessException
Delete an Offer by id.

Parameters:
offer - The persisted offer to delete.
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong

deleteOffer

public void deleteOffer(java.lang.Integer id)
                 throws org.springframework.dao.DataAccessException
Delete an Offer by id.

Parameters:
id - The id of the offer to delete.
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong

deleteOffersByUrl

public int deleteOffersByUrl(java.lang.String url)
                      throws org.springframework.dao.DataAccessException
Delete an Offers by Url field.

Parameters:
url - Value of Url field of persisted offers to delete.
Returns:
int number of deleted objects
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong

getOfferCount

public int getOfferCount()
                  throws org.springframework.dao.DataAccessException
Get the total number of offers.

Returns:
an int indicating the number of offers available.
Throws:
org.springframework.dao.DataAccessException - thrown when something goes wrong


Copyright © 2005-2006 BeJUG. All Rights Reserved.