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.BookmarksFolderPersistence;
060 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
061 import com.liferay.portlet.expando.service.ExpandoValueService;
062 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
063 import com.liferay.portlet.social.service.SocialActivityLocalService;
064 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
065 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
066
067 import java.io.Serializable;
068
069 import java.util.List;
070
071 import javax.sql.DataSource;
072
073
085 public abstract class BookmarksEntryLocalServiceBaseImpl
086 extends BaseLocalServiceImpl implements BookmarksEntryLocalService,
087 IdentifiableBean {
088
093
094
101 @Indexable(type = IndexableType.REINDEX)
102 public BookmarksEntry addBookmarksEntry(BookmarksEntry bookmarksEntry)
103 throws SystemException {
104 bookmarksEntry.setNew(true);
105
106 return bookmarksEntryPersistence.update(bookmarksEntry, false);
107 }
108
109
115 public BookmarksEntry createBookmarksEntry(long entryId) {
116 return bookmarksEntryPersistence.create(entryId);
117 }
118
119
127 @Indexable(type = IndexableType.DELETE)
128 public BookmarksEntry deleteBookmarksEntry(long entryId)
129 throws PortalException, SystemException {
130 return bookmarksEntryPersistence.remove(entryId);
131 }
132
133
140 @Indexable(type = IndexableType.DELETE)
141 public BookmarksEntry deleteBookmarksEntry(BookmarksEntry bookmarksEntry)
142 throws SystemException {
143 return bookmarksEntryPersistence.remove(bookmarksEntry);
144 }
145
146 public DynamicQuery dynamicQuery() {
147 Class<?> clazz = getClass();
148
149 return DynamicQueryFactoryUtil.forClass(BookmarksEntry.class,
150 clazz.getClassLoader());
151 }
152
153
160 @SuppressWarnings("rawtypes")
161 public List dynamicQuery(DynamicQuery dynamicQuery)
162 throws SystemException {
163 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery);
164 }
165
166
179 @SuppressWarnings("rawtypes")
180 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
181 throws SystemException {
182 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
183 start, end);
184 }
185
186
200 @SuppressWarnings("rawtypes")
201 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
202 OrderByComparator orderByComparator) throws SystemException {
203 return bookmarksEntryPersistence.findWithDynamicQuery(dynamicQuery,
204 start, end, orderByComparator);
205 }
206
207
214 public long dynamicQueryCount(DynamicQuery dynamicQuery)
215 throws SystemException {
216 return bookmarksEntryPersistence.countWithDynamicQuery(dynamicQuery);
217 }
218
219 public BookmarksEntry fetchBookmarksEntry(long entryId)
220 throws SystemException {
221 return bookmarksEntryPersistence.fetchByPrimaryKey(entryId);
222 }
223
224
232 public BookmarksEntry getBookmarksEntry(long entryId)
233 throws PortalException, SystemException {
234 return bookmarksEntryPersistence.findByPrimaryKey(entryId);
235 }
236
237 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
238 throws PortalException, SystemException {
239 return bookmarksEntryPersistence.findByPrimaryKey(primaryKeyObj);
240 }
241
242
251 public BookmarksEntry getBookmarksEntryByUuidAndGroupId(String uuid,
252 long groupId) throws PortalException, SystemException {
253 return bookmarksEntryPersistence.findByUUID_G(uuid, groupId);
254 }
255
256
268 public List<BookmarksEntry> getBookmarksEntries(int start, int end)
269 throws SystemException {
270 return bookmarksEntryPersistence.findAll(start, end);
271 }
272
273
279 public int getBookmarksEntriesCount() throws SystemException {
280 return bookmarksEntryPersistence.countAll();
281 }
282
283
290 @Indexable(type = IndexableType.REINDEX)
291 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry)
292 throws SystemException {
293 return updateBookmarksEntry(bookmarksEntry, true);
294 }
295
296
304 @Indexable(type = IndexableType.REINDEX)
305 public BookmarksEntry updateBookmarksEntry(BookmarksEntry bookmarksEntry,
306 boolean merge) throws SystemException {
307 bookmarksEntry.setNew(false);
308
309 return bookmarksEntryPersistence.update(bookmarksEntry, merge);
310 }
311
312
317 public BookmarksEntryLocalService getBookmarksEntryLocalService() {
318 return bookmarksEntryLocalService;
319 }
320
321
326 public void setBookmarksEntryLocalService(
327 BookmarksEntryLocalService bookmarksEntryLocalService) {
328 this.bookmarksEntryLocalService = bookmarksEntryLocalService;
329 }
330
331
336 public BookmarksEntryService getBookmarksEntryService() {
337 return bookmarksEntryService;
338 }
339
340
345 public void setBookmarksEntryService(
346 BookmarksEntryService bookmarksEntryService) {
347 this.bookmarksEntryService = bookmarksEntryService;
348 }
349
350
355 public BookmarksEntryPersistence getBookmarksEntryPersistence() {
356 return bookmarksEntryPersistence;
357 }
358
359
364 public void setBookmarksEntryPersistence(
365 BookmarksEntryPersistence bookmarksEntryPersistence) {
366 this.bookmarksEntryPersistence = bookmarksEntryPersistence;
367 }
368
369
374 public BookmarksEntryFinder getBookmarksEntryFinder() {
375 return bookmarksEntryFinder;
376 }
377
378
383 public void setBookmarksEntryFinder(
384 BookmarksEntryFinder bookmarksEntryFinder) {
385 this.bookmarksEntryFinder = bookmarksEntryFinder;
386 }
387
388
393 public BookmarksFolderLocalService getBookmarksFolderLocalService() {
394 return bookmarksFolderLocalService;
395 }
396
397
402 public void setBookmarksFolderLocalService(
403 BookmarksFolderLocalService bookmarksFolderLocalService) {
404 this.bookmarksFolderLocalService = bookmarksFolderLocalService;
405 }
406
407
412 public BookmarksFolderService getBookmarksFolderService() {
413 return bookmarksFolderService;
414 }
415
416
421 public void setBookmarksFolderService(
422 BookmarksFolderService bookmarksFolderService) {
423 this.bookmarksFolderService = bookmarksFolderService;
424 }
425
426
431 public BookmarksFolderPersistence getBookmarksFolderPersistence() {
432 return bookmarksFolderPersistence;
433 }
434
435
440 public void setBookmarksFolderPersistence(
441 BookmarksFolderPersistence bookmarksFolderPersistence) {
442 this.bookmarksFolderPersistence = bookmarksFolderPersistence;
443 }
444
445
450 public CounterLocalService getCounterLocalService() {
451 return counterLocalService;
452 }
453
454
459 public void setCounterLocalService(CounterLocalService counterLocalService) {
460 this.counterLocalService = counterLocalService;
461 }
462
463
468 public ResourceLocalService getResourceLocalService() {
469 return resourceLocalService;
470 }
471
472
477 public void setResourceLocalService(
478 ResourceLocalService resourceLocalService) {
479 this.resourceLocalService = resourceLocalService;
480 }
481
482
487 public ResourceService getResourceService() {
488 return resourceService;
489 }
490
491
496 public void setResourceService(ResourceService resourceService) {
497 this.resourceService = resourceService;
498 }
499
500
505 public ResourcePersistence getResourcePersistence() {
506 return resourcePersistence;
507 }
508
509
514 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
515 this.resourcePersistence = resourcePersistence;
516 }
517
518
523 public ResourceFinder getResourceFinder() {
524 return resourceFinder;
525 }
526
527
532 public void setResourceFinder(ResourceFinder resourceFinder) {
533 this.resourceFinder = resourceFinder;
534 }
535
536
541 public UserLocalService getUserLocalService() {
542 return userLocalService;
543 }
544
545
550 public void setUserLocalService(UserLocalService userLocalService) {
551 this.userLocalService = userLocalService;
552 }
553
554
559 public UserService getUserService() {
560 return userService;
561 }
562
563
568 public void setUserService(UserService userService) {
569 this.userService = userService;
570 }
571
572
577 public UserPersistence getUserPersistence() {
578 return userPersistence;
579 }
580
581
586 public void setUserPersistence(UserPersistence userPersistence) {
587 this.userPersistence = userPersistence;
588 }
589
590
595 public UserFinder getUserFinder() {
596 return userFinder;
597 }
598
599
604 public void setUserFinder(UserFinder userFinder) {
605 this.userFinder = userFinder;
606 }
607
608
613 public AssetEntryLocalService getAssetEntryLocalService() {
614 return assetEntryLocalService;
615 }
616
617
622 public void setAssetEntryLocalService(
623 AssetEntryLocalService assetEntryLocalService) {
624 this.assetEntryLocalService = assetEntryLocalService;
625 }
626
627
632 public AssetEntryService getAssetEntryService() {
633 return assetEntryService;
634 }
635
636
641 public void setAssetEntryService(AssetEntryService assetEntryService) {
642 this.assetEntryService = assetEntryService;
643 }
644
645
650 public AssetEntryPersistence getAssetEntryPersistence() {
651 return assetEntryPersistence;
652 }
653
654
659 public void setAssetEntryPersistence(
660 AssetEntryPersistence assetEntryPersistence) {
661 this.assetEntryPersistence = assetEntryPersistence;
662 }
663
664
669 public AssetEntryFinder getAssetEntryFinder() {
670 return assetEntryFinder;
671 }
672
673
678 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
679 this.assetEntryFinder = assetEntryFinder;
680 }
681
682
687 public AssetLinkLocalService getAssetLinkLocalService() {
688 return assetLinkLocalService;
689 }
690
691
696 public void setAssetLinkLocalService(
697 AssetLinkLocalService assetLinkLocalService) {
698 this.assetLinkLocalService = assetLinkLocalService;
699 }
700
701
706 public AssetLinkPersistence getAssetLinkPersistence() {
707 return assetLinkPersistence;
708 }
709
710
715 public void setAssetLinkPersistence(
716 AssetLinkPersistence assetLinkPersistence) {
717 this.assetLinkPersistence = assetLinkPersistence;
718 }
719
720
725 public AssetTagLocalService getAssetTagLocalService() {
726 return assetTagLocalService;
727 }
728
729
734 public void setAssetTagLocalService(
735 AssetTagLocalService assetTagLocalService) {
736 this.assetTagLocalService = assetTagLocalService;
737 }
738
739
744 public AssetTagService getAssetTagService() {
745 return assetTagService;
746 }
747
748
753 public void setAssetTagService(AssetTagService assetTagService) {
754 this.assetTagService = assetTagService;
755 }
756
757
762 public AssetTagPersistence getAssetTagPersistence() {
763 return assetTagPersistence;
764 }
765
766
771 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
772 this.assetTagPersistence = assetTagPersistence;
773 }
774
775
780 public AssetTagFinder getAssetTagFinder() {
781 return assetTagFinder;
782 }
783
784
789 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
790 this.assetTagFinder = assetTagFinder;
791 }
792
793
798 public ExpandoValueLocalService getExpandoValueLocalService() {
799 return expandoValueLocalService;
800 }
801
802
807 public void setExpandoValueLocalService(
808 ExpandoValueLocalService expandoValueLocalService) {
809 this.expandoValueLocalService = expandoValueLocalService;
810 }
811
812
817 public ExpandoValueService getExpandoValueService() {
818 return expandoValueService;
819 }
820
821
826 public void setExpandoValueService(ExpandoValueService expandoValueService) {
827 this.expandoValueService = expandoValueService;
828 }
829
830
835 public ExpandoValuePersistence getExpandoValuePersistence() {
836 return expandoValuePersistence;
837 }
838
839
844 public void setExpandoValuePersistence(
845 ExpandoValuePersistence expandoValuePersistence) {
846 this.expandoValuePersistence = expandoValuePersistence;
847 }
848
849
854 public SocialActivityLocalService getSocialActivityLocalService() {
855 return socialActivityLocalService;
856 }
857
858
863 public void setSocialActivityLocalService(
864 SocialActivityLocalService socialActivityLocalService) {
865 this.socialActivityLocalService = socialActivityLocalService;
866 }
867
868
873 public SocialActivityPersistence getSocialActivityPersistence() {
874 return socialActivityPersistence;
875 }
876
877
882 public void setSocialActivityPersistence(
883 SocialActivityPersistence socialActivityPersistence) {
884 this.socialActivityPersistence = socialActivityPersistence;
885 }
886
887
892 public SocialActivityFinder getSocialActivityFinder() {
893 return socialActivityFinder;
894 }
895
896
901 public void setSocialActivityFinder(
902 SocialActivityFinder socialActivityFinder) {
903 this.socialActivityFinder = socialActivityFinder;
904 }
905
906 public void afterPropertiesSet() {
907 persistedModelLocalServiceRegistry.register("com.liferay.portlet.bookmarks.model.BookmarksEntry",
908 bookmarksEntryLocalService);
909 }
910
911 public void destroy() {
912 persistedModelLocalServiceRegistry.unregister(
913 "com.liferay.portlet.bookmarks.model.BookmarksEntry");
914 }
915
916
921 public String getBeanIdentifier() {
922 return _beanIdentifier;
923 }
924
925
930 public void setBeanIdentifier(String beanIdentifier) {
931 _beanIdentifier = beanIdentifier;
932 }
933
934 protected Class<?> getModelClass() {
935 return BookmarksEntry.class;
936 }
937
938 protected String getModelClassName() {
939 return BookmarksEntry.class.getName();
940 }
941
942
947 protected void runSQL(String sql) throws SystemException {
948 try {
949 DataSource dataSource = bookmarksEntryPersistence.getDataSource();
950
951 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
952 sql, new int[0]);
953
954 sqlUpdate.update();
955 }
956 catch (Exception e) {
957 throw new SystemException(e);
958 }
959 }
960
961 @BeanReference(type = BookmarksEntryLocalService.class)
962 protected BookmarksEntryLocalService bookmarksEntryLocalService;
963 @BeanReference(type = BookmarksEntryService.class)
964 protected BookmarksEntryService bookmarksEntryService;
965 @BeanReference(type = BookmarksEntryPersistence.class)
966 protected BookmarksEntryPersistence bookmarksEntryPersistence;
967 @BeanReference(type = BookmarksEntryFinder.class)
968 protected BookmarksEntryFinder bookmarksEntryFinder;
969 @BeanReference(type = BookmarksFolderLocalService.class)
970 protected BookmarksFolderLocalService bookmarksFolderLocalService;
971 @BeanReference(type = BookmarksFolderService.class)
972 protected BookmarksFolderService bookmarksFolderService;
973 @BeanReference(type = BookmarksFolderPersistence.class)
974 protected BookmarksFolderPersistence bookmarksFolderPersistence;
975 @BeanReference(type = CounterLocalService.class)
976 protected CounterLocalService counterLocalService;
977 @BeanReference(type = ResourceLocalService.class)
978 protected ResourceLocalService resourceLocalService;
979 @BeanReference(type = ResourceService.class)
980 protected ResourceService resourceService;
981 @BeanReference(type = ResourcePersistence.class)
982 protected ResourcePersistence resourcePersistence;
983 @BeanReference(type = ResourceFinder.class)
984 protected ResourceFinder resourceFinder;
985 @BeanReference(type = UserLocalService.class)
986 protected UserLocalService userLocalService;
987 @BeanReference(type = UserService.class)
988 protected UserService userService;
989 @BeanReference(type = UserPersistence.class)
990 protected UserPersistence userPersistence;
991 @BeanReference(type = UserFinder.class)
992 protected UserFinder userFinder;
993 @BeanReference(type = AssetEntryLocalService.class)
994 protected AssetEntryLocalService assetEntryLocalService;
995 @BeanReference(type = AssetEntryService.class)
996 protected AssetEntryService assetEntryService;
997 @BeanReference(type = AssetEntryPersistence.class)
998 protected AssetEntryPersistence assetEntryPersistence;
999 @BeanReference(type = AssetEntryFinder.class)
1000 protected AssetEntryFinder assetEntryFinder;
1001 @BeanReference(type = AssetLinkLocalService.class)
1002 protected AssetLinkLocalService assetLinkLocalService;
1003 @BeanReference(type = AssetLinkPersistence.class)
1004 protected AssetLinkPersistence assetLinkPersistence;
1005 @BeanReference(type = AssetTagLocalService.class)
1006 protected AssetTagLocalService assetTagLocalService;
1007 @BeanReference(type = AssetTagService.class)
1008 protected AssetTagService assetTagService;
1009 @BeanReference(type = AssetTagPersistence.class)
1010 protected AssetTagPersistence assetTagPersistence;
1011 @BeanReference(type = AssetTagFinder.class)
1012 protected AssetTagFinder assetTagFinder;
1013 @BeanReference(type = ExpandoValueLocalService.class)
1014 protected ExpandoValueLocalService expandoValueLocalService;
1015 @BeanReference(type = ExpandoValueService.class)
1016 protected ExpandoValueService expandoValueService;
1017 @BeanReference(type = ExpandoValuePersistence.class)
1018 protected ExpandoValuePersistence expandoValuePersistence;
1019 @BeanReference(type = SocialActivityLocalService.class)
1020 protected SocialActivityLocalService socialActivityLocalService;
1021 @BeanReference(type = SocialActivityPersistence.class)
1022 protected SocialActivityPersistence socialActivityPersistence;
1023 @BeanReference(type = SocialActivityFinder.class)
1024 protected SocialActivityFinder socialActivityFinder;
1025 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1026 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1027 private String _beanIdentifier;
1028 }