com.gisgraphy.domain.repository

## Interface ICityDao

- All Superinterfaces:
    IDao<City,Long>, IGisDao<City>
  All Known Implementing Classes:
    CityDao

      public interface ICityDao
      extends IGisDao<City>

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

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `City` | `getByShape(com.vividsolutions.jts.geom.Point location, String countryCode, boolean filterMunicipality)`
    `List<City>` | `listByZipCode(String zipcode, String countrycode)`

    - ### 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

    - #### listByZipCode

          List<City> listByZipCode(String zipcode,
                                 String countrycode)

      Parameters:
        `zipcode` - the zipcode to found
        `countrycode` - the countrycode to limit the search, if null: search in all country
      Returns:
        A list a city for the specified parameters, if countrycode is specified, the list should have one city. To search for name or zip code use : `GenericGisDao.listFromText(String, boolean)`.

    - #### getByShape

          City getByShape(com.vividsolutions.jts.geom.Point location,
                        String countryCode,
                        boolean filterMunicipality)

      Returns:
        the city that the given point belongs by searching by shape. the countrycode is optionnal we can filter the result if the city is a municipality or not

Copyright © 2015. All rights reserved.