Interface PostalCodeService


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

    • getPostalCode

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

      Parameters:
      countryCode - country code. cannot be blank.
      code - postal code value. cannot be blank.
      Returns:
      a PostalCode or null
      Throws:
      org.kuali.rice.core.api.exception.RiceIllegalArgumentException - country code or postal code value is blank
    • findAllPostalCodesInCountry

      @Cacheable(value="http://rice.kuali.org/location/v2_0/PostalCodeType", key="\'countryCode=\' + #p0") List<PostalCode> findAllPostalCodesInCountry(String countryCode) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      Gets all the PostalCode for postal country code.

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

      This method will only return active postal codes.

      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
    • findPostalCodes

      PostalCodeQueryResults findPostalCodes(org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
      This method find PostalCodes 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