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.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.util.OrderByComparator;
030 import com.liferay.portal.model.PersistedModel;
031 import com.liferay.portal.service.BaseLocalServiceImpl;
032 import com.liferay.portal.service.GroupLocalService;
033 import com.liferay.portal.service.GroupService;
034 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035 import com.liferay.portal.service.ResourceLocalService;
036 import com.liferay.portal.service.ResourceService;
037 import com.liferay.portal.service.UserLocalService;
038 import com.liferay.portal.service.UserService;
039 import com.liferay.portal.service.persistence.GroupFinder;
040 import com.liferay.portal.service.persistence.GroupPersistence;
041 import com.liferay.portal.service.persistence.ResourceFinder;
042 import com.liferay.portal.service.persistence.ResourcePersistence;
043 import com.liferay.portal.service.persistence.UserFinder;
044 import com.liferay.portal.service.persistence.UserPersistence;
045
046 import com.liferay.portlet.bookmarks.model.BookmarksFolder;
047 import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
048 import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
049 import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
050 import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
051 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
052 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
053 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderFinder;
054 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
055 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
056 import com.liferay.portlet.expando.service.ExpandoValueService;
057 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
058
059 import java.io.Serializable;
060
061 import java.util.List;
062
063 import javax.sql.DataSource;
064
065
077 public abstract class BookmarksFolderLocalServiceBaseImpl
078 extends BaseLocalServiceImpl implements BookmarksFolderLocalService,
079 IdentifiableBean {
080
085
086
093 @Indexable(type = IndexableType.REINDEX)
094 public BookmarksFolder addBookmarksFolder(BookmarksFolder bookmarksFolder)
095 throws SystemException {
096 bookmarksFolder.setNew(true);
097
098 return bookmarksFolderPersistence.update(bookmarksFolder, false);
099 }
100
101
107 public BookmarksFolder createBookmarksFolder(long folderId) {
108 return bookmarksFolderPersistence.create(folderId);
109 }
110
111
119 @Indexable(type = IndexableType.DELETE)
120 public BookmarksFolder deleteBookmarksFolder(long folderId)
121 throws PortalException, SystemException {
122 return bookmarksFolderPersistence.remove(folderId);
123 }
124
125
132 @Indexable(type = IndexableType.DELETE)
133 public BookmarksFolder deleteBookmarksFolder(
134 BookmarksFolder bookmarksFolder) throws SystemException {
135 return bookmarksFolderPersistence.remove(bookmarksFolder);
136 }
137
138 public DynamicQuery dynamicQuery() {
139 Class<?> clazz = getClass();
140
141 return DynamicQueryFactoryUtil.forClass(BookmarksFolder.class,
142 clazz.getClassLoader());
143 }
144
145
152 @SuppressWarnings("rawtypes")
153 public List dynamicQuery(DynamicQuery dynamicQuery)
154 throws SystemException {
155 return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery);
156 }
157
158
171 @SuppressWarnings("rawtypes")
172 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
173 throws SystemException {
174 return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
175 start, end);
176 }
177
178
192 @SuppressWarnings("rawtypes")
193 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
194 OrderByComparator orderByComparator) throws SystemException {
195 return bookmarksFolderPersistence.findWithDynamicQuery(dynamicQuery,
196 start, end, orderByComparator);
197 }
198
199
206 public long dynamicQueryCount(DynamicQuery dynamicQuery)
207 throws SystemException {
208 return bookmarksFolderPersistence.countWithDynamicQuery(dynamicQuery);
209 }
210
211 public BookmarksFolder fetchBookmarksFolder(long folderId)
212 throws SystemException {
213 return bookmarksFolderPersistence.fetchByPrimaryKey(folderId);
214 }
215
216
224 public BookmarksFolder getBookmarksFolder(long folderId)
225 throws PortalException, SystemException {
226 return bookmarksFolderPersistence.findByPrimaryKey(folderId);
227 }
228
229 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
230 throws PortalException, SystemException {
231 return bookmarksFolderPersistence.findByPrimaryKey(primaryKeyObj);
232 }
233
234
243 public BookmarksFolder getBookmarksFolderByUuidAndGroupId(String uuid,
244 long groupId) throws PortalException, SystemException {
245 return bookmarksFolderPersistence.findByUUID_G(uuid, groupId);
246 }
247
248
260 public List<BookmarksFolder> getBookmarksFolders(int start, int end)
261 throws SystemException {
262 return bookmarksFolderPersistence.findAll(start, end);
263 }
264
265
271 public int getBookmarksFoldersCount() throws SystemException {
272 return bookmarksFolderPersistence.countAll();
273 }
274
275
282 @Indexable(type = IndexableType.REINDEX)
283 public BookmarksFolder updateBookmarksFolder(
284 BookmarksFolder bookmarksFolder) throws SystemException {
285 return updateBookmarksFolder(bookmarksFolder, true);
286 }
287
288
296 @Indexable(type = IndexableType.REINDEX)
297 public BookmarksFolder updateBookmarksFolder(
298 BookmarksFolder bookmarksFolder, boolean merge)
299 throws SystemException {
300 bookmarksFolder.setNew(false);
301
302 return bookmarksFolderPersistence.update(bookmarksFolder, merge);
303 }
304
305
310 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
311 return bookmarksEntryLocalService;
312 }
313
314
319 public void setBookmarksEntryLocalService(
320 BookmarksEntryLocalService bookmarksEntryLocalService) {
321 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
322 }
323
324
329 public BookmarksEntryService getBookmarksEntryService() {
330 return bookmarksEntryService;
331 }
332
333
338 public void setBookmarksEntryService(
339 BookmarksEntryService bookmarksEntryService) {
340 this.bookmarksEntryService = bookmarksEntryService;
341 }
342
343
348 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
349 return bookmarksEntryPersistence;
350 }
351
352
357 public void setBookmarksEntryPersistence(
358 BookmarksEntryPersistence bookmarksEntryPersistence) {
359 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
360 }
361
362
367 public BookmarksEntryFinder getBookmarksEntryFinder() {
368 return bookmarksEntryFinder;
369 }
370
371
376 public void setBookmarksEntryFinder(
377 BookmarksEntryFinder bookmarksEntryFinder) {
378 this.bookmarksEntryFinder = bookmarksEntryFinder;
379 }
380
381
386 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
387 return bookmarksFolderLocalService;
388 }
389
390
395 public void setBookmarksFolderLocalService(
396 BookmarksFolderLocalService bookmarksFolderLocalService) {
397 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
398 }
399
400
405 public BookmarksFolderService getBookmarksFolderService() {
406 return bookmarksFolderService;
407 }
408
409
414 public void setBookmarksFolderService(
415 BookmarksFolderService bookmarksFolderService) {
416 this.bookmarksFolderService = bookmarksFolderService;
417 }
418
419
424 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
425 return bookmarksFolderPersistence;
426 }
427
428
433 public void setBookmarksFolderPersistence(
434 BookmarksFolderPersistence bookmarksFolderPersistence) {
435 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
436 }
437
438
443 public BookmarksFolderFinder getBookmarksFolderFinder() {
444 return bookmarksFolderFinder;
445 }
446
447
452 public void setBookmarksFolderFinder(
453 BookmarksFolderFinder bookmarksFolderFinder) {
454 this.bookmarksFolderFinder = bookmarksFolderFinder;
455 }
456
457
462 public CounterLocalService getCounterLocalService() {
463 return counterLocalService;
464 }
465
466
471 public void setCounterLocalService(CounterLocalService counterLocalService) {
472 this.counterLocalService = counterLocalService;
473 }
474
475
480 public GroupLocalService getGroupLocalService() {
481 return groupLocalService;
482 }
483
484
489 public void setGroupLocalService(GroupLocalService groupLocalService) {
490 this.groupLocalService = groupLocalService;
491 }
492
493
498 public GroupService getGroupService() {
499 return groupService;
500 }
501
502
507 public void setGroupService(GroupService groupService) {
508 this.groupService = groupService;
509 }
510
511
516 public GroupPersistence getGroupPersistence() {
517 return groupPersistence;
518 }
519
520
525 public void setGroupPersistence(GroupPersistence groupPersistence) {
526 this.groupPersistence = groupPersistence;
527 }
528
529
534 public GroupFinder getGroupFinder() {
535 return groupFinder;
536 }
537
538
543 public void setGroupFinder(GroupFinder groupFinder) {
544 this.groupFinder = groupFinder;
545 }
546
547
552 public ResourceLocalService getResourceLocalService() {
553 return resourceLocalService;
554 }
555
556
561 public void setResourceLocalService(
562 ResourceLocalService resourceLocalService) {
563 this.resourceLocalService = resourceLocalService;
564 }
565
566
571 public ResourceService getResourceService() {
572 return resourceService;
573 }
574
575
580 public void setResourceService(ResourceService resourceService) {
581 this.resourceService = resourceService;
582 }
583
584
589 public ResourcePersistence getResourcePersistence() {
590 return resourcePersistence;
591 }
592
593
598 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
599 this.resourcePersistence = resourcePersistence;
600 }
601
602
607 public ResourceFinder getResourceFinder() {
608 return resourceFinder;
609 }
610
611
616 public void setResourceFinder(ResourceFinder resourceFinder) {
617 this.resourceFinder = resourceFinder;
618 }
619
620
625 public UserLocalService getUserLocalService() {
626 return userLocalService;
627 }
628
629
634 public void setUserLocalService(UserLocalService userLocalService) {
635 this.userLocalService = userLocalService;
636 }
637
638
643 public UserService getUserService() {
644 return userService;
645 }
646
647
652 public void setUserService(UserService userService) {
653 this.userService = userService;
654 }
655
656
661 public UserPersistence getUserPersistence() {
662 return userPersistence;
663 }
664
665
670 public void setUserPersistence(UserPersistence userPersistence) {
671 this.userPersistence = userPersistence;
672 }
673
674
679 public UserFinder getUserFinder() {
680 return userFinder;
681 }
682
683
688 public void setUserFinder(UserFinder userFinder) {
689 this.userFinder = userFinder;
690 }
691
692
697 public ExpandoValueLocalService getExpandoValueLocalService() {
698 return expandoValueLocalService;
699 }
700
701
706 public void setExpandoValueLocalService(
707 ExpandoValueLocalService expandoValueLocalService) {
708 this.expandoValueLocalService = expandoValueLocalService;
709 }
710
711
716 public ExpandoValueService getExpandoValueService() {
717 return expandoValueService;
718 }
719
720
725 public void setExpandoValueService(ExpandoValueService expandoValueService) {
726 this.expandoValueService = expandoValueService;
727 }
728
729
734 public ExpandoValuePersistence getExpandoValuePersistence() {
735 return expandoValuePersistence;
736 }
737
738
743 public void setExpandoValuePersistence(
744 ExpandoValuePersistence expandoValuePersistence) {
745 this.expandoValuePersistence = expandoValuePersistence;
746 }
747
748 public void afterPropertiesSet() {
749 persistedModelLocalServiceRegistry.register("com.liferay.portlet.bookmarks.model.BookmarksFolder",
750 bookmarksFolderLocalService);
751 }
752
753 public void destroy() {
754 persistedModelLocalServiceRegistry.unregister(
755 "com.liferay.portlet.bookmarks.model.BookmarksFolder");
756 }
757
758
763 public String getBeanIdentifier() {
764 return _beanIdentifier;
765 }
766
767
772 public void setBeanIdentifier(String beanIdentifier) {
773 _beanIdentifier = beanIdentifier;
774 }
775
776 protected Class<?> getModelClass() {
777 return BookmarksFolder.class;
778 }
779
780 protected String getModelClassName() {
781 return BookmarksFolder.class.getName();
782 }
783
784
789 protected void runSQL(String sql) throws SystemException {
790 try {
791 DataSource dataSource = bookmarksFolderPersistence.getDataSource();
792
793 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
794 sql, new int[0]);
795
796 sqlUpdate.update();
797 }
798 catch (Exception e) {
799 throw new SystemException(e);
800 }
801 }
802
803 @BeanReference(type = BookmarksEntryLocalService.class)
804 protected BookmarksEntryLocalService bookmarksEntryLocalService;
805 @BeanReference(type = BookmarksEntryService.class)
806 protected BookmarksEntryService bookmarksEntryService;
807 @BeanReference(type = BookmarksEntryPersistence.class)
808 protected BookmarksEntryPersistence bookmarksEntryPersistence;
809 @BeanReference(type = BookmarksEntryFinder.class)
810 protected BookmarksEntryFinder bookmarksEntryFinder;
811 @BeanReference(type = BookmarksFolderLocalService.class)
812 protected BookmarksFolderLocalService bookmarksFolderLocalService;
813 @BeanReference(type = BookmarksFolderService.class)
814 protected BookmarksFolderService bookmarksFolderService;
815 @BeanReference(type = BookmarksFolderPersistence.class)
816 protected BookmarksFolderPersistence bookmarksFolderPersistence;
817 @BeanReference(type = BookmarksFolderFinder.class)
818 protected BookmarksFolderFinder bookmarksFolderFinder;
819 @BeanReference(type = CounterLocalService.class)
820 protected CounterLocalService counterLocalService;
821 @BeanReference(type = GroupLocalService.class)
822 protected GroupLocalService groupLocalService;
823 @BeanReference(type = GroupService.class)
824 protected GroupService groupService;
825 @BeanReference(type = GroupPersistence.class)
826 protected GroupPersistence groupPersistence;
827 @BeanReference(type = GroupFinder.class)
828 protected GroupFinder groupFinder;
829 @BeanReference(type = ResourceLocalService.class)
830 protected ResourceLocalService resourceLocalService;
831 @BeanReference(type = ResourceService.class)
832 protected ResourceService resourceService;
833 @BeanReference(type = ResourcePersistence.class)
834 protected ResourcePersistence resourcePersistence;
835 @BeanReference(type = ResourceFinder.class)
836 protected ResourceFinder resourceFinder;
837 @BeanReference(type = UserLocalService.class)
838 protected UserLocalService userLocalService;
839 @BeanReference(type = UserService.class)
840 protected UserService userService;
841 @BeanReference(type = UserPersistence.class)
842 protected UserPersistence userPersistence;
843 @BeanReference(type = UserFinder.class)
844 protected UserFinder userFinder;
845 @BeanReference(type = ExpandoValueLocalService.class)
846 protected ExpandoValueLocalService expandoValueLocalService;
847 @BeanReference(type = ExpandoValueService.class)
848 protected ExpandoValueService expandoValueService;
849 @BeanReference(type = ExpandoValuePersistence.class)
850 protected ExpandoValuePersistence expandoValuePersistence;
851 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
852 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
853 private String _beanIdentifier;
854 }