org.jtheque.primary.dao.able
Interface IDaoCountries

All Superinterfaces:
org.jtheque.core.managers.persistence.able.JThequeDao
All Known Implementing Classes:
DaoCountries

public interface IDaoCountries
extends org.jtheque.core.managers.persistence.able.JThequeDao

A DAO for countries specification.

Author:
Baptiste Wicht

Field Summary
static String TABLE
           
 
Method Summary
 void create(Country country)
          Create the country.
 Country createCountry()
          Create a new Country.
 boolean delete(Country country)
          Delete a country.
 boolean exist(Country country)
          Indicate if the country exist in the Dao.
 Collection<Country> getCountries()
          Return all the countries.
 Country getCountry(int id)
          Return the country of the specified id.
 Country getCountry(String title)
          Return the country of the specified title.
 void save(Country country)
          Save the country on the database.
 
Methods inherited from interface org.jtheque.core.managers.persistence.able.JThequeDao
addDataListener, clearAll, removeDataListener
 

Field Detail

TABLE

static final String TABLE
See Also:
Constant Field Values
Method Detail

getCountries

Collection<Country> getCountries()
Return all the countries.

Returns:
A Collection containing all the countries.

getCountry

Country getCountry(int id)
Return the country of the specified id.

Parameters:
id - The searched id.
Returns:
The country of the specified id or null if there is no country with this id.

getCountry

Country getCountry(String title)
Return the country of the specified title.

Parameters:
title - The searched title.
Returns:
The country of the specified title or null if there is no country with this title.

exist

boolean exist(Country country)
Indicate if the country exist in the Dao.

Parameters:
country - The country we must test if it's exist.
Returns:
true if the country exist else false.

delete

boolean delete(Country country)
Delete a country.

Parameters:
country - The country to delete
Returns:
true if the object has been deleted else false.

create

void create(Country country)
Create the country.

Parameters:
country - The country to create

save

void save(Country country)
Save the country on the database.

Parameters:
country - The country to save.

createCountry

Country createCountry()
Create a new Country.

Returns:
The created Country.


Copyright © 2010 JTheque. All Rights Reserved.