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.ZipCode;
28  
29  public interface IZipCodeDao extends IDao<ZipCode, java.lang.Long> {
30  
31  	
32  	/**
33  	 * @param code the zipcode to search
34  	 * @param countryCode
35           * The ISO 3166 Alpha 2 code in upper case
36  	 * @return the zipcode
37  	 */
38  	public List<ZipCode> getByCodeAndCountry(String code,String countryCode);
39  	
40  	/**
41  	 * 
42  	 * same as {@link #getByCodeAndCountry(String, String)} but do a starts with method if country is GB or CA
43  	 * @param code the zipcode to search
44  	 * @param countryCode
45           * The ISO 3166 Alpha 2 code in upper case
46  	 * @return the zipcode
47  	 */
48  	public List<ZipCode> getByCodeAndCountrySmart(String code,String countryCode);
49  	
50  	/**
51  	 * @param code The zipcode to search
52  	 * @return a list of all zipcode where the given code matches or an empty list if no result
53  	 */
54  	public List<ZipCode> listByCode(String code);
55  	
56  	
57     
58  	
59      
60      
61  }