001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class AddressServiceUtil {
035
040
041
046 public static java.lang.String getBeanIdentifier() {
047 return getService().getBeanIdentifier();
048 }
049
050
055 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056 getService().setBeanIdentifier(beanIdentifier);
057 }
058
059
064 public static com.liferay.portal.model.Address addAddress(
065 java.lang.String className, long classPK, java.lang.String street1,
066 java.lang.String street2, java.lang.String street3,
067 java.lang.String city, java.lang.String zip, long regionId,
068 long countryId, int typeId, boolean mailing, boolean primary)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 return getService()
072 .addAddress(className, classPK, street1, street2, street3,
073 city, zip, regionId, countryId, typeId, mailing, primary);
074 }
075
076 public static com.liferay.portal.model.Address addAddress(
077 java.lang.String className, long classPK, java.lang.String street1,
078 java.lang.String street2, java.lang.String street3,
079 java.lang.String city, java.lang.String zip, long regionId,
080 long countryId, int typeId, boolean mailing, boolean primary,
081 com.liferay.portal.service.ServiceContext serviceContext)
082 throws com.liferay.portal.kernel.exception.PortalException,
083 com.liferay.portal.kernel.exception.SystemException {
084 return getService()
085 .addAddress(className, classPK, street1, street2, street3,
086 city, zip, regionId, countryId, typeId, mailing, primary,
087 serviceContext);
088 }
089
090 public static void deleteAddress(long addressId)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException {
093 getService().deleteAddress(addressId);
094 }
095
096 public static com.liferay.portal.model.Address getAddress(long addressId)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 return getService().getAddress(addressId);
100 }
101
102 public static java.util.List<com.liferay.portal.model.Address> getAddresses(
103 java.lang.String className, long classPK)
104 throws com.liferay.portal.kernel.exception.PortalException,
105 com.liferay.portal.kernel.exception.SystemException {
106 return getService().getAddresses(className, classPK);
107 }
108
109 public static com.liferay.portal.model.Address updateAddress(
110 long addressId, java.lang.String street1, java.lang.String street2,
111 java.lang.String street3, java.lang.String city, java.lang.String zip,
112 long regionId, long countryId, int typeId, boolean mailing,
113 boolean primary)
114 throws com.liferay.portal.kernel.exception.PortalException,
115 com.liferay.portal.kernel.exception.SystemException {
116 return getService()
117 .updateAddress(addressId, street1, street2, street3, city,
118 zip, regionId, countryId, typeId, mailing, primary);
119 }
120
121 public static AddressService getService() {
122 if (_service == null) {
123 _service = (AddressService)PortalBeanLocatorUtil.locate(AddressService.class.getName());
124
125 ReferenceRegistry.registerReference(AddressServiceUtil.class,
126 "_service");
127 }
128
129 return _service;
130 }
131
132
135 public void setService(AddressService service) {
136 }
137
138 private static AddressService _service;
139 }