org.jtheque.primary.dao.impl
Class DaoLanguages

java.lang.Object
  extended by org.jtheque.core.managers.persistence.GenericDao<Language>
      extended by org.jtheque.primary.dao.impl.DaoLanguages
All Implemented Interfaces:
org.jtheque.core.managers.persistence.able.JThequeDao, IDaoLanguages

public final class DaoLanguages
extends org.jtheque.core.managers.persistence.GenericDao<Language>
implements IDaoLanguages

A Data Access Object implementation for languages.

Author:
Baptiste Wicht

Field Summary
 
Fields inherited from interface org.jtheque.primary.dao.able.IDaoLanguages
TABLE
 
Constructor Summary
DaoLanguages()
          Create a new DaoLanguages.
 
Method Summary
 Language createLanguage()
          Create a new Language.
 boolean exist(Language language)
          Indicate if the language exist in the Dao.
 Language getLanguage(int id)
          Return the language of the specified id.
 Language getLanguage(String name)
          Return the language of the specified title.
 Collection<Language> getLanguages()
          Return all the countries.
protected  org.jtheque.core.managers.persistence.QueryMapper getQueryMapper()
           
protected  org.springframework.jdbc.core.simple.ParameterizedRowMapper<Language> getRowMapper()
           
protected  void load(int i)
           
protected  void loadCache()
           
 
Methods inherited from class org.jtheque.core.managers.persistence.GenericDao
addDataListener, clearAll, create, delete, delete, get, getAll, getCache, isNotInCache, load, removeDataListener, save, setCacheEntirelyLoaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jtheque.primary.dao.able.IDaoLanguages
create, delete, save
 
Methods inherited from interface org.jtheque.core.managers.persistence.able.JThequeDao
addDataListener, clearAll, removeDataListener
 

Constructor Detail

DaoLanguages

public DaoLanguages()
Create a new DaoLanguages.

Method Detail

getLanguages

public Collection<Language> getLanguages()
Description copied from interface: IDaoLanguages
Return all the countries.

Specified by:
getLanguages in interface IDaoLanguages
Returns:
A Collection containing all the languages.

getLanguage

public Language getLanguage(int id)
Description copied from interface: IDaoLanguages
Return the language of the specified id.

Specified by:
getLanguage in interface IDaoLanguages
Parameters:
id - The searched id.
Returns:
The language of the specified id or null if there is no language with this id.

getLanguage

public Language getLanguage(String name)
Description copied from interface: IDaoLanguages
Return the language of the specified title.

Specified by:
getLanguage in interface IDaoLanguages
Parameters:
name - The searched title.
Returns:
The language of the specified title or null if there is no language with this title.

exist

public boolean exist(Language language)
Description copied from interface: IDaoLanguages
Indicate if the language exist in the Dao.

Specified by:
exist in interface IDaoLanguages
Parameters:
language - The language we must test if it's exist.
Returns:
true if the language exist else false.

createLanguage

public Language createLanguage()
Description copied from interface: IDaoLanguages
Create a new Language.

Specified by:
createLanguage in interface IDaoLanguages
Returns:
The created Language.

getRowMapper

protected org.springframework.jdbc.core.simple.ParameterizedRowMapper<Language> getRowMapper()
Specified by:
getRowMapper in class org.jtheque.core.managers.persistence.GenericDao<Language>

getQueryMapper

protected org.jtheque.core.managers.persistence.QueryMapper getQueryMapper()
Specified by:
getQueryMapper in class org.jtheque.core.managers.persistence.GenericDao<Language>

loadCache

protected void loadCache()
Specified by:
loadCache in class org.jtheque.core.managers.persistence.GenericDao<Language>

load

protected void load(int i)
Specified by:
load in class org.jtheque.core.managers.persistence.GenericDao<Language>


Copyright © 2010 JTheque. All Rights Reserved.