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.MBBan;
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 MBBanLocalServiceBaseImpl implements MBBanLocalService {
082
089 public MBBan addMBBan(MBBan mbBan) throws SystemException {
090 mbBan.setNew(true);
091
092 return mbBanPersistence.update(mbBan, false);
093 }
094
095
101 public MBBan createMBBan(long banId) {
102 return mbBanPersistence.create(banId);
103 }
104
105
112 public void deleteMBBan(long banId) throws PortalException, SystemException {
113 mbBanPersistence.remove(banId);
114 }
115
116
122 public void deleteMBBan(MBBan mbBan) throws SystemException {
123 mbBanPersistence.remove(mbBan);
124 }
125
126
133 @SuppressWarnings("rawtypes")
134 public List dynamicQuery(DynamicQuery dynamicQuery)
135 throws SystemException {
136 return mbBanPersistence.findWithDynamicQuery(dynamicQuery);
137 }
138
139
152 @SuppressWarnings("rawtypes")
153 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
154 throws SystemException {
155 return mbBanPersistence.findWithDynamicQuery(dynamicQuery, start, end);
156 }
157
158
172 @SuppressWarnings("rawtypes")
173 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
174 OrderByComparator orderByComparator) throws SystemException {
175 return mbBanPersistence.findWithDynamicQuery(dynamicQuery, start, end,
176 orderByComparator);
177 }
178
179
186 public long dynamicQueryCount(DynamicQuery dynamicQuery)
187 throws SystemException {
188 return mbBanPersistence.countWithDynamicQuery(dynamicQuery);
189 }
190
191
199 public MBBan getMBBan(long banId) throws PortalException, SystemException {
200 return mbBanPersistence.findByPrimaryKey(banId);
201 }
202
203
215 public List<MBBan> getMBBans(int start, int end) throws SystemException {
216 return mbBanPersistence.findAll(start, end);
217 }
218
219
225 public int getMBBansCount() throws SystemException {
226 return mbBanPersistence.countAll();
227 }
228
229
236 public MBBan updateMBBan(MBBan mbBan) throws SystemException {
237 mbBan.setNew(false);
238
239 return mbBanPersistence.update(mbBan, true);
240 }
241
242
250 public MBBan updateMBBan(MBBan mbBan, boolean merge)
251 throws SystemException {
252 mbBan.setNew(false);
253
254 return mbBanPersistence.update(mbBan, merge);
255 }
256
257
262 public MBBanLocalService getMBBanLocalService() {
263 return mbBanLocalService;
264 }
265
266
271 public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
272 this.mbBanLocalService = mbBanLocalService;
273 }
274
275
280 public MBBanService getMBBanService() {
281 return mbBanService;
282 }
283
284
289 public void setMBBanService(MBBanService mbBanService) {
290 this.mbBanService = mbBanService;
291 }
292
293
298 public MBBanPersistence getMBBanPersistence() {
299 return mbBanPersistence;
300 }
301
302
307 public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
308 this.mbBanPersistence = mbBanPersistence;
309 }
310
311
316 public MBCategoryLocalService getMBCategoryLocalService() {
317 return mbCategoryLocalService;
318 }
319
320
325 public void setMBCategoryLocalService(
326 MBCategoryLocalService mbCategoryLocalService) {
327 this.mbCategoryLocalService = mbCategoryLocalService;
328 }
329
330
335 public MBCategoryService getMBCategoryService() {
336 return mbCategoryService;
337 }
338
339
344 public void setMBCategoryService(MBCategoryService mbCategoryService) {
345 this.mbCategoryService = mbCategoryService;
346 }
347
348
353 public MBCategoryPersistence getMBCategoryPersistence() {
354 return mbCategoryPersistence;
355 }
356
357
362 public void setMBCategoryPersistence(
363 MBCategoryPersistence mbCategoryPersistence) {
364 this.mbCategoryPersistence = mbCategoryPersistence;
365 }
366
367
372 public MBCategoryFinder getMBCategoryFinder() {
373 return mbCategoryFinder;
374 }
375
376
381 public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
382 this.mbCategoryFinder = mbCategoryFinder;
383 }
384
385
390 public MBDiscussionLocalService getMBDiscussionLocalService() {
391 return mbDiscussionLocalService;
392 }
393
394
399 public void setMBDiscussionLocalService(
400 MBDiscussionLocalService mbDiscussionLocalService) {
401 this.mbDiscussionLocalService = mbDiscussionLocalService;
402 }
403
404
409 public MBDiscussionPersistence getMBDiscussionPersistence() {
410 return mbDiscussionPersistence;
411 }
412
413
418 public void setMBDiscussionPersistence(
419 MBDiscussionPersistence mbDiscussionPersistence) {
420 this.mbDiscussionPersistence = mbDiscussionPersistence;
421 }
422
423
428 public MBMailingListLocalService getMBMailingListLocalService() {
429 return mbMailingListLocalService;
430 }
431
432
437 public void setMBMailingListLocalService(
438 MBMailingListLocalService mbMailingListLocalService) {
439 this.mbMailingListLocalService = mbMailingListLocalService;
440 }
441
442
447 public MBMailingListPersistence getMBMailingListPersistence() {
448 return mbMailingListPersistence;
449 }
450
451
456 public void setMBMailingListPersistence(
457 MBMailingListPersistence mbMailingListPersistence) {
458 this.mbMailingListPersistence = mbMailingListPersistence;
459 }
460
461
466 public MBMessageLocalService getMBMessageLocalService() {
467 return mbMessageLocalService;
468 }
469
470
475 public void setMBMessageLocalService(
476 MBMessageLocalService mbMessageLocalService) {
477 this.mbMessageLocalService = mbMessageLocalService;
478 }
479
480
485 public MBMessageService getMBMessageService() {
486 return mbMessageService;
487 }
488
489
494 public void setMBMessageService(MBMessageService mbMessageService) {
495 this.mbMessageService = mbMessageService;
496 }
497
498
503 public MBMessagePersistence getMBMessagePersistence() {
504 return mbMessagePersistence;
505 }
506
507
512 public void setMBMessagePersistence(
513 MBMessagePersistence mbMessagePersistence) {
514 this.mbMessagePersistence = mbMessagePersistence;
515 }
516
517
522 public MBMessageFinder getMBMessageFinder() {
523 return mbMessageFinder;
524 }
525
526
531 public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
532 this.mbMessageFinder = mbMessageFinder;
533 }
534
535
540 public MBMessageFlagLocalService getMBMessageFlagLocalService() {
541 return mbMessageFlagLocalService;
542 }
543
544
549 public void setMBMessageFlagLocalService(
550 MBMessageFlagLocalService mbMessageFlagLocalService) {
551 this.mbMessageFlagLocalService = mbMessageFlagLocalService;
552 }
553
554
559 public MBMessageFlagService getMBMessageFlagService() {
560 return mbMessageFlagService;
561 }
562
563
568 public void setMBMessageFlagService(
569 MBMessageFlagService mbMessageFlagService) {
570 this.mbMessageFlagService = mbMessageFlagService;
571 }
572
573
578 public MBMessageFlagPersistence getMBMessageFlagPersistence() {
579 return mbMessageFlagPersistence;
580 }
581
582
587 public void setMBMessageFlagPersistence(
588 MBMessageFlagPersistence mbMessageFlagPersistence) {
589 this.mbMessageFlagPersistence = mbMessageFlagPersistence;
590 }
591
592
597 public MBStatsUserLocalService getMBStatsUserLocalService() {
598 return mbStatsUserLocalService;
599 }
600
601
606 public void setMBStatsUserLocalService(
607 MBStatsUserLocalService mbStatsUserLocalService) {
608 this.mbStatsUserLocalService = mbStatsUserLocalService;
609 }
610
611
616 public MBStatsUserPersistence getMBStatsUserPersistence() {
617 return mbStatsUserPersistence;
618 }
619
620
625 public void setMBStatsUserPersistence(
626 MBStatsUserPersistence mbStatsUserPersistence) {
627 this.mbStatsUserPersistence = mbStatsUserPersistence;
628 }
629
630
635 public MBThreadLocalService getMBThreadLocalService() {
636 return mbThreadLocalService;
637 }
638
639
644 public void setMBThreadLocalService(
645 MBThreadLocalService mbThreadLocalService) {
646 this.mbThreadLocalService = mbThreadLocalService;
647 }
648
649
654 public MBThreadService getMBThreadService() {
655 return mbThreadService;
656 }
657
658
663 public void setMBThreadService(MBThreadService mbThreadService) {
664 this.mbThreadService = mbThreadService;
665 }
666
667
672 public MBThreadPersistence getMBThreadPersistence() {
673 return mbThreadPersistence;
674 }
675
676
681 public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
682 this.mbThreadPersistence = mbThreadPersistence;
683 }
684
685
690 public MBThreadFinder getMBThreadFinder() {
691 return mbThreadFinder;
692 }
693
694
699 public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
700 this.mbThreadFinder = mbThreadFinder;
701 }
702
703
708 public CounterLocalService getCounterLocalService() {
709 return counterLocalService;
710 }
711
712
717 public void setCounterLocalService(CounterLocalService counterLocalService) {
718 this.counterLocalService = counterLocalService;
719 }
720
721
726 public ResourceLocalService getResourceLocalService() {
727 return resourceLocalService;
728 }
729
730
735 public void setResourceLocalService(
736 ResourceLocalService resourceLocalService) {
737 this.resourceLocalService = resourceLocalService;
738 }
739
740
745 public ResourceService getResourceService() {
746 return resourceService;
747 }
748
749
754 public void setResourceService(ResourceService resourceService) {
755 this.resourceService = resourceService;
756 }
757
758
763 public ResourcePersistence getResourcePersistence() {
764 return resourcePersistence;
765 }
766
767
772 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
773 this.resourcePersistence = resourcePersistence;
774 }
775
776
781 public ResourceFinder getResourceFinder() {
782 return resourceFinder;
783 }
784
785
790 public void setResourceFinder(ResourceFinder resourceFinder) {
791 this.resourceFinder = resourceFinder;
792 }
793
794
799 public UserLocalService getUserLocalService() {
800 return userLocalService;
801 }
802
803
808 public void setUserLocalService(UserLocalService userLocalService) {
809 this.userLocalService = userLocalService;
810 }
811
812
817 public UserService getUserService() {
818 return userService;
819 }
820
821
826 public void setUserService(UserService userService) {
827 this.userService = userService;
828 }
829
830
835 public UserPersistence getUserPersistence() {
836 return userPersistence;
837 }
838
839
844 public void setUserPersistence(UserPersistence userPersistence) {
845 this.userPersistence = userPersistence;
846 }
847
848
853 public UserFinder getUserFinder() {
854 return userFinder;
855 }
856
857
862 public void setUserFinder(UserFinder userFinder) {
863 this.userFinder = userFinder;
864 }
865
866
871 protected void runSQL(String sql) throws SystemException {
872 try {
873 DataSource dataSource = mbBanPersistence.getDataSource();
874
875 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
876 sql, new int[0]);
877
878 sqlUpdate.update();
879 }
880 catch (Exception e) {
881 throw new SystemException(e);
882 }
883 }
884
885 @BeanReference(type = MBBanLocalService.class)
886 protected MBBanLocalService mbBanLocalService;
887 @BeanReference(type = MBBanService.class)
888 protected MBBanService mbBanService;
889 @BeanReference(type = MBBanPersistence.class)
890 protected MBBanPersistence mbBanPersistence;
891 @BeanReference(type = MBCategoryLocalService.class)
892 protected MBCategoryLocalService mbCategoryLocalService;
893 @BeanReference(type = MBCategoryService.class)
894 protected MBCategoryService mbCategoryService;
895 @BeanReference(type = MBCategoryPersistence.class)
896 protected MBCategoryPersistence mbCategoryPersistence;
897 @BeanReference(type = MBCategoryFinder.class)
898 protected MBCategoryFinder mbCategoryFinder;
899 @BeanReference(type = MBDiscussionLocalService.class)
900 protected MBDiscussionLocalService mbDiscussionLocalService;
901 @BeanReference(type = MBDiscussionPersistence.class)
902 protected MBDiscussionPersistence mbDiscussionPersistence;
903 @BeanReference(type = MBMailingListLocalService.class)
904 protected MBMailingListLocalService mbMailingListLocalService;
905 @BeanReference(type = MBMailingListPersistence.class)
906 protected MBMailingListPersistence mbMailingListPersistence;
907 @BeanReference(type = MBMessageLocalService.class)
908 protected MBMessageLocalService mbMessageLocalService;
909 @BeanReference(type = MBMessageService.class)
910 protected MBMessageService mbMessageService;
911 @BeanReference(type = MBMessagePersistence.class)
912 protected MBMessagePersistence mbMessagePersistence;
913 @BeanReference(type = MBMessageFinder.class)
914 protected MBMessageFinder mbMessageFinder;
915 @BeanReference(type = MBMessageFlagLocalService.class)
916 protected MBMessageFlagLocalService mbMessageFlagLocalService;
917 @BeanReference(type = MBMessageFlagService.class)
918 protected MBMessageFlagService mbMessageFlagService;
919 @BeanReference(type = MBMessageFlagPersistence.class)
920 protected MBMessageFlagPersistence mbMessageFlagPersistence;
921 @BeanReference(type = MBStatsUserLocalService.class)
922 protected MBStatsUserLocalService mbStatsUserLocalService;
923 @BeanReference(type = MBStatsUserPersistence.class)
924 protected MBStatsUserPersistence mbStatsUserPersistence;
925 @BeanReference(type = MBThreadLocalService.class)
926 protected MBThreadLocalService mbThreadLocalService;
927 @BeanReference(type = MBThreadService.class)
928 protected MBThreadService mbThreadService;
929 @BeanReference(type = MBThreadPersistence.class)
930 protected MBThreadPersistence mbThreadPersistence;
931 @BeanReference(type = MBThreadFinder.class)
932 protected MBThreadFinder mbThreadFinder;
933 @BeanReference(type = CounterLocalService.class)
934 protected CounterLocalService counterLocalService;
935 @BeanReference(type = ResourceLocalService.class)
936 protected ResourceLocalService resourceLocalService;
937 @BeanReference(type = ResourceService.class)
938 protected ResourceService resourceService;
939 @BeanReference(type = ResourcePersistence.class)
940 protected ResourcePersistence resourcePersistence;
941 @BeanReference(type = ResourceFinder.class)
942 protected ResourceFinder resourceFinder;
943 @BeanReference(type = UserLocalService.class)
944 protected UserLocalService userLocalService;
945 @BeanReference(type = UserService.class)
946 protected UserService userService;
947 @BeanReference(type = UserPersistence.class)
948 protected UserPersistence userPersistence;
949 @BeanReference(type = UserFinder.class)
950 protected UserFinder userFinder;
951 }