001
014
015 package com.liferay.portlet.bookmarks.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.GroupLocalService;
027 import com.liferay.portal.service.GroupService;
028 import com.liferay.portal.service.ResourceLocalService;
029 import com.liferay.portal.service.ResourceService;
030 import com.liferay.portal.service.UserLocalService;
031 import com.liferay.portal.service.UserService;
032 import com.liferay.portal.service.persistence.GroupFinder;
033 import com.liferay.portal.service.persistence.GroupPersistence;
034 import com.liferay.portal.service.persistence.ResourceFinder;
035 import com.liferay.portal.service.persistence.ResourcePersistence;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.bookmarks.model.BookmarksFolder;
040 import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
041 import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
042 import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
043 import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
044 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
045 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
046 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
047 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
048 import com.liferay.portlet.expando.service.ExpandoValueService;
049 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
050
051 import java.util.List;
052
053 import javax.sql.DataSource;
054
055
071 public abstract class BookmarksFolderLocalServiceBaseImpl
072 implements BookmarksFolderLocalService {
073
080 public BookmarksFolder addBookmarksFolder(BookmarksFolder bookmarksFolder)
081 throws SystemException {
082 bookmarksFolder.setNew(true);
083
084 return bookmarksFolderPersistence.update(bookmarksFolder, false);
085 }
086
087
093 public BookmarksFolder createBookmarksFolder(long folderId) {
094 return bookmarksFolderPersistence.create(folderId);
095 }
096
097
104 public void deleteBookmarksFolder(long folderId)
105 throws PortalException, SystemException {
106 bookmarksFolderPersistence.remove(folderId);
107 }
108
109
115 public void deleteBookmarksFolder(BookmarksFolder bookmarksFolder)
116 throws SystemException {
117 bookmarksFolderPersistence.remove(bookmarksFolder);
118 }
119
120
127 @SuppressWarnings("rawtypes")
128 public List dynamicQuery(DynamicQuery dynamicQuery)
129 throws SystemException {
130 return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery);
131 }
132
133
146 @SuppressWarnings("rawtypes")
147 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
148 throws SystemException {
149 return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
150 start, end);
151 }
152
153
167 @SuppressWarnings("rawtypes")
168 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
169 OrderByComparator orderByComparator) throws SystemException {
170 return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
171 start, end, orderByComparator);
172 }
173
174
181 public long dynamicQueryCount(DynamicQuery dynamicQuery)
182 throws SystemException {
183 return bookmarksFolderPersistence.countWithDynamicQuery(dynamicQuery);
184 }
185
186
194 public BookmarksFolder getBookmarksFolder(long folderId)
195 throws PortalException, SystemException {
196 return bookmarksFolderPersistence.findByPrimaryKey(folderId);
197 }
198
199
208 public BookmarksFolder getBookmarksFolderByUuidAndGroupId(String uuid,
209 long groupId) throws PortalException, SystemException {
210 return bookmarksFolderPersistence.findByUUID_G(uuid, groupId);
211 }
212
213
225 public List<BookmarksFolder> getBookmarksFolders(int start, int end)
226 throws SystemException {
227 return bookmarksFolderPersistence.findAll(start, end);
228 }
229
230
236 public int getBookmarksFoldersCount() throws SystemException {
237 return bookmarksFolderPersistence.countAll();
238 }
239
240
247 public BookmarksFolder updateBookmarksFolder(
248 BookmarksFolder bookmarksFolder) throws SystemException {
249 bookmarksFolder.setNew(false);
250
251 return bookmarksFolderPersistence.update(bookmarksFolder, true);
252 }
253
254
262 public BookmarksFolder updateBookmarksFolder(
263 BookmarksFolder bookmarksFolder, boolean merge)
264 throws SystemException {
265 bookmarksFolder.setNew(false);
266
267 return bookmarksFolderPersistence.update(bookmarksFolder, merge);
268 }
269
270
275 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
276 return bookmarksEntryLocalService;
277 }
278
279
284 public void setBookmarksEntryLocalService(
285 BookmarksEntryLocalService bookmarksEntryLocalService) {
286 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
287 }
288
289
294 public BookmarksEntryService getBookmarksEntryService() {
295 return bookmarksEntryService;
296 }
297
298
303 public void setBookmarksEntryService(
304 BookmarksEntryService bookmarksEntryService) {
305 this.bookmarksEntryService = bookmarksEntryService;
306 }
307
308
313 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
314 return bookmarksEntryPersistence;
315 }
316
317
322 public void setBookmarksEntryPersistence(
323 BookmarksEntryPersistence bookmarksEntryPersistence) {
324 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
325 }
326
327
332 public BookmarksEntryFinder getBookmarksEntryFinder() {
333 return bookmarksEntryFinder;
334 }
335
336
341 public void setBookmarksEntryFinder(
342 BookmarksEntryFinder bookmarksEntryFinder) {
343 this.bookmarksEntryFinder = bookmarksEntryFinder;
344 }
345
346
351 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
352 return bookmarksFolderLocalService;
353 }
354
355
360 public void setBookmarksFolderLocalService(
361 BookmarksFolderLocalService bookmarksFolderLocalService) {
362 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
363 }
364
365
370 public BookmarksFolderService getBookmarksFolderService() {
371 return bookmarksFolderService;
372 }
373
374
379 public void setBookmarksFolderService(
380 BookmarksFolderService bookmarksFolderService) {
381 this.bookmarksFolderService = bookmarksFolderService;
382 }
383
384
389 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
390 return bookmarksFolderPersistence;
391 }
392
393
398 public void setBookmarksFolderPersistence(
399 BookmarksFolderPersistence bookmarksFolderPersistence) {
400 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
401 }
402
403
408 public CounterLocalService getCounterLocalService() {
409 return counterLocalService;
410 }
411
412
417 public void setCounterLocalService(CounterLocalService counterLocalService) {
418 this.counterLocalService = counterLocalService;
419 }
420
421
426 public GroupLocalService getGroupLocalService() {
427 return groupLocalService;
428 }
429
430
435 public void setGroupLocalService(GroupLocalService groupLocalService) {
436 this.groupLocalService = groupLocalService;
437 }
438
439
444 public GroupService getGroupService() {
445 return groupService;
446 }
447
448
453 public void setGroupService(GroupService groupService) {
454 this.groupService = groupService;
455 }
456
457
462 public GroupPersistence getGroupPersistence() {
463 return groupPersistence;
464 }
465
466
471 public void setGroupPersistence(GroupPersistence groupPersistence) {
472 this.groupPersistence = groupPersistence;
473 }
474
475
480 public GroupFinder getGroupFinder() {
481 return groupFinder;
482 }
483
484
489 public void setGroupFinder(GroupFinder groupFinder) {
490 this.groupFinder = groupFinder;
491 }
492
493
498 public ResourceLocalService getResourceLocalService() {
499 return resourceLocalService;
500 }
501
502
507 public void setResourceLocalService(
508 ResourceLocalService resourceLocalService) {
509 this.resourceLocalService = resourceLocalService;
510 }
511
512
517 public ResourceService getResourceService() {
518 return resourceService;
519 }
520
521
526 public void setResourceService(ResourceService resourceService) {
527 this.resourceService = resourceService;
528 }
529
530
535 public ResourcePersistence getResourcePersistence() {
536 return resourcePersistence;
537 }
538
539
544 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
545 this.resourcePersistence = resourcePersistence;
546 }
547
548
553 public ResourceFinder getResourceFinder() {
554 return resourceFinder;
555 }
556
557
562 public void setResourceFinder(ResourceFinder resourceFinder) {
563 this.resourceFinder = resourceFinder;
564 }
565
566
571 public UserLocalService getUserLocalService() {
572 return userLocalService;
573 }
574
575
580 public void setUserLocalService(UserLocalService userLocalService) {
581 this.userLocalService = userLocalService;
582 }
583
584
589 public UserService getUserService() {
590 return userService;
591 }
592
593
598 public void setUserService(UserService userService) {
599 this.userService = userService;
600 }
601
602
607 public UserPersistence getUserPersistence() {
608 return userPersistence;
609 }
610
611
616 public void setUserPersistence(UserPersistence userPersistence) {
617 this.userPersistence = userPersistence;
618 }
619
620
625 public UserFinder getUserFinder() {
626 return userFinder;
627 }
628
629
634 public void setUserFinder(UserFinder userFinder) {
635 this.userFinder = userFinder;
636 }
637
638
643 public ExpandoValueLocalService getExpandoValueLocalService() {
644 return expandoValueLocalService;
645 }
646
647
652 public void setExpandoValueLocalService(
653 ExpandoValueLocalService expandoValueLocalService) {
654 this.expandoValueLocalService = expandoValueLocalService;
655 }
656
657
662 public ExpandoValueService getExpandoValueService() {
663 return expandoValueService;
664 }
665
666
671 public void setExpandoValueService(ExpandoValueService expandoValueService) {
672 this.expandoValueService = expandoValueService;
673 }
674
675
680 public ExpandoValuePersistence getExpandoValuePersistence() {
681 return expandoValuePersistence;
682 }
683
684
689 public void setExpandoValuePersistence(
690 ExpandoValuePersistence expandoValuePersistence) {
691 this.expandoValuePersistence = expandoValuePersistence;
692 }
693
694
699 protected void runSQL(String sql) throws SystemException {
700 try {
701 DataSource dataSource = bookmarksFolderPersistence.getDataSource();
702
703 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
704 sql, new int[0]);
705
706 sqlUpdate.update();
707 }
708 catch (Exception e) {
709 throw new SystemException(e);
710 }
711 }
712
713 @BeanReference(type = BookmarksEntryLocalService.class)
714 protected BookmarksEntryLocalService bookmarksEntryLocalService;
715 @BeanReference(type = BookmarksEntryService.class)
716 protected BookmarksEntryService bookmarksEntryService;
717 @BeanReference(type = BookmarksEntryPersistence.class)
718 protected BookmarksEntryPersistence bookmarksEntryPersistence;
719 @BeanReference(type = BookmarksEntryFinder.class)
720 protected BookmarksEntryFinder bookmarksEntryFinder;
721 @BeanReference(type = BookmarksFolderLocalService.class)
722 protected BookmarksFolderLocalService bookmarksFolderLocalService;
723 @BeanReference(type = BookmarksFolderService.class)
724 protected BookmarksFolderService bookmarksFolderService;
725 @BeanReference(type = BookmarksFolderPersistence.class)
726 protected BookmarksFolderPersistence bookmarksFolderPersistence;
727 @BeanReference(type = CounterLocalService.class)
728 protected CounterLocalService counterLocalService;
729 @BeanReference(type = GroupLocalService.class)
730 protected GroupLocalService groupLocalService;
731 @BeanReference(type = GroupService.class)
732 protected GroupService groupService;
733 @BeanReference(type = GroupPersistence.class)
734 protected GroupPersistence groupPersistence;
735 @BeanReference(type = GroupFinder.class)
736 protected GroupFinder groupFinder;
737 @BeanReference(type = ResourceLocalService.class)
738 protected ResourceLocalService resourceLocalService;
739 @BeanReference(type = ResourceService.class)
740 protected ResourceService resourceService;
741 @BeanReference(type = ResourcePersistence.class)
742 protected ResourcePersistence resourcePersistence;
743 @BeanReference(type = ResourceFinder.class)
744 protected ResourceFinder resourceFinder;
745 @BeanReference(type = UserLocalService.class)
746 protected UserLocalService userLocalService;
747 @BeanReference(type = UserService.class)
748 protected UserService userService;
749 @BeanReference(type = UserPersistence.class)
750 protected UserPersistence userPersistence;
751 @BeanReference(type = UserFinder.class)
752 protected UserFinder userFinder;
753 @BeanReference(type = ExpandoValueLocalService.class)
754 protected ExpandoValueLocalService expandoValueLocalService;
755 @BeanReference(type = ExpandoValueService.class)
756 protected ExpandoValueService expandoValueService;
757 @BeanReference(type = ExpandoValuePersistence.class)
758 protected ExpandoValuePersistence expandoValuePersistence;
759 }