001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class AddressServiceUtil {
033 public static com.liferay.portal.model.Address addAddress(
034 java.lang.String className, long classPK, java.lang.String street1,
035 java.lang.String street2, java.lang.String street3,
036 java.lang.String city, java.lang.String zip, long regionId,
037 long countryId, int typeId, boolean mailing, boolean primary)
038 throws com.liferay.portal.kernel.exception.PortalException,
039 com.liferay.portal.kernel.exception.SystemException {
040 return getService()
041 .addAddress(className, classPK, street1, street2, street3,
042 city, zip, regionId, countryId, typeId, mailing, primary);
043 }
044
045 public static void deleteAddress(long addressId)
046 throws com.liferay.portal.kernel.exception.PortalException,
047 com.liferay.portal.kernel.exception.SystemException {
048 getService().deleteAddress(addressId);
049 }
050
051 public static com.liferay.portal.model.Address getAddress(long addressId)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException {
054 return getService().getAddress(addressId);
055 }
056
057 public static java.util.List<com.liferay.portal.model.Address> getAddresses(
058 java.lang.String className, long classPK)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 return getService().getAddresses(className, classPK);
062 }
063
064 public static com.liferay.portal.model.Address updateAddress(
065 long addressId, java.lang.String street1, java.lang.String street2,
066 java.lang.String street3, java.lang.String city, java.lang.String zip,
067 long regionId, long countryId, int typeId, boolean mailing,
068 boolean primary)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 return getService()
072 .updateAddress(addressId, street1, street2, street3, city,
073 zip, regionId, countryId, typeId, mailing, primary);
074 }
075
076 public static AddressService getService() {
077 if (_service == null) {
078 _service = (AddressService)PortalBeanLocatorUtil.locate(AddressService.class.getName());
079 }
080
081 return _service;
082 }
083
084 public void setService(AddressService service) {
085 _service = service;
086 }
087
088 private static AddressService _service;
089 }