@Repository public class CountryDao extends GenericGisDao<Country> implements ICountryDao
Country
GEOMETRY_TYPE, MAX_FULLTEXT_RESULTS
persistentClass
Constructor and Description |
---|
CountryDao()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
deleteAll()
Delete all the object from the datastore
|
List<Country> |
getAllSortedByName() |
Country |
getByIso3166Alpha2Code(String iso3166Alpha2Code)
Get By ISO 3166 Alpha 2 (2-letter) code NOTE : The country code
will be automaticaly converted in upperCase
|
Country |
getByIso3166Alpha3Code(String iso3166Alpha3Code)
Get by ISO 639 Alpha 3 (3-letter) code NOTE : The country code
will be automaticaly converted in upperCase
|
Country |
getByIso3166Code(String iso3166Code)
Wrapper method around
ICountryDao.getByIso3166Alpha2Code(String) and
ICountryDao.getByIso3166Alpha3Code(String) . |
Country |
getByName(String name)
returns the country for the specified name
|
List<Long> |
listFeatureIds()
List all the featureId of countries
|
Country |
save(Country country)
Saves the passed object, and returns an attached entity.
|
createGISTIndexForLocationColumn, createGISTIndexForShapeColumn, deleteAll, getByFeatureId, getDirties, getEager, getNearest, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, getShapeAsWKTByFeatureId, listByFeatureIds, listByName, listFromText, listFromText, remove, setEventManager
count, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, setFlushMode
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createGISTIndexForLocationColumn, createGISTIndexForShapeColumn, getByFeatureId, getDirties, getEager, getNearest, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, getShapeAsWKTByFeatureId, listByFeatureIds, listByName, listFromText
count, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, remove, setFlushMode
public Country save(Country country)
IDao
save
in interface IDao<Country,Long>
save
in class GenericGisDao<Country>
country
- the country to saveDuplicateNameException
- If a country with the same name already exists in the
datastorepublic Country getByIso3166Alpha2Code(String iso3166Alpha2Code)
ICountryDao
getByIso3166Alpha2Code
in interface ICountryDao
iso3166Alpha2Code
- The ISO 3166 Alpha 2 code in upper caseICountryDao.getByIso3166Alpha3Code(String)
,
ICountryDao.getByIso3166Code(String)
public Country getByIso3166Alpha3Code(String iso3166Alpha3Code)
ICountryDao
getByIso3166Alpha3Code
in interface ICountryDao
iso3166Alpha3Code
- The ISO 3166 Alpha 2 code in upper caseICountryDao.getByIso3166Alpha2Code(String)
,
ICountryDao.getByIso3166Code(String)
public Country getByIso3166Code(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 codegetByIso3166Code
in interface ICountryDao
iso3166Code
- the iso 3166 CodeICountryDao.getByIso3166Alpha3Code(String)
,
ICountryDao.getByIso3166Alpha2Code(String)
public Country getByName(String name)
ICountryDao
getByName
in interface ICountryDao
name
- the name of the country to retrievepublic int deleteAll()
IDao
public List<Country> getAllSortedByName()
getAllSortedByName
in interface ICountryDao
public List<Long> listFeatureIds()
ICountryDao
listFeatureIds
in interface ICountryDao
Copyright © 2015. All rights reserved.