public interface StateService
States
.Modifier and Type | Method and Description |
---|---|
List<State> |
findAllStatesInCountry(String countryCode)
Finds all the
States for postal country code. |
List<State> |
findAllStatesInCountryByAltCode(String alternateCode)
Finds all the
States for alternate postal country code. |
StateQueryResults |
findStates(QueryByCriteria queryByCriteria)
This method find States based on a query criteria.
|
State |
getState(String countryCode,
String code)
Gets a
State from a postal country code and postal state code. |
@Cacheable(value="http://rice.kuali.org/location/v2_0/StateType", key="\'countryCode=\' + #p0 + \'|\' + \'code=\' + #p1") State getState(String countryCode, String code) throws RiceIllegalArgumentException
State
from a postal country code and postal state code.
This method will return null if the state does not exist.
This method will return active or inactive states.
countryCode
- country code. cannot be blank.code
- state code. cannot be blank.State
or nullRiceIllegalArgumentException
- country code or state code is blank@Cacheable(value="http://rice.kuali.org/location/v2_0/StateType", key="\'countryCode=\' + #p0") List<State> findAllStatesInCountry(String countryCode) throws RiceIllegalArgumentException
States
for postal country code.
This method will always return an immutable Collection even when no values exist.
This method will only return active states.
countryCode
- state code. cannot be blank.RiceIllegalArgumentException
- country code is blank@Cacheable(value="http://rice.kuali.org/location/v2_0/StateType", key="\'alternateCode=\' + #p0") List<State> findAllStatesInCountryByAltCode(String alternateCode) throws RiceIllegalArgumentException, RiceIllegalStateException
States
for alternate postal country code.
This method will always return an immutable Collection even when no values exist.
This method will only return active states.
alternateCode
- cannot be blank.RiceIllegalArgumentException
- alternate country code is nullRiceIllegalStateException
- when no countries are found for alternate country codeStateQueryResults findStates(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
queryByCriteria
- the criteria. Cannot be null.IllegalArgumentException
- if the queryByCriteria is nullRiceIllegalArgumentException
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.