1
14
15 package com.liferay.portlet.shopping.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 ShoppingCategoryLocalServiceUtil {
42 public static com.liferay.portlet.shopping.model.ShoppingCategory addShoppingCategory(
43 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
44 throws com.liferay.portal.SystemException {
45 return getService().addShoppingCategory(shoppingCategory);
46 }
47
48 public static com.liferay.portlet.shopping.model.ShoppingCategory createShoppingCategory(
49 long categoryId) {
50 return getService().createShoppingCategory(categoryId);
51 }
52
53 public static void deleteShoppingCategory(long categoryId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteShoppingCategory(categoryId);
57 }
58
59 public static void deleteShoppingCategory(
60 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
61 throws com.liferay.portal.SystemException {
62 getService().deleteShoppingCategory(shoppingCategory);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.shopping.model.ShoppingCategory getShoppingCategory(
96 long categoryId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getShoppingCategory(categoryId);
100 }
101
102 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getShoppingCategories(
103 int start, int end) throws com.liferay.portal.SystemException {
104 return getService().getShoppingCategories(start, end);
105 }
106
107 public static int getShoppingCategoriesCount()
108 throws com.liferay.portal.SystemException {
109 return getService().getShoppingCategoriesCount();
110 }
111
112 public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
113 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
114 throws com.liferay.portal.SystemException {
115 return getService().updateShoppingCategory(shoppingCategory);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
119 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
120 boolean merge) throws com.liferay.portal.SystemException {
121 return getService().updateShoppingCategory(shoppingCategory, merge);
122 }
123
124 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
125 long userId, long parentCategoryId, java.lang.String name,
126 java.lang.String description,
127 com.liferay.portal.service.ServiceContext serviceContext)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 return getService()
131 .addCategory(userId, parentCategoryId, name, description,
132 serviceContext);
133 }
134
135 public static void addCategoryResources(long categoryId,
136 boolean addCommunityPermissions, boolean addGuestPermissions)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException {
139 getService()
140 .addCategoryResources(categoryId, addCommunityPermissions,
141 addGuestPermissions);
142 }
143
144 public static void addCategoryResources(long categoryId,
145 java.lang.String[] communityPermissions,
146 java.lang.String[] guestPermissions)
147 throws com.liferay.portal.PortalException,
148 com.liferay.portal.SystemException {
149 getService()
150 .addCategoryResources(categoryId, communityPermissions,
151 guestPermissions);
152 }
153
154 public static void addCategoryResources(
155 com.liferay.portlet.shopping.model.ShoppingCategory category,
156 boolean addCommunityPermissions, boolean addGuestPermissions)
157 throws com.liferay.portal.PortalException,
158 com.liferay.portal.SystemException {
159 getService()
160 .addCategoryResources(category, addCommunityPermissions,
161 addGuestPermissions);
162 }
163
164 public static void addCategoryResources(
165 com.liferay.portlet.shopping.model.ShoppingCategory category,
166 java.lang.String[] communityPermissions,
167 java.lang.String[] guestPermissions)
168 throws com.liferay.portal.PortalException,
169 com.liferay.portal.SystemException {
170 getService()
171 .addCategoryResources(category, communityPermissions,
172 guestPermissions);
173 }
174
175 public static void deleteCategories(long groupId)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 getService().deleteCategories(groupId);
179 }
180
181 public static void deleteCategory(long categoryId)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException {
184 getService().deleteCategory(categoryId);
185 }
186
187 public static void deleteCategory(
188 com.liferay.portlet.shopping.model.ShoppingCategory category)
189 throws com.liferay.portal.PortalException,
190 com.liferay.portal.SystemException {
191 getService().deleteCategory(category);
192 }
193
194 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
195 long groupId) throws com.liferay.portal.SystemException {
196 return getService().getCategories(groupId);
197 }
198
199 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
200 long groupId, long parentCategoryId, int start, int end)
201 throws com.liferay.portal.SystemException {
202 return getService().getCategories(groupId, parentCategoryId, start, end);
203 }
204
205 public static int getCategoriesCount(long groupId, long parentCategoryId)
206 throws com.liferay.portal.SystemException {
207 return getService().getCategoriesCount(groupId, parentCategoryId);
208 }
209
210 public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
211 long categoryId)
212 throws com.liferay.portal.PortalException,
213 com.liferay.portal.SystemException {
214 return getService().getCategory(categoryId);
215 }
216
217 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
218 long categoryId)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException {
221 return getService().getParentCategories(categoryId);
222 }
223
224 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
225 com.liferay.portlet.shopping.model.ShoppingCategory category)
226 throws com.liferay.portal.PortalException,
227 com.liferay.portal.SystemException {
228 return getService().getParentCategories(category);
229 }
230
231 public static com.liferay.portlet.shopping.model.ShoppingCategory getParentCategory(
232 com.liferay.portlet.shopping.model.ShoppingCategory category)
233 throws com.liferay.portal.PortalException,
234 com.liferay.portal.SystemException {
235 return getService().getParentCategory(category);
236 }
237
238 public static void getSubcategoryIds(
239 java.util.List<java.lang.Long> categoryIds, long groupId,
240 long categoryId) throws com.liferay.portal.SystemException {
241 getService().getSubcategoryIds(categoryIds, groupId, categoryId);
242 }
243
244 public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
245 long categoryId, long parentCategoryId, java.lang.String name,
246 java.lang.String description, boolean mergeWithParentCategory,
247 com.liferay.portal.service.ServiceContext serviceContext)
248 throws com.liferay.portal.PortalException,
249 com.liferay.portal.SystemException {
250 return getService()
251 .updateCategory(categoryId, parentCategoryId, name,
252 description, mergeWithParentCategory, serviceContext);
253 }
254
255 public static ShoppingCategoryLocalService getService() {
256 if (_service == null) {
257 _service = (ShoppingCategoryLocalService)PortalBeanLocatorUtil.locate(ShoppingCategoryLocalService.class.getName());
258
259 ReferenceRegistry.registerReference(ShoppingCategoryLocalServiceUtil.class,
260 "_service");
261 MethodCache.remove(ShoppingCategoryLocalService.class);
262 }
263
264 return _service;
265 }
266
267 public void setService(ShoppingCategoryLocalService service) {
268 MethodCache.remove(ShoppingCategoryLocalService.class);
269
270 _service = service;
271
272 ReferenceRegistry.registerReference(ShoppingCategoryLocalServiceUtil.class,
273 "_service");
274 MethodCache.remove(ShoppingCategoryLocalService.class);
275 }
276
277 private static ShoppingCategoryLocalService _service;
278 }