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.ResourceLocalService;
034 import com.liferay.portal.service.ResourceService;
035 import com.liferay.portal.service.UserLocalService;
036 import com.liferay.portal.service.UserService;
037 import com.liferay.portal.service.persistence.ResourceFinder;
038 import com.liferay.portal.service.persistence.ResourcePersistence;
039 import com.liferay.portal.service.persistence.UserFinder;
040 import com.liferay.portal.service.persistence.UserPersistence;
041
042 import com.liferay.portlet.asset.service.AssetEntryLocalService;
043 import com.liferay.portlet.asset.service.AssetEntryService;
044 import com.liferay.portlet.asset.service.AssetLinkLocalService;
045 import com.liferay.portlet.asset.service.AssetTagLocalService;
046 import com.liferay.portlet.asset.service.AssetTagService;
047 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
048 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
049 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
050 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
051 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
052 import com.liferay.portlet.bookmarks.model.BookmarksEntry;
053 import com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService;
054 import com.liferay.portlet.bookmarks.service.BookmarksEntryService;
055 import com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService;
056 import com.liferay.portlet.bookmarks.service.BookmarksFolderService;
057 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder;
058 import com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence;
059 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderFinder;
060 import com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence;
061 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
062 import com.liferay.portlet.expando.service.ExpandoValueService;
063 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
064 import com.liferay.portlet.social.service.SocialActivityLocalService;
065 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
066 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
067
068 import java.io.Serializable;
069
070 import java.util.List;
071
072 import javax.sql.DataSource;
073
074
086 public abstract class BookmarksEntryLocalServiceBaseImpl
087 extends BaseLocalServiceImpl implements BookmarksEntryLocalService,
088 IdentifiableBean {
089
094
095
102 @Indexable(type = IndexableType.REINDEX)
103 public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
104 throws SystemException {
105 bookmarksEntry.setNew(true);
106
107 return bookmarksEntryPersistence.update(bookmarksEntry, false);
108 }
109
110
116 public BookmarksEntry createBookmarksEntry(long entryId) {
117 return bookmarksEntryPersistence.create(entryId);
118 }
119
120
128 @Indexable(type = IndexableType.DELETE)
129 public BookmarksEntry deleteBookmarksEntry(long entryId)
130 throws PortalException, SystemException {
131 return bookmarksEntryPersistence.remove(entryId);
132 }
133
134
141 @Indexable(type = IndexableType.DELETE)
142 public BookmarksEntry deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
143 throws SystemException {
144 return bookmarksEntryPersistence.remove(bookmarksEntry);
145 }
146
147 public DynamicQuery dynamicQuery() {
148 Class<?> clazz = getClass();
149
150 return DynamicQueryFactoryUtil.forClass(BookmarksEntry.class,
151 clazz.getClassLoader());
152 }
153
154
161 @SuppressWarnings("rawtypes")
162 public List dynamicQuery(DynamicQuery dynamicQuery)
163 throws SystemException {
164 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
165 }
166
167
180 @SuppressWarnings("rawtypes")
181 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
182 throws SystemException {
183 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
184 start, end);
185 }
186
187
201 @SuppressWarnings("rawtypes")
202 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
203 OrderByComparator orderByComparator) throws SystemException {
204 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
205 start, end, orderByComparator);
206 }
207
208
215 public long dynamicQueryCount(DynamicQuery dynamicQuery)
216 throws SystemException {
217 return bookmarksEntryPersistence.countWithDynamicQuery(dynamicQuery);
218 }
219
220 public BookmarksEntry fetchBookmarksEntry(long entryId)
221 throws SystemException {
222 return bookmarksEntryPersistence.fetchByPrimaryKey(entryId);
223 }
224
225
233 public BookmarksEntry getBookmarksEntry(long entryId)
234 throws PortalException, SystemException {
235 return bookmarksEntryPersistence.findByPrimaryKey(entryId);
236 }
237
238 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
239 throws PortalException, SystemException {
240 return bookmarksEntryPersistence.findByPrimaryKey(primaryKeyObj);
241 }
242
243
252 public BookmarksEntry getBookmarksEntryByUuidAndGroupId(String uuid,
253 long groupId) throws PortalException, SystemException {
254 return bookmarksEntryPersistence.findByUUID_G(uuid, groupId);
255 }
256
257
269 public List<BookmarksEntry> getBookmarksEntries(int start, int end)
270 throws SystemException {
271 return bookmarksEntryPersistence.findAll(start, end);
272 }
273
274
280 public int getBookmarksEntriesCount() throws SystemException {
281 return bookmarksEntryPersistence.countAll();
282 }
283
284
291 @Indexable(type = IndexableType.REINDEX)
292 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
293 throws SystemException {
294 return updateBookmarksEntry(bookmarksEntry, true);
295 }
296
297
305 @Indexable(type = IndexableType.REINDEX)
306 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry,
307 boolean merge) throws SystemException {
308 bookmarksEntry.setNew(false);
309
310 return bookmarksEntryPersistence.update(bookmarksEntry, merge);
311 }
312
313
318 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
319 return bookmarksEntryLocalService;
320 }
321
322
327 public void setBookmarksEntryLocalService(
328 BookmarksEntryLocalService bookmarksEntryLocalService) {
329 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
330 }
331
332
337 public BookmarksEntryService getBookmarksEntryService() {
338 return bookmarksEntryService;
339 }
340
341
346 public void setBookmarksEntryService(
347 BookmarksEntryService bookmarksEntryService) {
348 this.bookmarksEntryService = bookmarksEntryService;
349 }
350
351
356 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
357 return bookmarksEntryPersistence;
358 }
359
360
365 public void setBookmarksEntryPersistence(
366 BookmarksEntryPersistence bookmarksEntryPersistence) {
367 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
368 }
369
370
375 public BookmarksEntryFinder getBookmarksEntryFinder() {
376 return bookmarksEntryFinder;
377 }
378
379
384 public void setBookmarksEntryFinder(
385 BookmarksEntryFinder bookmarksEntryFinder) {
386 this.bookmarksEntryFinder = bookmarksEntryFinder;
387 }
388
389
394 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
395 return bookmarksFolderLocalService;
396 }
397
398
403 public void setBookmarksFolderLocalService(
404 BookmarksFolderLocalService bookmarksFolderLocalService) {
405 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
406 }
407
408
413 public BookmarksFolderService getBookmarksFolderService() {
414 return bookmarksFolderService;
415 }
416
417
422 public void setBookmarksFolderService(
423 BookmarksFolderService bookmarksFolderService) {
424 this.bookmarksFolderService = bookmarksFolderService;
425 }
426
427
432 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
433 return bookmarksFolderPersistence;
434 }
435
436
441 public void setBookmarksFolderPersistence(
442 BookmarksFolderPersistence bookmarksFolderPersistence) {
443 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
444 }
445
446
451 public BookmarksFolderFinder getBookmarksFolderFinder() {
452 return bookmarksFolderFinder;
453 }
454
455
460 public void setBookmarksFolderFinder(
461 BookmarksFolderFinder bookmarksFolderFinder) {
462 this.bookmarksFolderFinder = bookmarksFolderFinder;
463 }
464
465
470 public CounterLocalService getCounterLocalService() {
471 return counterLocalService;
472 }
473
474
479 public void setCounterLocalService(CounterLocalService counterLocalService) {
480 this.counterLocalService = counterLocalService;
481 }
482
483
488 public ResourceLocalService getResourceLocalService() {
489 return resourceLocalService;
490 }
491
492
497 public void setResourceLocalService(
498 ResourceLocalService resourceLocalService) {
499 this.resourceLocalService = resourceLocalService;
500 }
501
502
507 public ResourceService getResourceService() {
508 return resourceService;
509 }
510
511
516 public void setResourceService(ResourceService resourceService) {
517 this.resourceService = resourceService;
518 }
519
520
525 public ResourcePersistence getResourcePersistence() {
526 return resourcePersistence;
527 }
528
529
534 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
535 this.resourcePersistence = resourcePersistence;
536 }
537
538
543 public ResourceFinder getResourceFinder() {
544 return resourceFinder;
545 }
546
547
552 public void setResourceFinder(ResourceFinder resourceFinder) {
553 this.resourceFinder = resourceFinder;
554 }
555
556
561 public UserLocalService getUserLocalService() {
562 return userLocalService;
563 }
564
565
570 public void setUserLocalService(UserLocalService userLocalService) {
571 this.userLocalService = userLocalService;
572 }
573
574
579 public UserService getUserService() {
580 return userService;
581 }
582
583
588 public void setUserService(UserService userService) {
589 this.userService = userService;
590 }
591
592
597 public UserPersistence getUserPersistence() {
598 return userPersistence;
599 }
600
601
606 public void setUserPersistence(UserPersistence userPersistence) {
607 this.userPersistence = userPersistence;
608 }
609
610
615 public UserFinder getUserFinder() {
616 return userFinder;
617 }
618
619
624 public void setUserFinder(UserFinder userFinder) {
625 this.userFinder = userFinder;
626 }
627
628
633 public AssetEntryLocalService getAssetEntryLocalService() {
634 return assetEntryLocalService;
635 }
636
637
642 public void setAssetEntryLocalService(
643 AssetEntryLocalService assetEntryLocalService) {
644 this.assetEntryLocalService = assetEntryLocalService;
645 }
646
647
652 public AssetEntryService getAssetEntryService() {
653 return assetEntryService;
654 }
655
656
661 public void setAssetEntryService(AssetEntryService assetEntryService) {
662 this.assetEntryService = assetEntryService;
663 }
664
665
670 public AssetEntryPersistence getAssetEntryPersistence() {
671 return assetEntryPersistence;
672 }
673
674
679 public void setAssetEntryPersistence(
680 AssetEntryPersistence assetEntryPersistence) {
681 this.assetEntryPersistence = assetEntryPersistence;
682 }
683
684
689 public AssetEntryFinder getAssetEntryFinder() {
690 return assetEntryFinder;
691 }
692
693
698 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
699 this.assetEntryFinder = assetEntryFinder;
700 }
701
702
707 public AssetLinkLocalService getAssetLinkLocalService() {
708 return assetLinkLocalService;
709 }
710
711
716 public void setAssetLinkLocalService(
717 AssetLinkLocalService assetLinkLocalService) {
718 this.assetLinkLocalService = assetLinkLocalService;
719 }
720
721
726 public AssetLinkPersistence getAssetLinkPersistence() {
727 return assetLinkPersistence;
728 }
729
730
735 public void setAssetLinkPersistence(
736 AssetLinkPersistence assetLinkPersistence) {
737 this.assetLinkPersistence = assetLinkPersistence;
738 }
739
740
745 public AssetTagLocalService getAssetTagLocalService() {
746 return assetTagLocalService;
747 }
748
749
754 public void setAssetTagLocalService(
755 AssetTagLocalService assetTagLocalService) {
756 this.assetTagLocalService = assetTagLocalService;
757 }
758
759
764 public AssetTagService getAssetTagService() {
765 return assetTagService;
766 }
767
768
773 public void setAssetTagService(AssetTagService assetTagService) {
774 this.assetTagService = assetTagService;
775 }
776
777
782 public AssetTagPersistence getAssetTagPersistence() {
783 return assetTagPersistence;
784 }
785
786
791 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
792 this.assetTagPersistence = assetTagPersistence;
793 }
794
795
800 public AssetTagFinder getAssetTagFinder() {
801 return assetTagFinder;
802 }
803
804
809 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
810 this.assetTagFinder = assetTagFinder;
811 }
812
813
818 public ExpandoValueLocalService getExpandoValueLocalService() {
819 return expandoValueLocalService;
820 }
821
822
827 public void setExpandoValueLocalService(
828 ExpandoValueLocalService expandoValueLocalService) {
829 this.expandoValueLocalService = expandoValueLocalService;
830 }
831
832
837 public ExpandoValueService getExpandoValueService() {
838 return expandoValueService;
839 }
840
841
846 public void setExpandoValueService(ExpandoValueService expandoValueService) {
847 this.expandoValueService = expandoValueService;
848 }
849
850
855 public ExpandoValuePersistence getExpandoValuePersistence() {
856 return expandoValuePersistence;
857 }
858
859
864 public void setExpandoValuePersistence(
865 ExpandoValuePersistence expandoValuePersistence) {
866 this.expandoValuePersistence = expandoValuePersistence;
867 }
868
869
874 public SocialActivityLocalService getSocialActivityLocalService() {
875 return socialActivityLocalService;
876 }
877
878
883 public void setSocialActivityLocalService(
884 SocialActivityLocalService socialActivityLocalService) {
885 this.socialActivityLocalService = socialActivityLocalService;
886 }
887
888
893 public SocialActivityPersistence getSocialActivityPersistence() {
894 return socialActivityPersistence;
895 }
896
897
902 public void setSocialActivityPersistence(
903 SocialActivityPersistence socialActivityPersistence) {
904 this.socialActivityPersistence = socialActivityPersistence;
905 }
906
907
912 public SocialActivityFinder getSocialActivityFinder() {
913 return socialActivityFinder;
914 }
915
916
921 public void setSocialActivityFinder(
922 SocialActivityFinder socialActivityFinder) {
923 this.socialActivityFinder = socialActivityFinder;
924 }
925
926 public void afterPropertiesSet() {
927 persistedModelLocalServiceRegistry.register("com.liferay.portlet.bookmarks.model.BookmarksEntry",
928 bookmarksEntryLocalService);
929 }
930
931 public void destroy() {
932 persistedModelLocalServiceRegistry.unregister(
933 "com.liferay.portlet.bookmarks.model.BookmarksEntry");
934 }
935
936
941 public String getBeanIdentifier() {
942 return _beanIdentifier;
943 }
944
945
950 public void setBeanIdentifier(String beanIdentifier) {
951 _beanIdentifier = beanIdentifier;
952 }
953
954 protected Class<?> getModelClass() {
955 return BookmarksEntry.class;
956 }
957
958 protected String getModelClassName() {
959 return BookmarksEntry.class.getName();
960 }
961
962
967 protected void runSQL(String sql) throws SystemException {
968 try {
969 DataSource dataSource = bookmarksEntryPersistence.getDataSource();
970
971 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
972 sql, new int[0]);
973
974 sqlUpdate.update();
975 }
976 catch (Exception e) {
977 throw new SystemException(e);
978 }
979 }
980
981 @BeanReference(type = BookmarksEntryLocalService.class)
982 protected BookmarksEntryLocalService bookmarksEntryLocalService;
983 @BeanReference(type = BookmarksEntryService.class)
984 protected BookmarksEntryService bookmarksEntryService;
985 @BeanReference(type = BookmarksEntryPersistence.class)
986 protected BookmarksEntryPersistence bookmarksEntryPersistence;
987 @BeanReference(type = BookmarksEntryFinder.class)
988 protected BookmarksEntryFinder bookmarksEntryFinder;
989 @BeanReference(type = BookmarksFolderLocalService.class)
990 protected BookmarksFolderLocalService bookmarksFolderLocalService;
991 @BeanReference(type = BookmarksFolderService.class)
992 protected BookmarksFolderService bookmarksFolderService;
993 @BeanReference(type = BookmarksFolderPersistence.class)
994 protected BookmarksFolderPersistence bookmarksFolderPersistence;
995 @BeanReference(type = BookmarksFolderFinder.class)
996 protected BookmarksFolderFinder bookmarksFolderFinder;
997 @BeanReference(type = CounterLocalService.class)
998 protected CounterLocalService counterLocalService;
999 @BeanReference(type = ResourceLocalService.class)
1000 protected ResourceLocalService resourceLocalService;
1001 @BeanReference(type = ResourceService.class)
1002 protected ResourceService resourceService;
1003 @BeanReference(type = ResourcePersistence.class)
1004 protected ResourcePersistence resourcePersistence;
1005 @BeanReference(type = ResourceFinder.class)
1006 protected ResourceFinder resourceFinder;
1007 @BeanReference(type = UserLocalService.class)
1008 protected UserLocalService userLocalService;
1009 @BeanReference(type = UserService.class)
1010 protected UserService userService;
1011 @BeanReference(type = UserPersistence.class)
1012 protected UserPersistence userPersistence;
1013 @BeanReference(type = UserFinder.class)
1014 protected UserFinder userFinder;
1015 @BeanReference(type = AssetEntryLocalService.class)
1016 protected AssetEntryLocalService assetEntryLocalService;
1017 @BeanReference(type = AssetEntryService.class)
1018 protected AssetEntryService assetEntryService;
1019 @BeanReference(type = AssetEntryPersistence.class)
1020 protected AssetEntryPersistence assetEntryPersistence;
1021 @BeanReference(type = AssetEntryFinder.class)
1022 protected AssetEntryFinder assetEntryFinder;
1023 @BeanReference(type = AssetLinkLocalService.class)
1024 protected AssetLinkLocalService assetLinkLocalService;
1025 @BeanReference(type = AssetLinkPersistence.class)
1026 protected AssetLinkPersistence assetLinkPersistence;
1027 @BeanReference(type = AssetTagLocalService.class)
1028 protected AssetTagLocalService assetTagLocalService;
1029 @BeanReference(type = AssetTagService.class)
1030 protected AssetTagService assetTagService;
1031 @BeanReference(type = AssetTagPersistence.class)
1032 protected AssetTagPersistence assetTagPersistence;
1033 @BeanReference(type = AssetTagFinder.class)
1034 protected AssetTagFinder assetTagFinder;
1035 @BeanReference(type = ExpandoValueLocalService.class)
1036 protected ExpandoValueLocalService expandoValueLocalService;
1037 @BeanReference(type = ExpandoValueService.class)
1038 protected ExpandoValueService expandoValueService;
1039 @BeanReference(type = ExpandoValuePersistence.class)
1040 protected ExpandoValuePersistence expandoValuePersistence;
1041 @BeanReference(type = SocialActivityLocalService.class)
1042 protected SocialActivityLocalService socialActivityLocalService;
1043 @BeanReference(type = SocialActivityPersistence.class)
1044 protected SocialActivityPersistence socialActivityPersistence;
1045 @BeanReference(type = SocialActivityFinder.class)
1046 protected SocialActivityFinder socialActivityFinder;
1047 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1048 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1049 private String _beanIdentifier;
1050 }