org.kuali.rice.kns.service.impl
Class PostalCodeServiceImpl

java.lang.Object
  extended by org.kuali.rice.kns.service.impl.PostalCodeServiceImpl
All Implemented Interfaces:
PostalCodeService

public class PostalCodeServiceImpl
extends Object
implements PostalCodeService


Field Summary
private  CountryService countryService
           
private  KualiModuleService kualiModuleService
           
private static org.apache.log4j.Logger LOG
           
 
Constructor Summary
PostalCodeServiceImpl()
           
 
Method Summary
 PostalCode getByPostalCodeInDefaultCountry(String postalZipCode)
          get the postal code object based on the given postal code and default country code.
 PostalCode getByPostalCodeInDefaultCountryIfNecessary(String postalCode, PostalCode existingPostalCode)
          get the postal code obpostalt based on the given postal code and default country code.
 PostalCode getByPrimaryId(String postalCountryCode, String postalCode)
          get the postal zip code object based on the given postal code and country code
 PostalCode getByPrimaryIdIfNecessary(String postalCountryCode, String postalCode, PostalCode existingPostalCode)
          get the postal code object based on the given postal code and country code.
 void setCountryService(CountryService countryService)
          Sets the countryService attribute value.
 void setKualiModuleService(KualiModuleService kualiModuleService)
          Sets the kualiModuleService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static org.apache.log4j.Logger LOG

countryService

private CountryService countryService

kualiModuleService

private KualiModuleService kualiModuleService
Constructor Detail

PostalCodeServiceImpl

public PostalCodeServiceImpl()
Method Detail

getByPostalCodeInDefaultCountry

public PostalCode getByPostalCodeInDefaultCountry(String postalZipCode)
Description copied from interface: PostalCodeService
get the postal code object based on the given postal code and default country code. The default country code is set up in the system.

Specified by:
getByPostalCodeInDefaultCountry in interface PostalCodeService
Parameters:
postalZipCode - the given postal code
Returns:
the postal code object with the given postal code and default country code.
See Also:
org.kuali.kfs.sys.service.PostalCodeService#getByPrimaryId(java.lang.String)

getByPrimaryId

public PostalCode getByPrimaryId(String postalCountryCode,
                                 String postalCode)
Description copied from interface: PostalCodeService
get the postal zip code object based on the given postal code and country code

Specified by:
getByPrimaryId in interface PostalCodeService
Parameters:
postalCountryCode - the given country code
postalCode - the given postal code
Returns:
the postal code object with the given postal code and country code.
See Also:
org.kuali.kfs.sys.service.PostalCodeService#getByPrimaryId(java.lang.String, java.lang.String)

getByPostalCodeInDefaultCountryIfNecessary

public PostalCode getByPostalCodeInDefaultCountryIfNecessary(String postalCode,
                                                             PostalCode existingPostalCode)
Description copied from interface: PostalCodeService
get the postal code obpostalt based on the given postal code and default country code. The default country code is set up in the system. If the given postal postale is same as that of the given existing postal code, return the existing postal code; otherwise, retrieve a postal code object.

Specified by:
getByPostalCodeInDefaultCountryIfNecessary in interface PostalCodeService
Parameters:
postalCode - the given postal code
existingPostalCode - the given existing postal code
Returns:
the postal code object with the given postal code and default country code if necessary

getByPrimaryIdIfNecessary

public PostalCode getByPrimaryIdIfNecessary(String postalCountryCode,
                                            String postalCode,
                                            PostalCode existingPostalCode)
Description copied from interface: PostalCodeService
get the postal code object based on the given postal code and country code. If the given postal code and country code are same as those of the given existing postal code, return the existing postal code; otherwise, retrieve a postal code object.

Specified by:
getByPrimaryIdIfNecessary in interface PostalCodeService
Parameters:
postalCountryCode - the given country code
postalCode - the given postal code
existingPostalCode - the given existing postal code
Returns:
the postal code object with the given postal code and country code if necessary

setCountryService

public void setCountryService(CountryService countryService)
Sets the countryService attribute value.

Parameters:
countryService - The countryService to set.

setKualiModuleService

public void setKualiModuleService(KualiModuleService kualiModuleService)
Sets the kualiModuleService attribute value.

Parameters:
kualiModuleService - The kualiModuleService to set.


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.