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.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.messageboards.model.MBMessageFlag;
036 import com.liferay.portlet.messageboards.service.MBBanLocalService;
037 import com.liferay.portlet.messageboards.service.MBBanService;
038 import com.liferay.portlet.messageboards.service.MBCategoryLocalService;
039 import com.liferay.portlet.messageboards.service.MBCategoryService;
040 import com.liferay.portlet.messageboards.service.MBDiscussionLocalService;
041 import com.liferay.portlet.messageboards.service.MBMailingListLocalService;
042 import com.liferay.portlet.messageboards.service.MBMessageFlagLocalService;
043 import com.liferay.portlet.messageboards.service.MBMessageFlagService;
044 import com.liferay.portlet.messageboards.service.MBMessageLocalService;
045 import com.liferay.portlet.messageboards.service.MBMessageService;
046 import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
047 import com.liferay.portlet.messageboards.service.MBThreadLocalService;
048 import com.liferay.portlet.messageboards.service.MBThreadService;
049 import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
050 import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
051 import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
052 import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
053 import com.liferay.portlet.messageboards.service.persistence.MBMailingListPersistence;
054 import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
055 import com.liferay.portlet.messageboards.service.persistence.MBMessageFlagPersistence;
056 import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
057 import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
058 import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
059 import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
060
061 import java.util.List;
062
063 import javax.sql.DataSource;
064
065
081 public abstract class MBMessageFlagLocalServiceBaseImpl
082 implements MBMessageFlagLocalService {
083
090 public MBMessageFlag addMBMessageFlag(MBMessageFlag mbMessageFlag)
091 throws SystemException {
092 mbMessageFlag.setNew(true);
093
094 return mbMessageFlagPersistence.update(mbMessageFlag, false);
095 }
096
097
103 public MBMessageFlag createMBMessageFlag(long messageFlagId) {
104 return mbMessageFlagPersistence.create(messageFlagId);
105 }
106
107
114 public void deleteMBMessageFlag(long messageFlagId)
115 throws PortalException, SystemException {
116 mbMessageFlagPersistence.remove(messageFlagId);
117 }
118
119
125 public void deleteMBMessageFlag(MBMessageFlag mbMessageFlag)
126 throws SystemException {
127 mbMessageFlagPersistence.remove(mbMessageFlag);
128 }
129
130
137 @SuppressWarnings("rawtypes")
138 public List dynamicQuery(DynamicQuery dynamicQuery)
139 throws SystemException {
140 return mbMessageFlagPersistence.findWithDynamicQuery(dynamicQuery);
141 }
142
143
156 @SuppressWarnings("rawtypes")
157 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
158 throws SystemException {
159 return mbMessageFlagPersistence.findWithDynamicQuery(dynamicQuery,
160 start, end);
161 }
162
163
177 @SuppressWarnings("rawtypes")
178 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
179 OrderByComparator orderByComparator) throws SystemException {
180 return mbMessageFlagPersistence.findWithDynamicQuery(dynamicQuery,
181 start, end, orderByComparator);
182 }
183
184
191 public long dynamicQueryCount(DynamicQuery dynamicQuery)
192 throws SystemException {
193 return mbMessageFlagPersistence.countWithDynamicQuery(dynamicQuery);
194 }
195
196
204 public MBMessageFlag getMBMessageFlag(long messageFlagId)
205 throws PortalException, SystemException {
206 return mbMessageFlagPersistence.findByPrimaryKey(messageFlagId);
207 }
208
209
221 public List<MBMessageFlag> getMBMessageFlags(int start, int end)
222 throws SystemException {
223 return mbMessageFlagPersistence.findAll(start, end);
224 }
225
226
232 public int getMBMessageFlagsCount() throws SystemException {
233 return mbMessageFlagPersistence.countAll();
234 }
235
236
243 public MBMessageFlag updateMBMessageFlag(MBMessageFlag mbMessageFlag)
244 throws SystemException {
245 mbMessageFlag.setNew(false);
246
247 return mbMessageFlagPersistence.update(mbMessageFlag, true);
248 }
249
250
258 public MBMessageFlag updateMBMessageFlag(MBMessageFlag mbMessageFlag,
259 boolean merge) throws SystemException {
260 mbMessageFlag.setNew(false);
261
262 return mbMessageFlagPersistence.update(mbMessageFlag, merge);
263 }
264
265
270 public MBBanLocalService getMBBanLocalService() {
271 return mbBanLocalService;
272 }
273
274
279 public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
280 this.mbBanLocalService = mbBanLocalService;
281 }
282
283
288 public MBBanService getMBBanService() {
289 return mbBanService;
290 }
291
292
297 public void setMBBanService(MBBanService mbBanService) {
298 this.mbBanService = mbBanService;
299 }
300
301
306 public MBBanPersistence getMBBanPersistence() {
307 return mbBanPersistence;
308 }
309
310
315 public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
316 this.mbBanPersistence = mbBanPersistence;
317 }
318
319
324 public MBCategoryLocalService getMBCategoryLocalService() {
325 return mbCategoryLocalService;
326 }
327
328
333 public void setMBCategoryLocalService(
334 MBCategoryLocalService mbCategoryLocalService) {
335 this.mbCategoryLocalService = mbCategoryLocalService;
336 }
337
338
343 public MBCategoryService getMBCategoryService() {
344 return mbCategoryService;
345 }
346
347
352 public void setMBCategoryService(MBCategoryService mbCategoryService) {
353 this.mbCategoryService = mbCategoryService;
354 }
355
356
361 public MBCategoryPersistence getMBCategoryPersistence() {
362 return mbCategoryPersistence;
363 }
364
365
370 public void setMBCategoryPersistence(
371 MBCategoryPersistence mbCategoryPersistence) {
372 this.mbCategoryPersistence = mbCategoryPersistence;
373 }
374
375
380 public MBCategoryFinder getMBCategoryFinder() {
381 return mbCategoryFinder;
382 }
383
384
389 public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
390 this.mbCategoryFinder = mbCategoryFinder;
391 }
392
393
398 public MBDiscussionLocalService getMBDiscussionLocalService() {
399 return mbDiscussionLocalService;
400 }
401
402
407 public void setMBDiscussionLocalService(
408 MBDiscussionLocalService mbDiscussionLocalService) {
409 this.mbDiscussionLocalService = mbDiscussionLocalService;
410 }
411
412
417 public MBDiscussionPersistence getMBDiscussionPersistence() {
418 return mbDiscussionPersistence;
419 }
420
421
426 public void setMBDiscussionPersistence(
427 MBDiscussionPersistence mbDiscussionPersistence) {
428 this.mbDiscussionPersistence = mbDiscussionPersistence;
429 }
430
431
436 public MBMailingListLocalService getMBMailingListLocalService() {
437 return mbMailingListLocalService;
438 }
439
440
445 public void setMBMailingListLocalService(
446 MBMailingListLocalService mbMailingListLocalService) {
447 this.mbMailingListLocalService = mbMailingListLocalService;
448 }
449
450
455 public MBMailingListPersistence getMBMailingListPersistence() {
456 return mbMailingListPersistence;
457 }
458
459
464 public void setMBMailingListPersistence(
465 MBMailingListPersistence mbMailingListPersistence) {
466 this.mbMailingListPersistence = mbMailingListPersistence;
467 }
468
469
474 public MBMessageLocalService getMBMessageLocalService() {
475 return mbMessageLocalService;
476 }
477
478
483 public void setMBMessageLocalService(
484 MBMessageLocalService mbMessageLocalService) {
485 this.mbMessageLocalService = mbMessageLocalService;
486 }
487
488
493 public MBMessageService getMBMessageService() {
494 return mbMessageService;
495 }
496
497
502 public void setMBMessageService(MBMessageService mbMessageService) {
503 this.mbMessageService = mbMessageService;
504 }
505
506
511 public MBMessagePersistence getMBMessagePersistence() {
512 return mbMessagePersistence;
513 }
514
515
520 public void setMBMessagePersistence(
521 MBMessagePersistence mbMessagePersistence) {
522 this.mbMessagePersistence = mbMessagePersistence;
523 }
524
525
530 public MBMessageFinder getMBMessageFinder() {
531 return mbMessageFinder;
532 }
533
534
539 public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
540 this.mbMessageFinder = mbMessageFinder;
541 }
542
543
548 public MBMessageFlagLocalService getMBMessageFlagLocalService() {
549 return mbMessageFlagLocalService;
550 }
551
552
557 public void setMBMessageFlagLocalService(
558 MBMessageFlagLocalService mbMessageFlagLocalService) {
559 this.mbMessageFlagLocalService = mbMessageFlagLocalService;
560 }
561
562
567 public MBMessageFlagService getMBMessageFlagService() {
568 return mbMessageFlagService;
569 }
570
571
576 public void setMBMessageFlagService(
577 MBMessageFlagService mbMessageFlagService) {
578 this.mbMessageFlagService = mbMessageFlagService;
579 }
580
581
586 public MBMessageFlagPersistence getMBMessageFlagPersistence() {
587 return mbMessageFlagPersistence;
588 }
589
590
595 public void setMBMessageFlagPersistence(
596 MBMessageFlagPersistence mbMessageFlagPersistence) {
597 this.mbMessageFlagPersistence = mbMessageFlagPersistence;
598 }
599
600
605 public MBStatsUserLocalService getMBStatsUserLocalService() {
606 return mbStatsUserLocalService;
607 }
608
609
614 public void setMBStatsUserLocalService(
615 MBStatsUserLocalService mbStatsUserLocalService) {
616 this.mbStatsUserLocalService = mbStatsUserLocalService;
617 }
618
619
624 public MBStatsUserPersistence getMBStatsUserPersistence() {
625 return mbStatsUserPersistence;
626 }
627
628
633 public void setMBStatsUserPersistence(
634 MBStatsUserPersistence mbStatsUserPersistence) {
635 this.mbStatsUserPersistence = mbStatsUserPersistence;
636 }
637
638
643 public MBThreadLocalService getMBThreadLocalService() {
644 return mbThreadLocalService;
645 }
646
647
652 public void setMBThreadLocalService(
653 MBThreadLocalService mbThreadLocalService) {
654 this.mbThreadLocalService = mbThreadLocalService;
655 }
656
657
662 public MBThreadService getMBThreadService() {
663 return mbThreadService;
664 }
665
666
671 public void setMBThreadService(MBThreadService mbThreadService) {
672 this.mbThreadService = mbThreadService;
673 }
674
675
680 public MBThreadPersistence getMBThreadPersistence() {
681 return mbThreadPersistence;
682 }
683
684
689 public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
690 this.mbThreadPersistence = mbThreadPersistence;
691 }
692
693
698 public MBThreadFinder getMBThreadFinder() {
699 return mbThreadFinder;
700 }
701
702
707 public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
708 this.mbThreadFinder = mbThreadFinder;
709 }
710
711
716 public CounterLocalService getCounterLocalService() {
717 return counterLocalService;
718 }
719
720
725 public void setCounterLocalService(CounterLocalService counterLocalService) {
726 this.counterLocalService = counterLocalService;
727 }
728
729
734 public ResourceLocalService getResourceLocalService() {
735 return resourceLocalService;
736 }
737
738
743 public void setResourceLocalService(
744 ResourceLocalService resourceLocalService) {
745 this.resourceLocalService = resourceLocalService;
746 }
747
748
753 public ResourceService getResourceService() {
754 return resourceService;
755 }
756
757
762 public void setResourceService(ResourceService resourceService) {
763 this.resourceService = resourceService;
764 }
765
766
771 public ResourcePersistence getResourcePersistence() {
772 return resourcePersistence;
773 }
774
775
780 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
781 this.resourcePersistence = resourcePersistence;
782 }
783
784
789 public ResourceFinder getResourceFinder() {
790 return resourceFinder;
791 }
792
793
798 public void setResourceFinder(ResourceFinder resourceFinder) {
799 this.resourceFinder = resourceFinder;
800 }
801
802
807 public UserLocalService getUserLocalService() {
808 return userLocalService;
809 }
810
811
816 public void setUserLocalService(UserLocalService userLocalService) {
817 this.userLocalService = userLocalService;
818 }
819
820
825 public UserService getUserService() {
826 return userService;
827 }
828
829
834 public void setUserService(UserService userService) {
835 this.userService = userService;
836 }
837
838
843 public UserPersistence getUserPersistence() {
844 return userPersistence;
845 }
846
847
852 public void setUserPersistence(UserPersistence userPersistence) {
853 this.userPersistence = userPersistence;
854 }
855
856
861 public UserFinder getUserFinder() {
862 return userFinder;
863 }
864
865
870 public void setUserFinder(UserFinder userFinder) {
871 this.userFinder = userFinder;
872 }
873
874
879 protected void runSQL(String sql) throws SystemException {
880 try {
881 DataSource dataSource = mbMessageFlagPersistence.getDataSource();
882
883 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
884 sql, new int[0]);
885
886 sqlUpdate.update();
887 }
888 catch (Exception e) {
889 throw new SystemException(e);
890 }
891 }
892
893 @BeanReference(type = MBBanLocalService.class)
894 protected MBBanLocalService mbBanLocalService;
895 @BeanReference(type = MBBanService.class)
896 protected MBBanService mbBanService;
897 @BeanReference(type = MBBanPersistence.class)
898 protected MBBanPersistence mbBanPersistence;
899 @BeanReference(type = MBCategoryLocalService.class)
900 protected MBCategoryLocalService mbCategoryLocalService;
901 @BeanReference(type = MBCategoryService.class)
902 protected MBCategoryService mbCategoryService;
903 @BeanReference(type = MBCategoryPersistence.class)
904 protected MBCategoryPersistence mbCategoryPersistence;
905 @BeanReference(type = MBCategoryFinder.class)
906 protected MBCategoryFinder mbCategoryFinder;
907 @BeanReference(type = MBDiscussionLocalService.class)
908 protected MBDiscussionLocalService mbDiscussionLocalService;
909 @BeanReference(type = MBDiscussionPersistence.class)
910 protected MBDiscussionPersistence mbDiscussionPersistence;
911 @BeanReference(type = MBMailingListLocalService.class)
912 protected MBMailingListLocalService mbMailingListLocalService;
913 @BeanReference(type = MBMailingListPersistence.class)
914 protected MBMailingListPersistence mbMailingListPersistence;
915 @BeanReference(type = MBMessageLocalService.class)
916 protected MBMessageLocalService mbMessageLocalService;
917 @BeanReference(type = MBMessageService.class)
918 protected MBMessageService mbMessageService;
919 @BeanReference(type = MBMessagePersistence.class)
920 protected MBMessagePersistence mbMessagePersistence;
921 @BeanReference(type = MBMessageFinder.class)
922 protected MBMessageFinder mbMessageFinder;
923 @BeanReference(type = MBMessageFlagLocalService.class)
924 protected MBMessageFlagLocalService mbMessageFlagLocalService;
925 @BeanReference(type = MBMessageFlagService.class)
926 protected MBMessageFlagService mbMessageFlagService;
927 @BeanReference(type = MBMessageFlagPersistence.class)
928 protected MBMessageFlagPersistence mbMessageFlagPersistence;
929 @BeanReference(type = MBStatsUserLocalService.class)
930 protected MBStatsUserLocalService mbStatsUserLocalService;
931 @BeanReference(type = MBStatsUserPersistence.class)
932 protected MBStatsUserPersistence mbStatsUserPersistence;
933 @BeanReference(type = MBThreadLocalService.class)
934 protected MBThreadLocalService mbThreadLocalService;
935 @BeanReference(type = MBThreadService.class)
936 protected MBThreadService mbThreadService;
937 @BeanReference(type = MBThreadPersistence.class)
938 protected MBThreadPersistence mbThreadPersistence;
939 @BeanReference(type = MBThreadFinder.class)
940 protected MBThreadFinder mbThreadFinder;
941 @BeanReference(type = CounterLocalService.class)
942 protected CounterLocalService counterLocalService;
943 @BeanReference(type = ResourceLocalService.class)
944 protected ResourceLocalService resourceLocalService;
945 @BeanReference(type = ResourceService.class)
946 protected ResourceService resourceService;
947 @BeanReference(type = ResourcePersistence.class)
948 protected ResourcePersistence resourcePersistence;
949 @BeanReference(type = ResourceFinder.class)
950 protected ResourceFinder resourceFinder;
951 @BeanReference(type = UserLocalService.class)
952 protected UserLocalService userLocalService;
953 @BeanReference(type = UserService.class)
954 protected UserService userService;
955 @BeanReference(type = UserPersistence.class)
956 protected UserPersistence userPersistence;
957 @BeanReference(type = UserFinder.class)
958 protected UserFinder userFinder;
959 }