001
014
015 package com.liferay.portlet.messageboards.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.messageboards.model.MBStatsUser;
047 import com.liferay.portlet.messageboards.service.MBBanLocalService;
048 import com.liferay.portlet.messageboards.service.MBBanService;
049 import com.liferay.portlet.messageboards.service.MBCategoryLocalService;
050 import com.liferay.portlet.messageboards.service.MBCategoryService;
051 import com.liferay.portlet.messageboards.service.MBDiscussionLocalService;
052 import com.liferay.portlet.messageboards.service.MBMailingListLocalService;
053 import com.liferay.portlet.messageboards.service.MBMessageLocalService;
054 import com.liferay.portlet.messageboards.service.MBMessageService;
055 import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
056 import com.liferay.portlet.messageboards.service.MBThreadFlagLocalService;
057 import com.liferay.portlet.messageboards.service.MBThreadLocalService;
058 import com.liferay.portlet.messageboards.service.MBThreadService;
059 import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
060 import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
061 import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
062 import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
063 import com.liferay.portlet.messageboards.service.persistence.MBMailingListPersistence;
064 import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
065 import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
066 import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
067 import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
068 import com.liferay.portlet.messageboards.service.persistence.MBThreadFlagPersistence;
069 import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
070
071 import java.io.Serializable;
072
073 import java.util.List;
074
075 import javax.sql.DataSource;
076
077
089 public abstract class MBStatsUserLocalServiceBaseImpl
090 extends BaseLocalServiceImpl implements MBStatsUserLocalService,
091 IdentifiableBean {
092
097
098
105 @Indexable(type = IndexableType.REINDEX)
106 public MBStatsUser addMBStatsUser(MBStatsUser mbStatsUser)
107 throws SystemException {
108 mbStatsUser.setNew(true);
109
110 return mbStatsUserPersistence.update(mbStatsUser, false);
111 }
112
113
119 public MBStatsUser createMBStatsUser(long statsUserId) {
120 return mbStatsUserPersistence.create(statsUserId);
121 }
122
123
131 @Indexable(type = IndexableType.DELETE)
132 public MBStatsUser deleteMBStatsUser(long statsUserId)
133 throws PortalException, SystemException {
134 return mbStatsUserPersistence.remove(statsUserId);
135 }
136
137
144 @Indexable(type = IndexableType.DELETE)
145 public MBStatsUser deleteMBStatsUser(MBStatsUser mbStatsUser)
146 throws SystemException {
147 return mbStatsUserPersistence.remove(mbStatsUser);
148 }
149
150 public DynamicQuery dynamicQuery() {
151 Class<?> clazz = getClass();
152
153 return DynamicQueryFactoryUtil.forClass(MBStatsUser.class,
154 clazz.getClassLoader());
155 }
156
157
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery)
166 throws SystemException {
167 return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
168 }
169
170
183 @SuppressWarnings("rawtypes")
184 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
185 throws SystemException {
186 return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery, start,
187 end);
188 }
189
190
204 @SuppressWarnings("rawtypes")
205 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
206 OrderByComparator orderByComparator) throws SystemException {
207 return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery, start,
208 end, orderByComparator);
209 }
210
211
218 public long dynamicQueryCount(DynamicQuery dynamicQuery)
219 throws SystemException {
220 return mbStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
221 }
222
223 public MBStatsUser fetchMBStatsUser(long statsUserId)
224 throws SystemException {
225 return mbStatsUserPersistence.fetchByPrimaryKey(statsUserId);
226 }
227
228
236 public MBStatsUser getMBStatsUser(long statsUserId)
237 throws PortalException, SystemException {
238 return mbStatsUserPersistence.findByPrimaryKey(statsUserId);
239 }
240
241 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
242 throws PortalException, SystemException {
243 return mbStatsUserPersistence.findByPrimaryKey(primaryKeyObj);
244 }
245
246
258 public List<MBStatsUser> getMBStatsUsers(int start, int end)
259 throws SystemException {
260 return mbStatsUserPersistence.findAll(start, end);
261 }
262
263
269 public int getMBStatsUsersCount() throws SystemException {
270 return mbStatsUserPersistence.countAll();
271 }
272
273
280 @Indexable(type = IndexableType.REINDEX)
281 public MBStatsUser updateMBStatsUser(MBStatsUser mbStatsUser)
282 throws SystemException {
283 return updateMBStatsUser(mbStatsUser, true);
284 }
285
286
294 @Indexable(type = IndexableType.REINDEX)
295 public MBStatsUser updateMBStatsUser(MBStatsUser mbStatsUser, boolean merge)
296 throws SystemException {
297 mbStatsUser.setNew(false);
298
299 return mbStatsUserPersistence.update(mbStatsUser, merge);
300 }
301
302
307 public MBBanLocalService getMBBanLocalService() {
308 return mbBanLocalService;
309 }
310
311
316 public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
317 this.mbBanLocalService = mbBanLocalService;
318 }
319
320
325 public MBBanService getMBBanService() {
326 return mbBanService;
327 }
328
329
334 public void setMBBanService(MBBanService mbBanService) {
335 this.mbBanService = mbBanService;
336 }
337
338
343 public MBBanPersistence getMBBanPersistence() {
344 return mbBanPersistence;
345 }
346
347
352 public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
353 this.mbBanPersistence = mbBanPersistence;
354 }
355
356
361 public MBCategoryLocalService getMBCategoryLocalService() {
362 return mbCategoryLocalService;
363 }
364
365
370 public void setMBCategoryLocalService(
371 MBCategoryLocalService mbCategoryLocalService) {
372 this.mbCategoryLocalService = mbCategoryLocalService;
373 }
374
375
380 public MBCategoryService getMBCategoryService() {
381 return mbCategoryService;
382 }
383
384
389 public void setMBCategoryService(MBCategoryService mbCategoryService) {
390 this.mbCategoryService = mbCategoryService;
391 }
392
393
398 public MBCategoryPersistence getMBCategoryPersistence() {
399 return mbCategoryPersistence;
400 }
401
402
407 public void setMBCategoryPersistence(
408 MBCategoryPersistence mbCategoryPersistence) {
409 this.mbCategoryPersistence = mbCategoryPersistence;
410 }
411
412
417 public MBCategoryFinder getMBCategoryFinder() {
418 return mbCategoryFinder;
419 }
420
421
426 public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
427 this.mbCategoryFinder = mbCategoryFinder;
428 }
429
430
435 public MBDiscussionLocalService getMBDiscussionLocalService() {
436 return mbDiscussionLocalService;
437 }
438
439
444 public void setMBDiscussionLocalService(
445 MBDiscussionLocalService mbDiscussionLocalService) {
446 this.mbDiscussionLocalService = mbDiscussionLocalService;
447 }
448
449
454 public MBDiscussionPersistence getMBDiscussionPersistence() {
455 return mbDiscussionPersistence;
456 }
457
458
463 public void setMBDiscussionPersistence(
464 MBDiscussionPersistence mbDiscussionPersistence) {
465 this.mbDiscussionPersistence = mbDiscussionPersistence;
466 }
467
468
473 public MBMailingListLocalService getMBMailingListLocalService() {
474 return mbMailingListLocalService;
475 }
476
477
482 public void setMBMailingListLocalService(
483 MBMailingListLocalService mbMailingListLocalService) {
484 this.mbMailingListLocalService = mbMailingListLocalService;
485 }
486
487
492 public MBMailingListPersistence getMBMailingListPersistence() {
493 return mbMailingListPersistence;
494 }
495
496
501 public void setMBMailingListPersistence(
502 MBMailingListPersistence mbMailingListPersistence) {
503 this.mbMailingListPersistence = mbMailingListPersistence;
504 }
505
506
511 public MBMessageLocalService getMBMessageLocalService() {
512 return mbMessageLocalService;
513 }
514
515
520 public void setMBMessageLocalService(
521 MBMessageLocalService mbMessageLocalService) {
522 this.mbMessageLocalService = mbMessageLocalService;
523 }
524
525
530 public MBMessageService getMBMessageService() {
531 return mbMessageService;
532 }
533
534
539 public void setMBMessageService(MBMessageService mbMessageService) {
540 this.mbMessageService = mbMessageService;
541 }
542
543
548 public MBMessagePersistence getMBMessagePersistence() {
549 return mbMessagePersistence;
550 }
551
552
557 public void setMBMessagePersistence(
558 MBMessagePersistence mbMessagePersistence) {
559 this.mbMessagePersistence = mbMessagePersistence;
560 }
561
562
567 public MBMessageFinder getMBMessageFinder() {
568 return mbMessageFinder;
569 }
570
571
576 public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
577 this.mbMessageFinder = mbMessageFinder;
578 }
579
580
585 public MBStatsUserLocalService getMBStatsUserLocalService() {
586 return mbStatsUserLocalService;
587 }
588
589
594 public void setMBStatsUserLocalService(
595 MBStatsUserLocalService mbStatsUserLocalService) {
596 this.mbStatsUserLocalService = mbStatsUserLocalService;
597 }
598
599
604 public MBStatsUserPersistence getMBStatsUserPersistence() {
605 return mbStatsUserPersistence;
606 }
607
608
613 public void setMBStatsUserPersistence(
614 MBStatsUserPersistence mbStatsUserPersistence) {
615 this.mbStatsUserPersistence = mbStatsUserPersistence;
616 }
617
618
623 public MBThreadLocalService getMBThreadLocalService() {
624 return mbThreadLocalService;
625 }
626
627
632 public void setMBThreadLocalService(
633 MBThreadLocalService mbThreadLocalService) {
634 this.mbThreadLocalService = mbThreadLocalService;
635 }
636
637
642 public MBThreadService getMBThreadService() {
643 return mbThreadService;
644 }
645
646
651 public void setMBThreadService(MBThreadService mbThreadService) {
652 this.mbThreadService = mbThreadService;
653 }
654
655
660 public MBThreadPersistence getMBThreadPersistence() {
661 return mbThreadPersistence;
662 }
663
664
669 public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
670 this.mbThreadPersistence = mbThreadPersistence;
671 }
672
673
678 public MBThreadFinder getMBThreadFinder() {
679 return mbThreadFinder;
680 }
681
682
687 public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
688 this.mbThreadFinder = mbThreadFinder;
689 }
690
691
696 public MBThreadFlagLocalService getMBThreadFlagLocalService() {
697 return mbThreadFlagLocalService;
698 }
699
700
705 public void setMBThreadFlagLocalService(
706 MBThreadFlagLocalService mbThreadFlagLocalService) {
707 this.mbThreadFlagLocalService = mbThreadFlagLocalService;
708 }
709
710
715 public MBThreadFlagPersistence getMBThreadFlagPersistence() {
716 return mbThreadFlagPersistence;
717 }
718
719
724 public void setMBThreadFlagPersistence(
725 MBThreadFlagPersistence mbThreadFlagPersistence) {
726 this.mbThreadFlagPersistence = mbThreadFlagPersistence;
727 }
728
729
734 public CounterLocalService getCounterLocalService() {
735 return counterLocalService;
736 }
737
738
743 public void setCounterLocalService(CounterLocalService counterLocalService) {
744 this.counterLocalService = counterLocalService;
745 }
746
747
752 public GroupLocalService getGroupLocalService() {
753 return groupLocalService;
754 }
755
756
761 public void setGroupLocalService(GroupLocalService groupLocalService) {
762 this.groupLocalService = groupLocalService;
763 }
764
765
770 public GroupService getGroupService() {
771 return groupService;
772 }
773
774
779 public void setGroupService(GroupService groupService) {
780 this.groupService = groupService;
781 }
782
783
788 public GroupPersistence getGroupPersistence() {
789 return groupPersistence;
790 }
791
792
797 public void setGroupPersistence(GroupPersistence groupPersistence) {
798 this.groupPersistence = groupPersistence;
799 }
800
801
806 public GroupFinder getGroupFinder() {
807 return groupFinder;
808 }
809
810
815 public void setGroupFinder(GroupFinder groupFinder) {
816 this.groupFinder = groupFinder;
817 }
818
819
824 public ResourceLocalService getResourceLocalService() {
825 return resourceLocalService;
826 }
827
828
833 public void setResourceLocalService(
834 ResourceLocalService resourceLocalService) {
835 this.resourceLocalService = resourceLocalService;
836 }
837
838
843 public ResourceService getResourceService() {
844 return resourceService;
845 }
846
847
852 public void setResourceService(ResourceService resourceService) {
853 this.resourceService = resourceService;
854 }
855
856
861 public ResourcePersistence getResourcePersistence() {
862 return resourcePersistence;
863 }
864
865
870 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
871 this.resourcePersistence = resourcePersistence;
872 }
873
874
879 public ResourceFinder getResourceFinder() {
880 return resourceFinder;
881 }
882
883
888 public void setResourceFinder(ResourceFinder resourceFinder) {
889 this.resourceFinder = resourceFinder;
890 }
891
892
897 public UserLocalService getUserLocalService() {
898 return userLocalService;
899 }
900
901
906 public void setUserLocalService(UserLocalService userLocalService) {
907 this.userLocalService = userLocalService;
908 }
909
910
915 public UserService getUserService() {
916 return userService;
917 }
918
919
924 public void setUserService(UserService userService) {
925 this.userService = userService;
926 }
927
928
933 public UserPersistence getUserPersistence() {
934 return userPersistence;
935 }
936
937
942 public void setUserPersistence(UserPersistence userPersistence) {
943 this.userPersistence = userPersistence;
944 }
945
946
951 public UserFinder getUserFinder() {
952 return userFinder;
953 }
954
955
960 public void setUserFinder(UserFinder userFinder) {
961 this.userFinder = userFinder;
962 }
963
964 public void afterPropertiesSet() {
965 persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBStatsUser",
966 mbStatsUserLocalService);
967 }
968
969 public void destroy() {
970 persistedModelLocalServiceRegistry.unregister(
971 "com.liferay.portlet.messageboards.model.MBStatsUser");
972 }
973
974
979 public String getBeanIdentifier() {
980 return _beanIdentifier;
981 }
982
983
988 public void setBeanIdentifier(String beanIdentifier) {
989 _beanIdentifier = beanIdentifier;
990 }
991
992 protected Class<?> getModelClass() {
993 return MBStatsUser.class;
994 }
995
996 protected String getModelClassName() {
997 return MBStatsUser.class.getName();
998 }
999
1000
1005 protected void runSQL(String sql) throws SystemException {
1006 try {
1007 DataSource dataSource = mbStatsUserPersistence.getDataSource();
1008
1009 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1010 sql, new int[0]);
1011
1012 sqlUpdate.update();
1013 }
1014 catch (Exception e) {
1015 throw new SystemException(e);
1016 }
1017 }
1018
1019 @BeanReference(type = MBBanLocalService.class)
1020 protected MBBanLocalService mbBanLocalService;
1021 @BeanReference(type = MBBanService.class)
1022 protected MBBanService mbBanService;
1023 @BeanReference(type = MBBanPersistence.class)
1024 protected MBBanPersistence mbBanPersistence;
1025 @BeanReference(type = MBCategoryLocalService.class)
1026 protected MBCategoryLocalService mbCategoryLocalService;
1027 @BeanReference(type = MBCategoryService.class)
1028 protected MBCategoryService mbCategoryService;
1029 @BeanReference(type = MBCategoryPersistence.class)
1030 protected MBCategoryPersistence mbCategoryPersistence;
1031 @BeanReference(type = MBCategoryFinder.class)
1032 protected MBCategoryFinder mbCategoryFinder;
1033 @BeanReference(type = MBDiscussionLocalService.class)
1034 protected MBDiscussionLocalService mbDiscussionLocalService;
1035 @BeanReference(type = MBDiscussionPersistence.class)
1036 protected MBDiscussionPersistence mbDiscussionPersistence;
1037 @BeanReference(type = MBMailingListLocalService.class)
1038 protected MBMailingListLocalService mbMailingListLocalService;
1039 @BeanReference(type = MBMailingListPersistence.class)
1040 protected MBMailingListPersistence mbMailingListPersistence;
1041 @BeanReference(type = MBMessageLocalService.class)
1042 protected MBMessageLocalService mbMessageLocalService;
1043 @BeanReference(type = MBMessageService.class)
1044 protected MBMessageService mbMessageService;
1045 @BeanReference(type = MBMessagePersistence.class)
1046 protected MBMessagePersistence mbMessagePersistence;
1047 @BeanReference(type = MBMessageFinder.class)
1048 protected MBMessageFinder mbMessageFinder;
1049 @BeanReference(type = MBStatsUserLocalService.class)
1050 protected MBStatsUserLocalService mbStatsUserLocalService;
1051 @BeanReference(type = MBStatsUserPersistence.class)
1052 protected MBStatsUserPersistence mbStatsUserPersistence;
1053 @BeanReference(type = MBThreadLocalService.class)
1054 protected MBThreadLocalService mbThreadLocalService;
1055 @BeanReference(type = MBThreadService.class)
1056 protected MBThreadService mbThreadService;
1057 @BeanReference(type = MBThreadPersistence.class)
1058 protected MBThreadPersistence mbThreadPersistence;
1059 @BeanReference(type = MBThreadFinder.class)
1060 protected MBThreadFinder mbThreadFinder;
1061 @BeanReference(type = MBThreadFlagLocalService.class)
1062 protected MBThreadFlagLocalService mbThreadFlagLocalService;
1063 @BeanReference(type = MBThreadFlagPersistence.class)
1064 protected MBThreadFlagPersistence mbThreadFlagPersistence;
1065 @BeanReference(type = CounterLocalService.class)
1066 protected CounterLocalService counterLocalService;
1067 @BeanReference(type = GroupLocalService.class)
1068 protected GroupLocalService groupLocalService;
1069 @BeanReference(type = GroupService.class)
1070 protected GroupService groupService;
1071 @BeanReference(type = GroupPersistence.class)
1072 protected GroupPersistence groupPersistence;
1073 @BeanReference(type = GroupFinder.class)
1074 protected GroupFinder groupFinder;
1075 @BeanReference(type = ResourceLocalService.class)
1076 protected ResourceLocalService resourceLocalService;
1077 @BeanReference(type = ResourceService.class)
1078 protected ResourceService resourceService;
1079 @BeanReference(type = ResourcePersistence.class)
1080 protected ResourcePersistence resourcePersistence;
1081 @BeanReference(type = ResourceFinder.class)
1082 protected ResourceFinder resourceFinder;
1083 @BeanReference(type = UserLocalService.class)
1084 protected UserLocalService userLocalService;
1085 @BeanReference(type = UserService.class)
1086 protected UserService userService;
1087 @BeanReference(type = UserPersistence.class)
1088 protected UserPersistence userPersistence;
1089 @BeanReference(type = UserFinder.class)
1090 protected UserFinder userFinder;
1091 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1092 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1093 private String _beanIdentifier;
1094 }