com.gisgraphy.domain.repository

## Interface ICountryDao

- All Superinterfaces:
    IDao<Country,Long>, IGisDao<Country>
  All Known Implementing Classes:
    CountryDao

      public interface ICountryDao
      extends IGisDao<Country>

  Interface of data access object for `Country`
  Author:
    David Masclet

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 `getByIso3166Alpha2Code(String)` and `getByIso3166Alpha3Code(String)`.
    `Country` | `getByName(String name)` returns the country for the specified name
    `List<Long>` | `listFeatureIds()` List all the featureId of countries

    - ### Methods inherited from interface com.gisgraphy.domain.repository.IGisDao

      `createGISTIndexForLocationColumn, createGISTIndexForShapeColumn, getByFeatureId, getDirties, getEager, getNearest, getNearestAndDistanceFrom, getNearestAndDistanceFrom, getNearestAndDistanceFromGisFeature, getNearestAndDistanceFromGisFeature, getShapeAsWKTByFeatureId, listByFeatureIds, listByName, listFromText`

    - ### Methods inherited from interface com.gisgraphy.domain.repository.IDao

      `count, deleteAll, deleteAll, exists, flushAndClear, get, getAll, getAllPaginate, getPersistenceClass, remove, save, setFlushMode`

- - ### Method Detail

    - #### getByIso3166Alpha2Code

          Country getByIso3166Alpha2Code(String iso3166Alpha2Code)

      Get By ISO 3166 Alpha 2 (2-letter) code NOTE : The country code will be automaticaly converted in upperCase
      Parameters:
        `iso3166Alpha2Code` - The ISO 3166 Alpha 2 code in upper case
      Returns:
        The expected country for the specified alpha 2 code or null if the iso639Alpha2LanguageCode is null
      See Also:
        `getByIso3166Alpha3Code(String)`, `getByIso3166Code(String)`

    - #### getByIso3166Alpha3Code

          Country getByIso3166Alpha3Code(String iso3166Alpha3Code)

      Get by ISO 639 Alpha 3 (3-letter) code NOTE : The country code will be automaticaly converted in upperCase
      Parameters:
        `iso3166Alpha3Code` - The ISO 3166 Alpha 2 code in upper case
      Returns:
        The expected country for the specified alpha 3 code or null if the iso639Alpha3Code is null
      See Also:
        `getByIso3166Alpha2Code(String)`, `getByIso3166Code(String)`

    - #### getByIso3166Code

          Country getByIso3166Code(String iso3166Code)

      Wrapper method around `getByIso3166Alpha2Code(String)` and `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
      Parameters:
        `iso3166Code` - the iso 3166 Code
      Returns:
        the expected country or null if the code is null or it is not a 2 or 3 char code
      See Also:
        `getByIso3166Alpha3Code(String)`, `getByIso3166Alpha2Code(String)`

    - #### getByName

          Country getByName(String name)

      returns the country for the specified name
      Parameters:
        `name` - the name of the country to retrieve
      Returns:
        the expected country or null if the code is null or it is not a 2 or 3 char code

    - #### getAllSortedByName

          List<Country> getAllSortedByName()

      Returns:
        all the countries sorted by name, never return null but an empty list

    - #### listFeatureIds

          List<Long> listFeatureIds()

      List all the featureId of countries
      Returns:
        a list of all featureId for all the countries

Copyright © 2015. All rights reserved.