|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.gisgraphy.domain.repository.GenericDao<T,java.lang.Long>
com.gisgraphy.domain.repository.GenericGisDao<Country>
com.gisgraphy.domain.repository.CountryDao
@Repository public class CountryDao
A data access object for Country
Field Summary |
---|
Fields inherited from class com.gisgraphy.domain.repository.GenericGisDao |
---|
GEOMETRY_TYPE, MAX_FULLTEXT_RESULTS |
Fields inherited from class com.gisgraphy.domain.repository.GenericDao |
---|
persistentClass |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
CountryDao()
Default Constructor |
Method Summary | |
---|---|
int |
deleteAll()
Delete all the object from the datastore |
java.util.List<Country> |
getAllSortedByName()
|
Country |
getByIso3166Alpha2Code(java.lang.String iso3166Alpha2Code)
Get By ISO 3166 Alpha 2 (2-letter) code NOTE : The country code will be automaticaly converted in upperCase |
Country |
getByIso3166Alpha3Code(java.lang.String iso3166Alpha3Code)
Get by ISO 639 Alpha 3 (3-letter) code NOTE : The country code will be automaticaly converted in upperCase |
Country |
getByIso3166Code(java.lang.String iso3166Code)
Wrapper method around ICountryDao.getByIso3166Alpha2Code(String) and
ICountryDao.getByIso3166Alpha3Code(String) . |
Country |
getByName(java.lang.String name)
returns the country for the specified name |
java.util.List<java.lang.Long> |
listFeatureIds()
List all the featureId of countries |
Country |
save(Country country)
Saves the passed object, and returns an attached entity. |
Methods inherited from class com.gisgraphy.domain.repository.GenericGisDao |
---|
createGISTIndexForLocationColumn, deleteAll, getByFeatureId, getDirties, getEager, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, listByFeatureIds, listByName, listFromText, listFromText, remove, setEventManager |
Methods inherited from class com.gisgraphy.domain.repository.GenericDao |
---|
count, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushMode |
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
---|
checkDaoConfig, 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 |
Methods inherited from interface com.gisgraphy.domain.repository.IGisDao |
---|
createGISTIndexForLocationColumn, getByFeatureId, getDirties, getEager, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, listByFeatureIds, listByName, listFromText |
Methods inherited from interface com.gisgraphy.domain.repository.IDao |
---|
count, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, remove, setFlushMode |
Constructor Detail |
---|
public CountryDao()
Method Detail |
---|
public Country save(Country country)
IDao
save
in interface IDao<Country,java.lang.Long>
save
in class GenericGisDao<Country>
country
- the country to save
DuplicateNameException
- If a country with the same name already exists in the
datastorepublic Country getByIso3166Alpha2Code(java.lang.String iso3166Alpha2Code)
ICountryDao
getByIso3166Alpha2Code
in interface ICountryDao
iso3166Alpha2Code
- The ISO 3166 Alpha 2 code in upper case
ICountryDao.getByIso3166Alpha3Code(String)
,
ICountryDao.getByIso3166Code(String)
public Country getByIso3166Alpha3Code(java.lang.String iso3166Alpha3Code)
ICountryDao
getByIso3166Alpha3Code
in interface ICountryDao
iso3166Alpha3Code
- The ISO 3166 Alpha 2 code in upper case
ICountryDao.getByIso3166Alpha2Code(String)
,
ICountryDao.getByIso3166Code(String)
public Country getByIso3166Code(java.lang.String iso3166Code)
ICountryDao
ICountryDao.getByIso3166Alpha2Code(String)
and
ICountryDao.getByIso3166Alpha3Code(String)
. This method is to use when you
want to get the country with an iso 3166 code that you don't know if it
is an alpha 2 or 3 Get by ISO 639 Alpha 2 or 3 code
getByIso3166Code
in interface ICountryDao
iso3166Code
- the iso 3166 Code
ICountryDao.getByIso3166Alpha3Code(String)
,
ICountryDao.getByIso3166Alpha2Code(String)
public Country getByName(java.lang.String name)
ICountryDao
getByName
in interface ICountryDao
name
- the name of the country to retrieve
public int deleteAll()
IDao
deleteAll
in interface IDao<Country,java.lang.Long>
deleteAll
in class GenericGisDao<Country>
public java.util.List<Country> getAllSortedByName()
getAllSortedByName
in interface ICountryDao
public java.util.List<java.lang.Long> listFeatureIds()
ICountryDao
listFeatureIds
in interface ICountryDao
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |