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