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.kernel.exception.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.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.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.kernel.exception.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.kernel.exception.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.kernel.exception.SystemException {
72 return getService().dynamicQuery(dynamicQuery, start, end);
73 }
74
75 public static com.liferay.portlet.shopping.model.ShoppingCategory getShoppingCategory(
76 long categoryId)
77 throws com.liferay.portal.kernel.exception.PortalException,
78 com.liferay.portal.kernel.exception.SystemException {
79 return getService().getShoppingCategory(categoryId);
80 }
81
82 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getShoppingCategories(
83 int start, int end)
84 throws com.liferay.portal.kernel.exception.SystemException {
85 return getService().getShoppingCategories(start, end);
86 }
87
88 public static int getShoppingCategoriesCount()
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().getShoppingCategoriesCount();
91 }
92
93 public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
94 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
95 throws com.liferay.portal.kernel.exception.SystemException {
96 return getService().updateShoppingCategory(shoppingCategory);
97 }
98
99 public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
100 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
101 boolean merge)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().updateShoppingCategory(shoppingCategory, merge);
104 }
105
106 public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
107 long userId, long parentCategoryId, java.lang.String name,
108 java.lang.String description,
109 com.liferay.portal.service.ServiceContext serviceContext)
110 throws com.liferay.portal.kernel.exception.PortalException,
111 com.liferay.portal.kernel.exception.SystemException {
112 return getService()
113 .addCategory(userId, parentCategoryId, name, description,
114 serviceContext);
115 }
116
117 public static void addCategoryResources(long categoryId,
118 boolean addCommunityPermissions, boolean addGuestPermissions)
119 throws com.liferay.portal.kernel.exception.PortalException,
120 com.liferay.portal.kernel.exception.SystemException {
121 getService()
122 .addCategoryResources(categoryId, addCommunityPermissions,
123 addGuestPermissions);
124 }
125
126 public static void addCategoryResources(long categoryId,
127 java.lang.String[] communityPermissions,
128 java.lang.String[] guestPermissions)
129 throws com.liferay.portal.kernel.exception.PortalException,
130 com.liferay.portal.kernel.exception.SystemException {
131 getService()
132 .addCategoryResources(categoryId, communityPermissions,
133 guestPermissions);
134 }
135
136 public static void addCategoryResources(
137 com.liferay.portlet.shopping.model.ShoppingCategory category,
138 boolean addCommunityPermissions, boolean addGuestPermissions)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 getService()
142 .addCategoryResources(category, addCommunityPermissions,
143 addGuestPermissions);
144 }
145
146 public static void addCategoryResources(
147 com.liferay.portlet.shopping.model.ShoppingCategory category,
148 java.lang.String[] communityPermissions,
149 java.lang.String[] guestPermissions)
150 throws com.liferay.portal.kernel.exception.PortalException,
151 com.liferay.portal.kernel.exception.SystemException {
152 getService()
153 .addCategoryResources(category, communityPermissions,
154 guestPermissions);
155 }
156
157 public static void deleteCategories(long groupId)
158 throws com.liferay.portal.kernel.exception.PortalException,
159 com.liferay.portal.kernel.exception.SystemException {
160 getService().deleteCategories(groupId);
161 }
162
163 public static void deleteCategory(long categoryId)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 getService().deleteCategory(categoryId);
167 }
168
169 public static void deleteCategory(
170 com.liferay.portlet.shopping.model.ShoppingCategory category)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 getService().deleteCategory(category);
174 }
175
176 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
177 long groupId)
178 throws com.liferay.portal.kernel.exception.SystemException {
179 return getService().getCategories(groupId);
180 }
181
182 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getCategories(
183 long groupId, long parentCategoryId, int start, int end)
184 throws com.liferay.portal.kernel.exception.SystemException {
185 return getService().getCategories(groupId, parentCategoryId, start, end);
186 }
187
188 public static int getCategoriesCount(long groupId, long parentCategoryId)
189 throws com.liferay.portal.kernel.exception.SystemException {
190 return getService().getCategoriesCount(groupId, parentCategoryId);
191 }
192
193 public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
194 long categoryId)
195 throws com.liferay.portal.kernel.exception.PortalException,
196 com.liferay.portal.kernel.exception.SystemException {
197 return getService().getCategory(categoryId);
198 }
199
200 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
201 long categoryId)
202 throws com.liferay.portal.kernel.exception.PortalException,
203 com.liferay.portal.kernel.exception.SystemException {
204 return getService().getParentCategories(categoryId);
205 }
206
207 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> getParentCategories(
208 com.liferay.portlet.shopping.model.ShoppingCategory category)
209 throws com.liferay.portal.kernel.exception.PortalException,
210 com.liferay.portal.kernel.exception.SystemException {
211 return getService().getParentCategories(category);
212 }
213
214 public static com.liferay.portlet.shopping.model.ShoppingCategory getParentCategory(
215 com.liferay.portlet.shopping.model.ShoppingCategory category)
216 throws com.liferay.portal.kernel.exception.PortalException,
217 com.liferay.portal.kernel.exception.SystemException {
218 return getService().getParentCategory(category);
219 }
220
221 public static void getSubcategoryIds(java.util.List<Long> categoryIds,
222 long groupId, long categoryId)
223 throws com.liferay.portal.kernel.exception.SystemException {
224 getService().getSubcategoryIds(categoryIds, groupId, categoryId);
225 }
226
227 public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
228 long categoryId, long parentCategoryId, java.lang.String name,
229 java.lang.String description, boolean mergeWithParentCategory,
230 com.liferay.portal.service.ServiceContext serviceContext)
231 throws com.liferay.portal.kernel.exception.PortalException,
232 com.liferay.portal.kernel.exception.SystemException {
233 return getService()
234 .updateCategory(categoryId, parentCategoryId, name,
235 description, mergeWithParentCategory, serviceContext);
236 }
237
238 public static ShoppingCategoryLocalService getService() {
239 if (_service == null) {
240 _service = (ShoppingCategoryLocalService)PortalBeanLocatorUtil.locate(ShoppingCategoryLocalService.class.getName());
241 }
242
243 return _service;
244 }
245
246 public void setService(ShoppingCategoryLocalService service) {
247 _service = service;
248 }
249
250 private static ShoppingCategoryLocalService _service;
251 }