001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service;
022:
023: /**
024: * <a href="ShoppingCategoryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.shopping.service.ShoppingCategoryLocalService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.shopping.service.ShoppingCategoryLocalServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.shopping.service.ShoppingCategoryLocalService
047: * @see com.liferay.portlet.shopping.service.ShoppingCategoryLocalServiceFactory
048: *
049: */
050: public class ShoppingCategoryLocalServiceUtil {
051: public static com.liferay.portlet.shopping.model.ShoppingCategory addShoppingCategory(
052: com.liferay.portlet.shopping.model.ShoppingCategory model)
053: throws com.liferay.portal.SystemException {
054: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
055: .getService();
056:
057: return shoppingCategoryLocalService.addShoppingCategory(model);
058: }
059:
060: public static java.util.List dynamicQuery(
061: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
062: throws com.liferay.portal.SystemException {
063: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
064: .getService();
065:
066: return shoppingCategoryLocalService
067: .dynamicQuery(queryInitializer);
068: }
069:
070: public static java.util.List dynamicQuery(
071: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
072: int begin, int end)
073: throws com.liferay.portal.SystemException {
074: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
075: .getService();
076:
077: return shoppingCategoryLocalService.dynamicQuery(
078: queryInitializer, begin, end);
079: }
080:
081: public static com.liferay.portlet.shopping.model.ShoppingCategory updateShoppingCategory(
082: com.liferay.portlet.shopping.model.ShoppingCategory model)
083: throws com.liferay.portal.SystemException {
084: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
085: .getService();
086:
087: return shoppingCategoryLocalService
088: .updateShoppingCategory(model);
089: }
090:
091: public static com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence getShoppingCartPersistence() {
092: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
093: .getService();
094:
095: return shoppingCategoryLocalService
096: .getShoppingCartPersistence();
097: }
098:
099: public static void setShoppingCartPersistence(
100: com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence shoppingCartPersistence) {
101: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
102: .getService();
103:
104: shoppingCategoryLocalService
105: .setShoppingCartPersistence(shoppingCartPersistence);
106: }
107:
108: public static com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence getShoppingCategoryPersistence() {
109: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
110: .getService();
111:
112: return shoppingCategoryLocalService
113: .getShoppingCategoryPersistence();
114: }
115:
116: public static void setShoppingCategoryPersistence(
117: com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence shoppingCategoryPersistence) {
118: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
119: .getService();
120:
121: shoppingCategoryLocalService
122: .setShoppingCategoryPersistence(shoppingCategoryPersistence);
123: }
124:
125: public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence getShoppingCouponPersistence() {
126: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
127: .getService();
128:
129: return shoppingCategoryLocalService
130: .getShoppingCouponPersistence();
131: }
132:
133: public static void setShoppingCouponPersistence(
134: com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence shoppingCouponPersistence) {
135: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
136: .getService();
137:
138: shoppingCategoryLocalService
139: .setShoppingCouponPersistence(shoppingCouponPersistence);
140: }
141:
142: public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder getShoppingCouponFinder() {
143: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
144: .getService();
145:
146: return shoppingCategoryLocalService.getShoppingCouponFinder();
147: }
148:
149: public static void setShoppingCouponFinder(
150: com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder shoppingCouponFinder) {
151: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
152: .getService();
153:
154: shoppingCategoryLocalService
155: .setShoppingCouponFinder(shoppingCouponFinder);
156: }
157:
158: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence getShoppingItemPersistence() {
159: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
160: .getService();
161:
162: return shoppingCategoryLocalService
163: .getShoppingItemPersistence();
164: }
165:
166: public static void setShoppingItemPersistence(
167: com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence shoppingItemPersistence) {
168: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
169: .getService();
170:
171: shoppingCategoryLocalService
172: .setShoppingItemPersistence(shoppingItemPersistence);
173: }
174:
175: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder getShoppingItemFinder() {
176: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
177: .getService();
178:
179: return shoppingCategoryLocalService.getShoppingItemFinder();
180: }
181:
182: public static void setShoppingItemFinder(
183: com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder shoppingItemFinder) {
184: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
185: .getService();
186:
187: shoppingCategoryLocalService
188: .setShoppingItemFinder(shoppingItemFinder);
189: }
190:
191: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
192: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
193: .getService();
194:
195: return shoppingCategoryLocalService
196: .getShoppingItemFieldPersistence();
197: }
198:
199: public static void setShoppingItemFieldPersistence(
200: com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
201: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
202: .getService();
203:
204: shoppingCategoryLocalService
205: .setShoppingItemFieldPersistence(shoppingItemFieldPersistence);
206: }
207:
208: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence getShoppingItemPricePersistence() {
209: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
210: .getService();
211:
212: return shoppingCategoryLocalService
213: .getShoppingItemPricePersistence();
214: }
215:
216: public static void setShoppingItemPricePersistence(
217: com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence shoppingItemPricePersistence) {
218: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
219: .getService();
220:
221: shoppingCategoryLocalService
222: .setShoppingItemPricePersistence(shoppingItemPricePersistence);
223: }
224:
225: public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence getShoppingOrderPersistence() {
226: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
227: .getService();
228:
229: return shoppingCategoryLocalService
230: .getShoppingOrderPersistence();
231: }
232:
233: public static void setShoppingOrderPersistence(
234: com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence shoppingOrderPersistence) {
235: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
236: .getService();
237:
238: shoppingCategoryLocalService
239: .setShoppingOrderPersistence(shoppingOrderPersistence);
240: }
241:
242: public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder getShoppingOrderFinder() {
243: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
244: .getService();
245:
246: return shoppingCategoryLocalService.getShoppingOrderFinder();
247: }
248:
249: public static void setShoppingOrderFinder(
250: com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder shoppingOrderFinder) {
251: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
252: .getService();
253:
254: shoppingCategoryLocalService
255: .setShoppingOrderFinder(shoppingOrderFinder);
256: }
257:
258: public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
259: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
260: .getService();
261:
262: return shoppingCategoryLocalService
263: .getShoppingOrderItemPersistence();
264: }
265:
266: public static void setShoppingOrderItemPersistence(
267: com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
268: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
269: .getService();
270:
271: shoppingCategoryLocalService
272: .setShoppingOrderItemPersistence(shoppingOrderItemPersistence);
273: }
274:
275: public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
276: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
277: .getService();
278:
279: return shoppingCategoryLocalService.getResourcePersistence();
280: }
281:
282: public static void setResourcePersistence(
283: com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
284: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
285: .getService();
286:
287: shoppingCategoryLocalService
288: .setResourcePersistence(resourcePersistence);
289: }
290:
291: public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
292: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
293: .getService();
294:
295: return shoppingCategoryLocalService.getResourceFinder();
296: }
297:
298: public static void setResourceFinder(
299: com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
300: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
301: .getService();
302:
303: shoppingCategoryLocalService.setResourceFinder(resourceFinder);
304: }
305:
306: public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
307: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
308: .getService();
309:
310: return shoppingCategoryLocalService.getUserPersistence();
311: }
312:
313: public static void setUserPersistence(
314: com.liferay.portal.service.persistence.UserPersistence userPersistence) {
315: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
316: .getService();
317:
318: shoppingCategoryLocalService
319: .setUserPersistence(userPersistence);
320: }
321:
322: public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
323: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
324: .getService();
325:
326: return shoppingCategoryLocalService.getUserFinder();
327: }
328:
329: public static void setUserFinder(
330: com.liferay.portal.service.persistence.UserFinder userFinder) {
331: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
332: .getService();
333:
334: shoppingCategoryLocalService.setUserFinder(userFinder);
335: }
336:
337: public static void afterPropertiesSet() {
338: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
339: .getService();
340:
341: shoppingCategoryLocalService.afterPropertiesSet();
342: }
343:
344: public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
345: long userId, long plid, long parentCategoryId,
346: java.lang.String name, java.lang.String description,
347: boolean addCommunityPermissions, boolean addGuestPermissions)
348: throws com.liferay.portal.PortalException,
349: com.liferay.portal.SystemException {
350: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
351: .getService();
352:
353: return shoppingCategoryLocalService.addCategory(userId, plid,
354: parentCategoryId, name, description,
355: addCommunityPermissions, addGuestPermissions);
356: }
357:
358: public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
359: long userId, long plid, long parentCategoryId,
360: java.lang.String name, java.lang.String description,
361: java.lang.String[] communityPermissions,
362: java.lang.String[] guestPermissions)
363: throws com.liferay.portal.PortalException,
364: com.liferay.portal.SystemException {
365: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
366: .getService();
367:
368: return shoppingCategoryLocalService.addCategory(userId, plid,
369: parentCategoryId, name, description,
370: communityPermissions, guestPermissions);
371: }
372:
373: public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
374: long userId, long plid, long parentCategoryId,
375: java.lang.String name, java.lang.String description,
376: java.lang.Boolean addCommunityPermissions,
377: java.lang.Boolean addGuestPermissions,
378: java.lang.String[] communityPermissions,
379: java.lang.String[] guestPermissions)
380: throws com.liferay.portal.PortalException,
381: com.liferay.portal.SystemException {
382: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
383: .getService();
384:
385: return shoppingCategoryLocalService.addCategory(userId, plid,
386: parentCategoryId, name, description,
387: addCommunityPermissions, addGuestPermissions,
388: communityPermissions, guestPermissions);
389: }
390:
391: public static void addCategoryResources(long categoryId,
392: boolean addCommunityPermissions, boolean addGuestPermissions)
393: throws com.liferay.portal.PortalException,
394: com.liferay.portal.SystemException {
395: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
396: .getService();
397:
398: shoppingCategoryLocalService.addCategoryResources(categoryId,
399: addCommunityPermissions, addGuestPermissions);
400: }
401:
402: public static void addCategoryResources(
403: com.liferay.portlet.shopping.model.ShoppingCategory category,
404: boolean addCommunityPermissions, boolean addGuestPermissions)
405: throws com.liferay.portal.PortalException,
406: com.liferay.portal.SystemException {
407: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
408: .getService();
409:
410: shoppingCategoryLocalService.addCategoryResources(category,
411: addCommunityPermissions, addGuestPermissions);
412: }
413:
414: public static void addCategoryResources(long categoryId,
415: java.lang.String[] communityPermissions,
416: java.lang.String[] guestPermissions)
417: throws com.liferay.portal.PortalException,
418: com.liferay.portal.SystemException {
419: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
420: .getService();
421:
422: shoppingCategoryLocalService.addCategoryResources(categoryId,
423: communityPermissions, guestPermissions);
424: }
425:
426: public static void addCategoryResources(
427: com.liferay.portlet.shopping.model.ShoppingCategory category,
428: java.lang.String[] communityPermissions,
429: java.lang.String[] guestPermissions)
430: throws com.liferay.portal.PortalException,
431: com.liferay.portal.SystemException {
432: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
433: .getService();
434:
435: shoppingCategoryLocalService.addCategoryResources(category,
436: communityPermissions, guestPermissions);
437: }
438:
439: public static void deleteCategories(long groupId)
440: throws com.liferay.portal.PortalException,
441: com.liferay.portal.SystemException {
442: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
443: .getService();
444:
445: shoppingCategoryLocalService.deleteCategories(groupId);
446: }
447:
448: public static void deleteCategory(long categoryId)
449: throws com.liferay.portal.PortalException,
450: com.liferay.portal.SystemException {
451: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
452: .getService();
453:
454: shoppingCategoryLocalService.deleteCategory(categoryId);
455: }
456:
457: public static void deleteCategory(
458: com.liferay.portlet.shopping.model.ShoppingCategory category)
459: throws com.liferay.portal.PortalException,
460: com.liferay.portal.SystemException {
461: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
462: .getService();
463:
464: shoppingCategoryLocalService.deleteCategory(category);
465: }
466:
467: public static java.util.List getCategories(long groupId)
468: throws com.liferay.portal.SystemException {
469: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
470: .getService();
471:
472: return shoppingCategoryLocalService.getCategories(groupId);
473: }
474:
475: public static java.util.List getCategories(long groupId,
476: long parentCategoryId, int begin, int end)
477: throws com.liferay.portal.SystemException {
478: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
479: .getService();
480:
481: return shoppingCategoryLocalService.getCategories(groupId,
482: parentCategoryId, begin, end);
483: }
484:
485: public static int getCategoriesCount(long groupId,
486: long parentCategoryId)
487: throws com.liferay.portal.SystemException {
488: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
489: .getService();
490:
491: return shoppingCategoryLocalService.getCategoriesCount(groupId,
492: parentCategoryId);
493: }
494:
495: public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
496: long categoryId) throws com.liferay.portal.PortalException,
497: com.liferay.portal.SystemException {
498: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
499: .getService();
500:
501: return shoppingCategoryLocalService.getCategory(categoryId);
502: }
503:
504: public static com.liferay.portlet.shopping.model.ShoppingCategory getParentCategory(
505: com.liferay.portlet.shopping.model.ShoppingCategory category)
506: throws com.liferay.portal.PortalException,
507: com.liferay.portal.SystemException {
508: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
509: .getService();
510:
511: return shoppingCategoryLocalService.getParentCategory(category);
512: }
513:
514: public static java.util.List getParentCategories(long categoryId)
515: throws com.liferay.portal.PortalException,
516: com.liferay.portal.SystemException {
517: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
518: .getService();
519:
520: return shoppingCategoryLocalService
521: .getParentCategories(categoryId);
522: }
523:
524: public static java.util.List getParentCategories(
525: com.liferay.portlet.shopping.model.ShoppingCategory category)
526: throws com.liferay.portal.PortalException,
527: com.liferay.portal.SystemException {
528: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
529: .getService();
530:
531: return shoppingCategoryLocalService
532: .getParentCategories(category);
533: }
534:
535: public static void getSubcategoryIds(java.util.List categoryIds,
536: long groupId, long categoryId)
537: throws com.liferay.portal.SystemException {
538: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
539: .getService();
540:
541: shoppingCategoryLocalService.getSubcategoryIds(categoryIds,
542: groupId, categoryId);
543: }
544:
545: public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
546: long categoryId, long parentCategoryId,
547: java.lang.String name, java.lang.String description,
548: boolean mergeWithParentCategory)
549: throws com.liferay.portal.PortalException,
550: com.liferay.portal.SystemException {
551: ShoppingCategoryLocalService shoppingCategoryLocalService = ShoppingCategoryLocalServiceFactory
552: .getService();
553:
554: return shoppingCategoryLocalService.updateCategory(categoryId,
555: parentCategoryId, name, description,
556: mergeWithParentCategory);
557: }
558: }
|