org.kuali.rice.location.api.county
Interface CountyService

All Known Implementing Classes:
CountyServiceImpl

public interface CountyService

CountyService interface.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 List<County> findAllCountiesInCountryAndState(String countryCode, String stateCode)
          Gets all the County for postal country code & postal state code.
 CountyQueryResults findCounties(QueryByCriteria queryByCriteria)
          This method find Counties based on a query criteria.
 County getCounty(String countryCode, String stateCode, String code)
          Gets a County from a postal country code and postal code value.
 

Method Detail

getCounty

@Cacheable(value="http://rice.kuali.org/location/v2_0/CountyType",
           key="\'countryCode=\' + #p0 + \'|\' + \'stateCode=\' + #p1 + \'|\' + \'code=\' + #p3")
County getCounty(String countryCode,
                           String stateCode,
                           String code)
                 throws RiceIllegalArgumentException
Gets a County from a postal country code and postal code value.

This method will return null if the state does not exist.

This method will return active or inactive counties.

Parameters:
countryCode - country code. cannot be blank.
stateCode - postal state code. cannot be blank.
code - county code. cannot be blank
Returns:
a County or null
Throws:
RiceIllegalArgumentException - country code, postal state code, or county code is blank

findAllCountiesInCountryAndState

@Cacheable(value="http://rice.kuali.org/location/v2_0/CountyType",
           key="\'countryCode=\' + #p0 + \'|\' + \'stateCode=\' + #p1")
List<County> findAllCountiesInCountryAndState(String countryCode,
                                                        String stateCode)
                                              throws RiceIllegalArgumentException
Gets all the County for postal country code & postal state code.

This method will always return an immutable Collection even when no values exist.

This method will only return active counties.

Parameters:
countryCode - state code. cannot be blank.
stateCode - postal state code. cannot be blank.
Returns:
an immutable collection of counties
Throws:
RiceIllegalArgumentException - country code, postal state code is blank

findCounties

CountyQueryResults findCounties(QueryByCriteria queryByCriteria)
                                throws RiceIllegalArgumentException
This method find Counties based on a query criteria. The criteria cannot be null.

Parameters:
queryByCriteria - the criteria. Cannot be null.
Returns:
query results. will never return null.
Throws:
IllegalArgumentException - if the queryByCriteria is null
RiceIllegalArgumentException
Since:
2.0.1


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.