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.PersistedModelLocalServiceRegistry;
033 import com.liferay.portal.service.PortletPreferencesLocalService;
034 import com.liferay.portal.service.PortletPreferencesService;
035 import com.liferay.portal.service.ResourceLocalService;
036 import com.liferay.portal.service.SubscriptionLocalService;
037 import com.liferay.portal.service.UserLocalService;
038 import com.liferay.portal.service.UserService;
039 import com.liferay.portal.service.persistence.PortletPreferencesFinder;
040 import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
041 import com.liferay.portal.service.persistence.SubscriptionPersistence;
042 import com.liferay.portal.service.persistence.UserFinder;
043 import com.liferay.portal.service.persistence.UserPersistence;
044
045 import com.liferay.portlet.asset.service.AssetEntryLocalService;
046 import com.liferay.portlet.asset.service.AssetEntryService;
047 import com.liferay.portlet.asset.service.AssetLinkLocalService;
048 import com.liferay.portlet.asset.service.AssetTagLocalService;
049 import com.liferay.portlet.asset.service.AssetTagService;
050 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
051 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
052 import com.liferay.portlet.asset.service.persistence.AssetLinkFinder;
053 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
054 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
055 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
056 import com.liferay.portlet.bookmarks.model.BookmarksEntry;
057 import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
058 import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
059 import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
060 import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
061 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
062 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
063 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
064 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
065 import com.liferay.portlet.expando.service.ExpandoValueService;
066 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
067 import com.liferay.portlet.social.service.SocialActivityLocalService;
068 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
069 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
070
071 import java.io.Serializable;
072
073 import java.util.List;
074
075 import javax.sql.DataSource;
076
077
089 public abstract class BookmarksEntryLocalServiceBaseImpl
090 extends BaseLocalServiceImpl implements BookmarksEntryLocalService,
091 IdentifiableBean {
092
097
098
105 @Indexable(type = IndexableType.REINDEX)
106 public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
107 throws SystemException {
108 bookmarksEntry.setNew(true);
109
110 return bookmarksEntryPersistence.update(bookmarksEntry);
111 }
112
113
119 public BookmarksEntry createBookmarksEntry(long entryId) {
120 return bookmarksEntryPersistence.create(entryId);
121 }
122
123
131 @Indexable(type = IndexableType.DELETE)
132 public BookmarksEntry deleteBookmarksEntry(long entryId)
133 throws PortalException, SystemException {
134 return bookmarksEntryPersistence.remove(entryId);
135 }
136
137
144 @Indexable(type = IndexableType.DELETE)
145 public BookmarksEntry deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
146 throws SystemException {
147 return bookmarksEntryPersistence.remove(bookmarksEntry);
148 }
149
150 public DynamicQuery dynamicQuery() {
151 Class<?> clazz = getClass();
152
153 return DynamicQueryFactoryUtil.forClass(BookmarksEntry.class,
154 clazz.getClassLoader());
155 }
156
157
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery)
166 throws SystemException {
167 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
168 }
169
170
183 @SuppressWarnings("rawtypes")
184 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
185 throws SystemException {
186 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
187 start, end);
188 }
189
190
204 @SuppressWarnings("rawtypes")
205 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
206 OrderByComparator orderByComparator) throws SystemException {
207 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
208 start, end, orderByComparator);
209 }
210
211
218 public long dynamicQueryCount(DynamicQuery dynamicQuery)
219 throws SystemException {
220 return bookmarksEntryPersistence.countWithDynamicQuery(dynamicQuery);
221 }
222
223 public BookmarksEntry fetchBookmarksEntry(long entryId)
224 throws SystemException {
225 return bookmarksEntryPersistence.fetchByPrimaryKey(entryId);
226 }
227
228
236 public BookmarksEntry getBookmarksEntry(long entryId)
237 throws PortalException, SystemException {
238 return bookmarksEntryPersistence.findByPrimaryKey(entryId);
239 }
240
241 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
242 throws PortalException, SystemException {
243 return bookmarksEntryPersistence.findByPrimaryKey(primaryKeyObj);
244 }
245
246
255 public BookmarksEntry getBookmarksEntryByUuidAndGroupId(String uuid,
256 long groupId) throws PortalException, SystemException {
257 return bookmarksEntryPersistence.findByUUID_G(uuid, groupId);
258 }
259
260
272 public List<BookmarksEntry> getBookmarksEntries(int start, int end)
273 throws SystemException {
274 return bookmarksEntryPersistence.findAll(start, end);
275 }
276
277
283 public int getBookmarksEntriesCount() throws SystemException {
284 return bookmarksEntryPersistence.countAll();
285 }
286
287
294 @Indexable(type = IndexableType.REINDEX)
295 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
296 throws SystemException {
297 return bookmarksEntryPersistence.update(bookmarksEntry);
298 }
299
300
305 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
306 return bookmarksEntryLocalService;
307 }
308
309
314 public void setBookmarksEntryLocalService(
315 BookmarksEntryLocalService bookmarksEntryLocalService) {
316 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
317 }
318
319
324 public BookmarksEntryService getBookmarksEntryService() {
325 return bookmarksEntryService;
326 }
327
328
333 public void setBookmarksEntryService(
334 BookmarksEntryService bookmarksEntryService) {
335 this.bookmarksEntryService = bookmarksEntryService;
336 }
337
338
343 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
344 return bookmarksEntryPersistence;
345 }
346
347
352 public void setBookmarksEntryPersistence(
353 BookmarksEntryPersistence bookmarksEntryPersistence) {
354 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
355 }
356
357
362 public BookmarksEntryFinder getBookmarksEntryFinder() {
363 return bookmarksEntryFinder;
364 }
365
366
371 public void setBookmarksEntryFinder(
372 BookmarksEntryFinder bookmarksEntryFinder) {
373 this.bookmarksEntryFinder = bookmarksEntryFinder;
374 }
375
376
381 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
382 return bookmarksFolderLocalService;
383 }
384
385
390 public void setBookmarksFolderLocalService(
391 BookmarksFolderLocalService bookmarksFolderLocalService) {
392 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
393 }
394
395
400 public BookmarksFolderService getBookmarksFolderService() {
401 return bookmarksFolderService;
402 }
403
404
409 public void setBookmarksFolderService(
410 BookmarksFolderService bookmarksFolderService) {
411 this.bookmarksFolderService = bookmarksFolderService;
412 }
413
414
419 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
420 return bookmarksFolderPersistence;
421 }
422
423
428 public void setBookmarksFolderPersistence(
429 BookmarksFolderPersistence bookmarksFolderPersistence) {
430 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
431 }
432
433
438 public CounterLocalService getCounterLocalService() {
439 return counterLocalService;
440 }
441
442
447 public void setCounterLocalService(CounterLocalService counterLocalService) {
448 this.counterLocalService = counterLocalService;
449 }
450
451
456 public PortletPreferencesLocalService getPortletPreferencesLocalService() {
457 return portletPreferencesLocalService;
458 }
459
460
465 public void setPortletPreferencesLocalService(
466 PortletPreferencesLocalService portletPreferencesLocalService) {
467 this.portletPreferencesLocalService = portletPreferencesLocalService;
468 }
469
470
475 public PortletPreferencesService getPortletPreferencesService() {
476 return portletPreferencesService;
477 }
478
479
484 public void setPortletPreferencesService(
485 PortletPreferencesService portletPreferencesService) {
486 this.portletPreferencesService = portletPreferencesService;
487 }
488
489
494 public PortletPreferencesPersistence getPortletPreferencesPersistence() {
495 return portletPreferencesPersistence;
496 }
497
498
503 public void setPortletPreferencesPersistence(
504 PortletPreferencesPersistence portletPreferencesPersistence) {
505 this.portletPreferencesPersistence = portletPreferencesPersistence;
506 }
507
508
513 public PortletPreferencesFinder getPortletPreferencesFinder() {
514 return portletPreferencesFinder;
515 }
516
517
522 public void setPortletPreferencesFinder(
523 PortletPreferencesFinder portletPreferencesFinder) {
524 this.portletPreferencesFinder = portletPreferencesFinder;
525 }
526
527
532 public ResourceLocalService getResourceLocalService() {
533 return resourceLocalService;
534 }
535
536
541 public void setResourceLocalService(
542 ResourceLocalService resourceLocalService) {
543 this.resourceLocalService = resourceLocalService;
544 }
545
546
551 public SubscriptionLocalService getSubscriptionLocalService() {
552 return subscriptionLocalService;
553 }
554
555
560 public void setSubscriptionLocalService(
561 SubscriptionLocalService subscriptionLocalService) {
562 this.subscriptionLocalService = subscriptionLocalService;
563 }
564
565
570 public SubscriptionPersistence getSubscriptionPersistence() {
571 return subscriptionPersistence;
572 }
573
574
579 public void setSubscriptionPersistence(
580 SubscriptionPersistence subscriptionPersistence) {
581 this.subscriptionPersistence = subscriptionPersistence;
582 }
583
584
589 public UserLocalService getUserLocalService() {
590 return userLocalService;
591 }
592
593
598 public void setUserLocalService(UserLocalService userLocalService) {
599 this.userLocalService = userLocalService;
600 }
601
602
607 public UserService getUserService() {
608 return userService;
609 }
610
611
616 public void setUserService(UserService userService) {
617 this.userService = userService;
618 }
619
620
625 public UserPersistence getUserPersistence() {
626 return userPersistence;
627 }
628
629
634 public void setUserPersistence(UserPersistence userPersistence) {
635 this.userPersistence = userPersistence;
636 }
637
638
643 public UserFinder getUserFinder() {
644 return userFinder;
645 }
646
647
652 public void setUserFinder(UserFinder userFinder) {
653 this.userFinder = userFinder;
654 }
655
656
661 public AssetEntryLocalService getAssetEntryLocalService() {
662 return assetEntryLocalService;
663 }
664
665
670 public void setAssetEntryLocalService(
671 AssetEntryLocalService assetEntryLocalService) {
672 this.assetEntryLocalService = assetEntryLocalService;
673 }
674
675
680 public AssetEntryService getAssetEntryService() {
681 return assetEntryService;
682 }
683
684
689 public void setAssetEntryService(AssetEntryService assetEntryService) {
690 this.assetEntryService = assetEntryService;
691 }
692
693
698 public AssetEntryPersistence getAssetEntryPersistence() {
699 return assetEntryPersistence;
700 }
701
702
707 public void setAssetEntryPersistence(
708 AssetEntryPersistence assetEntryPersistence) {
709 this.assetEntryPersistence = assetEntryPersistence;
710 }
711
712
717 public AssetEntryFinder getAssetEntryFinder() {
718 return assetEntryFinder;
719 }
720
721
726 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
727 this.assetEntryFinder = assetEntryFinder;
728 }
729
730
735 public AssetLinkLocalService getAssetLinkLocalService() {
736 return assetLinkLocalService;
737 }
738
739
744 public void setAssetLinkLocalService(
745 AssetLinkLocalService assetLinkLocalService) {
746 this.assetLinkLocalService = assetLinkLocalService;
747 }
748
749
754 public AssetLinkPersistence getAssetLinkPersistence() {
755 return assetLinkPersistence;
756 }
757
758
763 public void setAssetLinkPersistence(
764 AssetLinkPersistence assetLinkPersistence) {
765 this.assetLinkPersistence = assetLinkPersistence;
766 }
767
768
773 public AssetLinkFinder getAssetLinkFinder() {
774 return assetLinkFinder;
775 }
776
777
782 public void setAssetLinkFinder(AssetLinkFinder assetLinkFinder) {
783 this.assetLinkFinder = assetLinkFinder;
784 }
785
786
791 public AssetTagLocalService getAssetTagLocalService() {
792 return assetTagLocalService;
793 }
794
795
800 public void setAssetTagLocalService(
801 AssetTagLocalService assetTagLocalService) {
802 this.assetTagLocalService = assetTagLocalService;
803 }
804
805
810 public AssetTagService getAssetTagService() {
811 return assetTagService;
812 }
813
814
819 public void setAssetTagService(AssetTagService assetTagService) {
820 this.assetTagService = assetTagService;
821 }
822
823
828 public AssetTagPersistence getAssetTagPersistence() {
829 return assetTagPersistence;
830 }
831
832
837 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
838 this.assetTagPersistence = assetTagPersistence;
839 }
840
841
846 public AssetTagFinder getAssetTagFinder() {
847 return assetTagFinder;
848 }
849
850
855 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
856 this.assetTagFinder = assetTagFinder;
857 }
858
859
864 public ExpandoValueLocalService getExpandoValueLocalService() {
865 return expandoValueLocalService;
866 }
867
868
873 public void setExpandoValueLocalService(
874 ExpandoValueLocalService expandoValueLocalService) {
875 this.expandoValueLocalService = expandoValueLocalService;
876 }
877
878
883 public ExpandoValueService getExpandoValueService() {
884 return expandoValueService;
885 }
886
887
892 public void setExpandoValueService(ExpandoValueService expandoValueService) {
893 this.expandoValueService = expandoValueService;
894 }
895
896
901 public ExpandoValuePersistence getExpandoValuePersistence() {
902 return expandoValuePersistence;
903 }
904
905
910 public void setExpandoValuePersistence(
911 ExpandoValuePersistence expandoValuePersistence) {
912 this.expandoValuePersistence = expandoValuePersistence;
913 }
914
915
920 public SocialActivityLocalService getSocialActivityLocalService() {
921 return socialActivityLocalService;
922 }
923
924
929 public void setSocialActivityLocalService(
930 SocialActivityLocalService socialActivityLocalService) {
931 this.socialActivityLocalService = socialActivityLocalService;
932 }
933
934
939 public SocialActivityPersistence getSocialActivityPersistence() {
940 return socialActivityPersistence;
941 }
942
943
948 public void setSocialActivityPersistence(
949 SocialActivityPersistence socialActivityPersistence) {
950 this.socialActivityPersistence = socialActivityPersistence;
951 }
952
953
958 public SocialActivityFinder getSocialActivityFinder() {
959 return socialActivityFinder;
960 }
961
962
967 public void setSocialActivityFinder(
968 SocialActivityFinder socialActivityFinder) {
969 this.socialActivityFinder = socialActivityFinder;
970 }
971
972 public void afterPropertiesSet() {
973 persistedModelLocalServiceRegistry.register("com.liferay.portlet.bookmarks.model.BookmarksEntry",
974 bookmarksEntryLocalService);
975 }
976
977 public void destroy() {
978 persistedModelLocalServiceRegistry.unregister(
979 "com.liferay.portlet.bookmarks.model.BookmarksEntry");
980 }
981
982
987 public String getBeanIdentifier() {
988 return _beanIdentifier;
989 }
990
991
996 public void setBeanIdentifier(String beanIdentifier) {
997 _beanIdentifier = beanIdentifier;
998 }
999
1000 protected Class<?> getModelClass() {
1001 return BookmarksEntry.class;
1002 }
1003
1004 protected String getModelClassName() {
1005 return BookmarksEntry.class.getName();
1006 }
1007
1008
1013 protected void runSQL(String sql) throws SystemException {
1014 try {
1015 DataSource dataSource = bookmarksEntryPersistence.getDataSource();
1016
1017 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1018 sql, new int[0]);
1019
1020 sqlUpdate.update();
1021 }
1022 catch (Exception e) {
1023 throw new SystemException(e);
1024 }
1025 }
1026
1027 @BeanReference(type = BookmarksEntryLocalService.class)
1028 protected BookmarksEntryLocalService bookmarksEntryLocalService;
1029 @BeanReference(type = BookmarksEntryService.class)
1030 protected BookmarksEntryService bookmarksEntryService;
1031 @BeanReference(type = BookmarksEntryPersistence.class)
1032 protected BookmarksEntryPersistence bookmarksEntryPersistence;
1033 @BeanReference(type = BookmarksEntryFinder.class)
1034 protected BookmarksEntryFinder bookmarksEntryFinder;
1035 @BeanReference(type = BookmarksFolderLocalService.class)
1036 protected BookmarksFolderLocalService bookmarksFolderLocalService;
1037 @BeanReference(type = BookmarksFolderService.class)
1038 protected BookmarksFolderService bookmarksFolderService;
1039 @BeanReference(type = BookmarksFolderPersistence.class)
1040 protected BookmarksFolderPersistence bookmarksFolderPersistence;
1041 @BeanReference(type = CounterLocalService.class)
1042 protected CounterLocalService counterLocalService;
1043 @BeanReference(type = PortletPreferencesLocalService.class)
1044 protected PortletPreferencesLocalService portletPreferencesLocalService;
1045 @BeanReference(type = PortletPreferencesService.class)
1046 protected PortletPreferencesService portletPreferencesService;
1047 @BeanReference(type = PortletPreferencesPersistence.class)
1048 protected PortletPreferencesPersistence portletPreferencesPersistence;
1049 @BeanReference(type = PortletPreferencesFinder.class)
1050 protected PortletPreferencesFinder portletPreferencesFinder;
1051 @BeanReference(type = ResourceLocalService.class)
1052 protected ResourceLocalService resourceLocalService;
1053 @BeanReference(type = SubscriptionLocalService.class)
1054 protected SubscriptionLocalService subscriptionLocalService;
1055 @BeanReference(type = SubscriptionPersistence.class)
1056 protected SubscriptionPersistence subscriptionPersistence;
1057 @BeanReference(type = UserLocalService.class)
1058 protected UserLocalService userLocalService;
1059 @BeanReference(type = UserService.class)
1060 protected UserService userService;
1061 @BeanReference(type = UserPersistence.class)
1062 protected UserPersistence userPersistence;
1063 @BeanReference(type = UserFinder.class)
1064 protected UserFinder userFinder;
1065 @BeanReference(type = AssetEntryLocalService.class)
1066 protected AssetEntryLocalService assetEntryLocalService;
1067 @BeanReference(type = AssetEntryService.class)
1068 protected AssetEntryService assetEntryService;
1069 @BeanReference(type = AssetEntryPersistence.class)
1070 protected AssetEntryPersistence assetEntryPersistence;
1071 @BeanReference(type = AssetEntryFinder.class)
1072 protected AssetEntryFinder assetEntryFinder;
1073 @BeanReference(type = AssetLinkLocalService.class)
1074 protected AssetLinkLocalService assetLinkLocalService;
1075 @BeanReference(type = AssetLinkPersistence.class)
1076 protected AssetLinkPersistence assetLinkPersistence;
1077 @BeanReference(type = AssetLinkFinder.class)
1078 protected AssetLinkFinder assetLinkFinder;
1079 @BeanReference(type = AssetTagLocalService.class)
1080 protected AssetTagLocalService assetTagLocalService;
1081 @BeanReference(type = AssetTagService.class)
1082 protected AssetTagService assetTagService;
1083 @BeanReference(type = AssetTagPersistence.class)
1084 protected AssetTagPersistence assetTagPersistence;
1085 @BeanReference(type = AssetTagFinder.class)
1086 protected AssetTagFinder assetTagFinder;
1087 @BeanReference(type = ExpandoValueLocalService.class)
1088 protected ExpandoValueLocalService expandoValueLocalService;
1089 @BeanReference(type = ExpandoValueService.class)
1090 protected ExpandoValueService expandoValueService;
1091 @BeanReference(type = ExpandoValuePersistence.class)
1092 protected ExpandoValuePersistence expandoValuePersistence;
1093 @BeanReference(type = SocialActivityLocalService.class)
1094 protected SocialActivityLocalService socialActivityLocalService;
1095 @BeanReference(type = SocialActivityPersistence.class)
1096 protected SocialActivityPersistence socialActivityPersistence;
1097 @BeanReference(type = SocialActivityFinder.class)
1098 protected SocialActivityFinder socialActivityFinder;
1099 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1100 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1101 private String _beanIdentifier;
1102 }