1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class AddressLocalServiceUtil {
42 public static com.liferay.portal.model.Address addAddress(
43 com.liferay.portal.model.Address address)
44 throws com.liferay.portal.SystemException {
45 return getService().addAddress(address);
46 }
47
48 public static com.liferay.portal.model.Address createAddress(long addressId) {
49 return getService().createAddress(addressId);
50 }
51
52 public static void deleteAddress(long addressId)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 getService().deleteAddress(addressId);
56 }
57
58 public static void deleteAddress(com.liferay.portal.model.Address address)
59 throws com.liferay.portal.SystemException {
60 getService().deleteAddress(address);
61 }
62
63 @SuppressWarnings("rawtypes")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("rawtypes")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("rawtypes")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static int dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portal.model.Address getAddress(long addressId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getAddress(addressId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Address> getAddresses(
100 int start, int end) throws com.liferay.portal.SystemException {
101 return getService().getAddresses(start, end);
102 }
103
104 public static int getAddressesCount()
105 throws com.liferay.portal.SystemException {
106 return getService().getAddressesCount();
107 }
108
109 public static com.liferay.portal.model.Address updateAddress(
110 com.liferay.portal.model.Address address)
111 throws com.liferay.portal.SystemException {
112 return getService().updateAddress(address);
113 }
114
115 public static com.liferay.portal.model.Address updateAddress(
116 com.liferay.portal.model.Address address, boolean merge)
117 throws com.liferay.portal.SystemException {
118 return getService().updateAddress(address, merge);
119 }
120
121 public static com.liferay.portal.model.Address addAddress(long userId,
122 java.lang.String className, long classPK, java.lang.String street1,
123 java.lang.String street2, java.lang.String street3,
124 java.lang.String city, java.lang.String zip, long regionId,
125 long countryId, int typeId, boolean mailing, boolean primary)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 return getService()
129 .addAddress(userId, className, classPK, street1, street2,
130 street3, city, zip, regionId, countryId, typeId, mailing, primary);
131 }
132
133 public static void deleteAddresses(long companyId,
134 java.lang.String className, long classPK)
135 throws com.liferay.portal.SystemException {
136 getService().deleteAddresses(companyId, className, classPK);
137 }
138
139 public static java.util.List<com.liferay.portal.model.Address> getAddresses()
140 throws com.liferay.portal.SystemException {
141 return getService().getAddresses();
142 }
143
144 public static java.util.List<com.liferay.portal.model.Address> getAddresses(
145 long companyId, java.lang.String className, long classPK)
146 throws com.liferay.portal.SystemException {
147 return getService().getAddresses(companyId, className, classPK);
148 }
149
150 public static com.liferay.portal.model.Address updateAddress(
151 long addressId, java.lang.String street1, java.lang.String street2,
152 java.lang.String street3, java.lang.String city, java.lang.String zip,
153 long regionId, long countryId, int typeId, boolean mailing,
154 boolean primary)
155 throws com.liferay.portal.PortalException,
156 com.liferay.portal.SystemException {
157 return getService()
158 .updateAddress(addressId, street1, street2, street3, city,
159 zip, regionId, countryId, typeId, mailing, primary);
160 }
161
162 public static AddressLocalService getService() {
163 if (_service == null) {
164 _service = (AddressLocalService)PortalBeanLocatorUtil.locate(AddressLocalService.class.getName());
165
166 ReferenceRegistry.registerReference(AddressLocalServiceUtil.class,
167 "_service");
168 MethodCache.remove(AddressLocalService.class);
169 }
170
171 return _service;
172 }
173
174 public void setService(AddressLocalService service) {
175 MethodCache.remove(AddressLocalService.class);
176
177 _service = service;
178
179 ReferenceRegistry.registerReference(AddressLocalServiceUtil.class,
180 "_service");
181 MethodCache.remove(AddressLocalService.class);
182 }
183
184 private static AddressLocalService _service;
185 }