Interface StateService


public interface StateService
Service for interacting with States.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • getState

      @Cacheable(value="http://rice.kuali.org/location/v2_0/StateType", key="\'countryCode=\' + #p0 + \'|\' + \'code=\' + #p1") State getState(String countryCode, String code) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Gets a 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.

      Parameters:
      countryCode - country code. cannot be blank.
      code - state code. cannot be blank.
      Returns:
      a State or null
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - country code or state code is blank
    • findAllStatesInCountry

      @Cacheable(value="http://rice.kuali.org/location/v2_0/StateType", key="\'countryCode=\' + #p0") List<State> findAllStatesInCountry(String countryCode) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Finds all the 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.

      Parameters:
      countryCode - state code. cannot be blank.
      Returns:
      an immutable collection of states
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - country code is blank
    • findAllStatesInCountryByAltCode

      @Cacheable(value="http://rice.kuali.org/location/v2_0/StateType", key="\'alternateCode=\' + #p0") List<State> findAllStatesInCountryByAltCode(String alternateCode) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException, org.kuali.rice.core.api.exception.RiceIllegalStateException
      Finds all the 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.

      Parameters:
      alternateCode - cannot be blank.
      Returns:
      an immutable collection of states
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - alternate country code is null
      org.kuali.rice.core.api.exception.RiceIllegalStateException - when no countries are found for alternate country code
    • findStates

      StateQueryResults findStates(org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      This method find States 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
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Since:
      2.0.1