View Javadoc
1   /*******************************************************************************
2    *   Gisgraphy Project 
3    * 
4    *   This library is free software; you can redistribute it and/or
5    *   modify it under the terms of the GNU Lesser General Public
6    *   License as published by the Free Software Foundation; either
7    *   version 2.1 of the License, or (at your option) any later version.
8    * 
9    *   This library is distributed in the hope that it will be useful,
10   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   *   Lesser General Public License for more details.
13   * 
14   *   You should have received a copy of the GNU Lesser General Public
15   *   License along with this library; if not, write to the Free Software
16   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
17   * 
18   *  Copyright 2008  Gisgraphy project 
19   *  David Masclet <davidmasclet@gisgraphy.com>
20   *  
21   *  
22   *******************************************************************************/
23  package com.gisgraphy.domain.repository;
24  
25  import java.util.List;
26  
27  import com.gisgraphy.domain.geoloc.entity.City;
28  import com.vividsolutions.jts.geom.Point;
29  
30  /**
31   * Interface of data access object for {@link City}
32   * 
33   * @author <a href="mailto:david.masclet@gisgraphy.com">David Masclet</a>
34   */
35  public interface ICityDao extends IGisDao<City> {
36  
37      /**
38       * @param zipcode
39       *                the zipcode to found
40       * @param countrycode
41       *                the countrycode to limit the search, if null: search in
42       *                all country
43       * @return A list a city for the specified parameters, if countrycode is
44       *         specified, the list should have one city. To search for name or
45       *         zip code use : {@link CityDao#listFromText(String, boolean)}.
46       */
47      public List<City> listByZipCode(String zipcode, String countrycode);
48      
49      /**
50       * @return the city that the given point belongs by searching by shape. the countrycode is optionnal
51       * we can filter the result if the city is a municipality or not
52       */
53      public City getByShape(Point location,final String countryCode,boolean filterMunicipality);
54      
55    
56      
57    
58  }