biz.janux.geography
Interface StateProvinceDaoGeneric<T extends StateProvince>

All Superinterfaces:
GenericDaoReadOnly<T,Integer,org.janux.bus.search.SearchCriteria>, GenericDaoWrite<T,Integer>

public interface StateProvinceDaoGeneric<T extends StateProvince>
extends GenericDaoWrite<T,Integer>, GenericDaoReadOnly<T,Integer,org.janux.bus.search.SearchCriteria>

Dao used to retrieve and save StateProvince Entities

Since:
0.4
Author:
Philippe Paravicini

Method Summary
 StateProvince findByCode(String countryCode, String stateCode)
          retrieves a State using a country code and state code, where the country code is a standard ISO code, or returns null if a State with that state and country code is not found
 Map<String,StateProvince> findByCountry(String countryCode)
          retrieves a Map of StateProvince objects that exist within a specific Country in the system, and indexed by the code assigned to the StateProvince within that Country; ordering of the Map returned is left to the implementing class
 StateProvince findByName(String countryCode, String stateName)
          retrieves a State by performing a cap-insensitive search by name, within a country with the specified ISO country code, or returns null if a State with that name is not found TODO: this may have to be internationalized
 
Methods inherited from interface org.janux.bus.persistence.GenericDaoWrite
attachClean, clear, delete, evict, flush, merge, refresh, save, saveOrUpdate, update
 
Methods inherited from interface org.janux.bus.persistence.GenericDaoReadOnly
count, findByCriteria, load
 

Method Detail

findByCode

StateProvince findByCode(String countryCode,
                         String stateCode)
retrieves a State using a country code and state code, where the country code is a standard ISO code, or returns null if a State with that state and country code is not found

Parameters:
countryCode - a two-letter ISO country code
stateCode - a country-specific state abbreviation code

findByName

StateProvince findByName(String countryCode,
                         String stateName)
retrieves a State by performing a cap-insensitive search by name, within a country with the specified ISO country code, or returns null if a State with that name is not found TODO: this may have to be internationalized

Parameters:
countryCode - a two-letter ISO country code
stateName - the name of a state in the default system language

findByCountry

Map<String,StateProvince> findByCountry(String countryCode)
retrieves a Map of StateProvince objects that exist within a specific Country in the system, and indexed by the code assigned to the StateProvince within that Country; ordering of the Map returned is left to the implementing class

Parameters:
countryCode - a two-letter ISO country code


Copyright © 2005-2013 Janux. All Rights Reserved.