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.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.asset.service.AssetEntryLocalService;
036 import com.liferay.portlet.asset.service.AssetEntryService;
037 import com.liferay.portlet.asset.service.AssetTagLocalService;
038 import com.liferay.portlet.asset.service.AssetTagService;
039 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
040 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
041 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
042 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
043 import com.liferay.portlet.bookmarks.model.BookmarksEntry;
044 import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
045 import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
046 import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
047 import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
048 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
049 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
050 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
051 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
052 import com.liferay.portlet.expando.service.ExpandoValueService;
053 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
054
055 import java.util.List;
056
057 import javax.sql.DataSource;
058
059
075 public abstract class BookmarksEntryLocalServiceBaseImpl
076 implements BookmarksEntryLocalService {
077
084 public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
085 throws SystemException {
086 bookmarksEntry.setNew(true);
087
088 return bookmarksEntryPersistence.update(bookmarksEntry, false);
089 }
090
091
097 public BookmarksEntry createBookmarksEntry(long entryId) {
098 return bookmarksEntryPersistence.create(entryId);
099 }
100
101
108 public void deleteBookmarksEntry(long entryId)
109 throws PortalException, SystemException {
110 bookmarksEntryPersistence.remove(entryId);
111 }
112
113
119 public void deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
120 throws SystemException {
121 bookmarksEntryPersistence.remove(bookmarksEntry);
122 }
123
124
131 @SuppressWarnings("rawtypes")
132 public List dynamicQuery(DynamicQuery dynamicQuery)
133 throws SystemException {
134 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
135 }
136
137
150 @SuppressWarnings("rawtypes")
151 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
152 throws SystemException {
153 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
154 start, end);
155 }
156
157
171 @SuppressWarnings("rawtypes")
172 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
173 OrderByComparator orderByComparator) throws SystemException {
174 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
175 start, end, orderByComparator);
176 }
177
178
185 public long dynamicQueryCount(DynamicQuery dynamicQuery)
186 throws SystemException {
187 return bookmarksEntryPersistence.countWithDynamicQuery(dynamicQuery);
188 }
189
190
198 public BookmarksEntry getBookmarksEntry(long entryId)
199 throws PortalException, SystemException {
200 return bookmarksEntryPersistence.findByPrimaryKey(entryId);
201 }
202
203
212 public BookmarksEntry getBookmarksEntryByUuidAndGroupId(String uuid,
213 long groupId) throws PortalException, SystemException {
214 return bookmarksEntryPersistence.findByUUID_G(uuid, groupId);
215 }
216
217
229 public List<BookmarksEntry> getBookmarksEntries(int start, int end)
230 throws SystemException {
231 return bookmarksEntryPersistence.findAll(start, end);
232 }
233
234
240 public int getBookmarksEntriesCount() throws SystemException {
241 return bookmarksEntryPersistence.countAll();
242 }
243
244
251 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
252 throws SystemException {
253 bookmarksEntry.setNew(false);
254
255 return bookmarksEntryPersistence.update(bookmarksEntry, true);
256 }
257
258
266 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry,
267 boolean merge) throws SystemException {
268 bookmarksEntry.setNew(false);
269
270 return bookmarksEntryPersistence.update(bookmarksEntry, merge);
271 }
272
273
278 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
279 return bookmarksEntryLocalService;
280 }
281
282
287 public void setBookmarksEntryLocalService(
288 BookmarksEntryLocalService bookmarksEntryLocalService) {
289 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
290 }
291
292
297 public BookmarksEntryService getBookmarksEntryService() {
298 return bookmarksEntryService;
299 }
300
301
306 public void setBookmarksEntryService(
307 BookmarksEntryService bookmarksEntryService) {
308 this.bookmarksEntryService = bookmarksEntryService;
309 }
310
311
316 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
317 return bookmarksEntryPersistence;
318 }
319
320
325 public void setBookmarksEntryPersistence(
326 BookmarksEntryPersistence bookmarksEntryPersistence) {
327 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
328 }
329
330
335 public BookmarksEntryFinder getBookmarksEntryFinder() {
336 return bookmarksEntryFinder;
337 }
338
339
344 public void setBookmarksEntryFinder(
345 BookmarksEntryFinder bookmarksEntryFinder) {
346 this.bookmarksEntryFinder = bookmarksEntryFinder;
347 }
348
349
354 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
355 return bookmarksFolderLocalService;
356 }
357
358
363 public void setBookmarksFolderLocalService(
364 BookmarksFolderLocalService bookmarksFolderLocalService) {
365 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
366 }
367
368
373 public BookmarksFolderService getBookmarksFolderService() {
374 return bookmarksFolderService;
375 }
376
377
382 public void setBookmarksFolderService(
383 BookmarksFolderService bookmarksFolderService) {
384 this.bookmarksFolderService = bookmarksFolderService;
385 }
386
387
392 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
393 return bookmarksFolderPersistence;
394 }
395
396
401 public void setBookmarksFolderPersistence(
402 BookmarksFolderPersistence bookmarksFolderPersistence) {
403 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
404 }
405
406
411 public CounterLocalService getCounterLocalService() {
412 return counterLocalService;
413 }
414
415
420 public void setCounterLocalService(CounterLocalService counterLocalService) {
421 this.counterLocalService = counterLocalService;
422 }
423
424
429 public ResourceLocalService getResourceLocalService() {
430 return resourceLocalService;
431 }
432
433
438 public void setResourceLocalService(
439 ResourceLocalService resourceLocalService) {
440 this.resourceLocalService = resourceLocalService;
441 }
442
443
448 public ResourceService getResourceService() {
449 return resourceService;
450 }
451
452
457 public void setResourceService(ResourceService resourceService) {
458 this.resourceService = resourceService;
459 }
460
461
466 public ResourcePersistence getResourcePersistence() {
467 return resourcePersistence;
468 }
469
470
475 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
476 this.resourcePersistence = resourcePersistence;
477 }
478
479
484 public ResourceFinder getResourceFinder() {
485 return resourceFinder;
486 }
487
488
493 public void setResourceFinder(ResourceFinder resourceFinder) {
494 this.resourceFinder = resourceFinder;
495 }
496
497
502 public UserLocalService getUserLocalService() {
503 return userLocalService;
504 }
505
506
511 public void setUserLocalService(UserLocalService userLocalService) {
512 this.userLocalService = userLocalService;
513 }
514
515
520 public UserService getUserService() {
521 return userService;
522 }
523
524
529 public void setUserService(UserService userService) {
530 this.userService = userService;
531 }
532
533
538 public UserPersistence getUserPersistence() {
539 return userPersistence;
540 }
541
542
547 public void setUserPersistence(UserPersistence userPersistence) {
548 this.userPersistence = userPersistence;
549 }
550
551
556 public UserFinder getUserFinder() {
557 return userFinder;
558 }
559
560
565 public void setUserFinder(UserFinder userFinder) {
566 this.userFinder = userFinder;
567 }
568
569
574 public AssetEntryLocalService getAssetEntryLocalService() {
575 return assetEntryLocalService;
576 }
577
578
583 public void setAssetEntryLocalService(
584 AssetEntryLocalService assetEntryLocalService) {
585 this.assetEntryLocalService = assetEntryLocalService;
586 }
587
588
593 public AssetEntryService getAssetEntryService() {
594 return assetEntryService;
595 }
596
597
602 public void setAssetEntryService(AssetEntryService assetEntryService) {
603 this.assetEntryService = assetEntryService;
604 }
605
606
611 public AssetEntryPersistence getAssetEntryPersistence() {
612 return assetEntryPersistence;
613 }
614
615
620 public void setAssetEntryPersistence(
621 AssetEntryPersistence assetEntryPersistence) {
622 this.assetEntryPersistence = assetEntryPersistence;
623 }
624
625
630 public AssetEntryFinder getAssetEntryFinder() {
631 return assetEntryFinder;
632 }
633
634
639 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
640 this.assetEntryFinder = assetEntryFinder;
641 }
642
643
648 public AssetTagLocalService getAssetTagLocalService() {
649 return assetTagLocalService;
650 }
651
652
657 public void setAssetTagLocalService(
658 AssetTagLocalService assetTagLocalService) {
659 this.assetTagLocalService = assetTagLocalService;
660 }
661
662
667 public AssetTagService getAssetTagService() {
668 return assetTagService;
669 }
670
671
676 public void setAssetTagService(AssetTagService assetTagService) {
677 this.assetTagService = assetTagService;
678 }
679
680
685 public AssetTagPersistence getAssetTagPersistence() {
686 return assetTagPersistence;
687 }
688
689
694 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
695 this.assetTagPersistence = assetTagPersistence;
696 }
697
698
703 public AssetTagFinder getAssetTagFinder() {
704 return assetTagFinder;
705 }
706
707
712 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
713 this.assetTagFinder = assetTagFinder;
714 }
715
716
721 public ExpandoValueLocalService getExpandoValueLocalService() {
722 return expandoValueLocalService;
723 }
724
725
730 public void setExpandoValueLocalService(
731 ExpandoValueLocalService expandoValueLocalService) {
732 this.expandoValueLocalService = expandoValueLocalService;
733 }
734
735
740 public ExpandoValueService getExpandoValueService() {
741 return expandoValueService;
742 }
743
744
749 public void setExpandoValueService(ExpandoValueService expandoValueService) {
750 this.expandoValueService = expandoValueService;
751 }
752
753
758 public ExpandoValuePersistence getExpandoValuePersistence() {
759 return expandoValuePersistence;
760 }
761
762
767 public void setExpandoValuePersistence(
768 ExpandoValuePersistence expandoValuePersistence) {
769 this.expandoValuePersistence = expandoValuePersistence;
770 }
771
772
777 protected void runSQL(String sql) throws SystemException {
778 try {
779 DataSource dataSource = bookmarksEntryPersistence.getDataSource();
780
781 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
782 sql, new int[0]);
783
784 sqlUpdate.update();
785 }
786 catch (Exception e) {
787 throw new SystemException(e);
788 }
789 }
790
791 @BeanReference(type = BookmarksEntryLocalService.class)
792 protected BookmarksEntryLocalService bookmarksEntryLocalService;
793 @BeanReference(type = BookmarksEntryService.class)
794 protected BookmarksEntryService bookmarksEntryService;
795 @BeanReference(type = BookmarksEntryPersistence.class)
796 protected BookmarksEntryPersistence bookmarksEntryPersistence;
797 @BeanReference(type = BookmarksEntryFinder.class)
798 protected BookmarksEntryFinder bookmarksEntryFinder;
799 @BeanReference(type = BookmarksFolderLocalService.class)
800 protected BookmarksFolderLocalService bookmarksFolderLocalService;
801 @BeanReference(type = BookmarksFolderService.class)
802 protected BookmarksFolderService bookmarksFolderService;
803 @BeanReference(type = BookmarksFolderPersistence.class)
804 protected BookmarksFolderPersistence bookmarksFolderPersistence;
805 @BeanReference(type = CounterLocalService.class)
806 protected CounterLocalService counterLocalService;
807 @BeanReference(type = ResourceLocalService.class)
808 protected ResourceLocalService resourceLocalService;
809 @BeanReference(type = ResourceService.class)
810 protected ResourceService resourceService;
811 @BeanReference(type = ResourcePersistence.class)
812 protected ResourcePersistence resourcePersistence;
813 @BeanReference(type = ResourceFinder.class)
814 protected ResourceFinder resourceFinder;
815 @BeanReference(type = UserLocalService.class)
816 protected UserLocalService userLocalService;
817 @BeanReference(type = UserService.class)
818 protected UserService userService;
819 @BeanReference(type = UserPersistence.class)
820 protected UserPersistence userPersistence;
821 @BeanReference(type = UserFinder.class)
822 protected UserFinder userFinder;
823 @BeanReference(type = AssetEntryLocalService.class)
824 protected AssetEntryLocalService assetEntryLocalService;
825 @BeanReference(type = AssetEntryService.class)
826 protected AssetEntryService assetEntryService;
827 @BeanReference(type = AssetEntryPersistence.class)
828 protected AssetEntryPersistence assetEntryPersistence;
829 @BeanReference(type = AssetEntryFinder.class)
830 protected AssetEntryFinder assetEntryFinder;
831 @BeanReference(type = AssetTagLocalService.class)
832 protected AssetTagLocalService assetTagLocalService;
833 @BeanReference(type = AssetTagService.class)
834 protected AssetTagService assetTagService;
835 @BeanReference(type = AssetTagPersistence.class)
836 protected AssetTagPersistence assetTagPersistence;
837 @BeanReference(type = AssetTagFinder.class)
838 protected AssetTagFinder assetTagFinder;
839 @BeanReference(type = ExpandoValueLocalService.class)
840 protected ExpandoValueLocalService expandoValueLocalService;
841 @BeanReference(type = ExpandoValueService.class)
842 protected ExpandoValueService expandoValueService;
843 @BeanReference(type = ExpandoValuePersistence.class)
844 protected ExpandoValuePersistence expandoValuePersistence;
845 }