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