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.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.messageboards.model.MBBan;
043 import com.liferay.portlet.messageboards.service.MBBanLocalService;
044 import com.liferay.portlet.messageboards.service.MBBanService;
045 import com.liferay.portlet.messageboards.service.MBCategoryLocalService;
046 import com.liferay.portlet.messageboards.service.MBCategoryService;
047 import com.liferay.portlet.messageboards.service.MBDiscussionLocalService;
048 import com.liferay.portlet.messageboards.service.MBMailingListLocalService;
049 import com.liferay.portlet.messageboards.service.MBMessageLocalService;
050 import com.liferay.portlet.messageboards.service.MBMessageService;
051 import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
052 import com.liferay.portlet.messageboards.service.MBThreadFlagLocalService;
053 import com.liferay.portlet.messageboards.service.MBThreadLocalService;
054 import com.liferay.portlet.messageboards.service.MBThreadService;
055 import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
056 import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
057 import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
058 import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
059 import com.liferay.portlet.messageboards.service.persistence.MBMailingListPersistence;
060 import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
061 import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
062 import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
063 import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
064 import com.liferay.portlet.messageboards.service.persistence.MBThreadFlagPersistence;
065 import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
066
067 import java.io.Serializable;
068
069 import java.util.List;
070
071 import javax.sql.DataSource;
072
073
085 public abstract class MBBanLocalServiceBaseImpl extends BaseLocalServiceImpl
086 implements MBBanLocalService, IdentifiableBean {
087
092
093
100 @Indexable(type = IndexableType.REINDEX)
101 public MBBan addMBBan(MBBan mbBan) throws SystemException {
102 mbBan.setNew(true);
103
104 return mbBanPersistence.update(mbBan, false);
105 }
106
107
113 public MBBan createMBBan(long banId) {
114 return mbBanPersistence.create(banId);
115 }
116
117
125 @Indexable(type = IndexableType.DELETE)
126 public MBBan deleteMBBan(long banId)
127 throws PortalException, SystemException {
128 return mbBanPersistence.remove(banId);
129 }
130
131
138 @Indexable(type = IndexableType.DELETE)
139 public MBBan deleteMBBan(MBBan mbBan) throws SystemException {
140 return mbBanPersistence.remove(mbBan);
141 }
142
143 public DynamicQuery dynamicQuery() {
144 Class<?> clazz = getClass();
145
146 return DynamicQueryFactoryUtil.forClass(MBBan.class,
147 clazz.getClassLoader());
148 }
149
150
157 @SuppressWarnings("rawtypes")
158 public List dynamicQuery(DynamicQuery dynamicQuery)
159 throws SystemException {
160 return mbBanPersistence.findWithDynamicQuery(dynamicQuery);
161 }
162
163
176 @SuppressWarnings("rawtypes")
177 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
178 throws SystemException {
179 return mbBanPersistence.findWithDynamicQuery(dynamicQuery, start, end);
180 }
181
182
196 @SuppressWarnings("rawtypes")
197 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
198 OrderByComparator orderByComparator) throws SystemException {
199 return mbBanPersistence.findWithDynamicQuery(dynamicQuery, start, end,
200 orderByComparator);
201 }
202
203
210 public long dynamicQueryCount(DynamicQuery dynamicQuery)
211 throws SystemException {
212 return mbBanPersistence.countWithDynamicQuery(dynamicQuery);
213 }
214
215 public MBBan fetchMBBan(long banId) throws SystemException {
216 return mbBanPersistence.fetchByPrimaryKey(banId);
217 }
218
219
227 public MBBan getMBBan(long banId) throws PortalException, SystemException {
228 return mbBanPersistence.findByPrimaryKey(banId);
229 }
230
231 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
232 throws PortalException, SystemException {
233 return mbBanPersistence.findByPrimaryKey(primaryKeyObj);
234 }
235
236
248 public List<MBBan> getMBBans(int start, int end) throws SystemException {
249 return mbBanPersistence.findAll(start, end);
250 }
251
252
258 public int getMBBansCount() throws SystemException {
259 return mbBanPersistence.countAll();
260 }
261
262
269 @Indexable(type = IndexableType.REINDEX)
270 public MBBan updateMBBan(MBBan mbBan) throws SystemException {
271 return updateMBBan(mbBan, true);
272 }
273
274
282 @Indexable(type = IndexableType.REINDEX)
283 public MBBan updateMBBan(MBBan mbBan, boolean merge)
284 throws SystemException {
285 mbBan.setNew(false);
286
287 return mbBanPersistence.update(mbBan, merge);
288 }
289
290
295 public MBBanLocalService getMBBanLocalService() {
296 return mbBanLocalService;
297 }
298
299
304 public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
305 this.mbBanLocalService = mbBanLocalService;
306 }
307
308
313 public MBBanService getMBBanService() {
314 return mbBanService;
315 }
316
317
322 public void setMBBanService(MBBanService mbBanService) {
323 this.mbBanService = mbBanService;
324 }
325
326
331 public MBBanPersistence getMBBanPersistence() {
332 return mbBanPersistence;
333 }
334
335
340 public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
341 this.mbBanPersistence = mbBanPersistence;
342 }
343
344
349 public MBCategoryLocalService getMBCategoryLocalService() {
350 return mbCategoryLocalService;
351 }
352
353
358 public void setMBCategoryLocalService(
359 MBCategoryLocalService mbCategoryLocalService) {
360 this.mbCategoryLocalService = mbCategoryLocalService;
361 }
362
363
368 public MBCategoryService getMBCategoryService() {
369 return mbCategoryService;
370 }
371
372
377 public void setMBCategoryService(MBCategoryService mbCategoryService) {
378 this.mbCategoryService = mbCategoryService;
379 }
380
381
386 public MBCategoryPersistence getMBCategoryPersistence() {
387 return mbCategoryPersistence;
388 }
389
390
395 public void setMBCategoryPersistence(
396 MBCategoryPersistence mbCategoryPersistence) {
397 this.mbCategoryPersistence = mbCategoryPersistence;
398 }
399
400
405 public MBCategoryFinder getMBCategoryFinder() {
406 return mbCategoryFinder;
407 }
408
409
414 public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
415 this.mbCategoryFinder = mbCategoryFinder;
416 }
417
418
423 public MBDiscussionLocalService getMBDiscussionLocalService() {
424 return mbDiscussionLocalService;
425 }
426
427
432 public void setMBDiscussionLocalService(
433 MBDiscussionLocalService mbDiscussionLocalService) {
434 this.mbDiscussionLocalService = mbDiscussionLocalService;
435 }
436
437
442 public MBDiscussionPersistence getMBDiscussionPersistence() {
443 return mbDiscussionPersistence;
444 }
445
446
451 public void setMBDiscussionPersistence(
452 MBDiscussionPersistence mbDiscussionPersistence) {
453 this.mbDiscussionPersistence = mbDiscussionPersistence;
454 }
455
456
461 public MBMailingListLocalService getMBMailingListLocalService() {
462 return mbMailingListLocalService;
463 }
464
465
470 public void setMBMailingListLocalService(
471 MBMailingListLocalService mbMailingListLocalService) {
472 this.mbMailingListLocalService = mbMailingListLocalService;
473 }
474
475
480 public MBMailingListPersistence getMBMailingListPersistence() {
481 return mbMailingListPersistence;
482 }
483
484
489 public void setMBMailingListPersistence(
490 MBMailingListPersistence mbMailingListPersistence) {
491 this.mbMailingListPersistence = mbMailingListPersistence;
492 }
493
494
499 public MBMessageLocalService getMBMessageLocalService() {
500 return mbMessageLocalService;
501 }
502
503
508 public void setMBMessageLocalService(
509 MBMessageLocalService mbMessageLocalService) {
510 this.mbMessageLocalService = mbMessageLocalService;
511 }
512
513
518 public MBMessageService getMBMessageService() {
519 return mbMessageService;
520 }
521
522
527 public void setMBMessageService(MBMessageService mbMessageService) {
528 this.mbMessageService = mbMessageService;
529 }
530
531
536 public MBMessagePersistence getMBMessagePersistence() {
537 return mbMessagePersistence;
538 }
539
540
545 public void setMBMessagePersistence(
546 MBMessagePersistence mbMessagePersistence) {
547 this.mbMessagePersistence = mbMessagePersistence;
548 }
549
550
555 public MBMessageFinder getMBMessageFinder() {
556 return mbMessageFinder;
557 }
558
559
564 public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
565 this.mbMessageFinder = mbMessageFinder;
566 }
567
568
573 public MBStatsUserLocalService getMBStatsUserLocalService() {
574 return mbStatsUserLocalService;
575 }
576
577
582 public void setMBStatsUserLocalService(
583 MBStatsUserLocalService mbStatsUserLocalService) {
584 this.mbStatsUserLocalService = mbStatsUserLocalService;
585 }
586
587
592 public MBStatsUserPersistence getMBStatsUserPersistence() {
593 return mbStatsUserPersistence;
594 }
595
596
601 public void setMBStatsUserPersistence(
602 MBStatsUserPersistence mbStatsUserPersistence) {
603 this.mbStatsUserPersistence = mbStatsUserPersistence;
604 }
605
606
611 public MBThreadLocalService getMBThreadLocalService() {
612 return mbThreadLocalService;
613 }
614
615
620 public void setMBThreadLocalService(
621 MBThreadLocalService mbThreadLocalService) {
622 this.mbThreadLocalService = mbThreadLocalService;
623 }
624
625
630 public MBThreadService getMBThreadService() {
631 return mbThreadService;
632 }
633
634
639 public void setMBThreadService(MBThreadService mbThreadService) {
640 this.mbThreadService = mbThreadService;
641 }
642
643
648 public MBThreadPersistence getMBThreadPersistence() {
649 return mbThreadPersistence;
650 }
651
652
657 public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
658 this.mbThreadPersistence = mbThreadPersistence;
659 }
660
661
666 public MBThreadFinder getMBThreadFinder() {
667 return mbThreadFinder;
668 }
669
670
675 public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
676 this.mbThreadFinder = mbThreadFinder;
677 }
678
679
684 public MBThreadFlagLocalService getMBThreadFlagLocalService() {
685 return mbThreadFlagLocalService;
686 }
687
688
693 public void setMBThreadFlagLocalService(
694 MBThreadFlagLocalService mbThreadFlagLocalService) {
695 this.mbThreadFlagLocalService = mbThreadFlagLocalService;
696 }
697
698
703 public MBThreadFlagPersistence getMBThreadFlagPersistence() {
704 return mbThreadFlagPersistence;
705 }
706
707
712 public void setMBThreadFlagPersistence(
713 MBThreadFlagPersistence mbThreadFlagPersistence) {
714 this.mbThreadFlagPersistence = mbThreadFlagPersistence;
715 }
716
717
722 public CounterLocalService getCounterLocalService() {
723 return counterLocalService;
724 }
725
726
731 public void setCounterLocalService(CounterLocalService counterLocalService) {
732 this.counterLocalService = counterLocalService;
733 }
734
735
740 public ResourceLocalService getResourceLocalService() {
741 return resourceLocalService;
742 }
743
744
749 public void setResourceLocalService(
750 ResourceLocalService resourceLocalService) {
751 this.resourceLocalService = resourceLocalService;
752 }
753
754
759 public ResourceService getResourceService() {
760 return resourceService;
761 }
762
763
768 public void setResourceService(ResourceService resourceService) {
769 this.resourceService = resourceService;
770 }
771
772
777 public ResourcePersistence getResourcePersistence() {
778 return resourcePersistence;
779 }
780
781
786 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
787 this.resourcePersistence = resourcePersistence;
788 }
789
790
795 public ResourceFinder getResourceFinder() {
796 return resourceFinder;
797 }
798
799
804 public void setResourceFinder(ResourceFinder resourceFinder) {
805 this.resourceFinder = resourceFinder;
806 }
807
808
813 public UserLocalService getUserLocalService() {
814 return userLocalService;
815 }
816
817
822 public void setUserLocalService(UserLocalService userLocalService) {
823 this.userLocalService = userLocalService;
824 }
825
826
831 public UserService getUserService() {
832 return userService;
833 }
834
835
840 public void setUserService(UserService userService) {
841 this.userService = userService;
842 }
843
844
849 public UserPersistence getUserPersistence() {
850 return userPersistence;
851 }
852
853
858 public void setUserPersistence(UserPersistence userPersistence) {
859 this.userPersistence = userPersistence;
860 }
861
862
867 public UserFinder getUserFinder() {
868 return userFinder;
869 }
870
871
876 public void setUserFinder(UserFinder userFinder) {
877 this.userFinder = userFinder;
878 }
879
880 public void afterPropertiesSet() {
881 persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBBan",
882 mbBanLocalService);
883 }
884
885 public void destroy() {
886 persistedModelLocalServiceRegistry.unregister(
887 "com.liferay.portlet.messageboards.model.MBBan");
888 }
889
890
895 public String getBeanIdentifier() {
896 return _beanIdentifier;
897 }
898
899
904 public void setBeanIdentifier(String beanIdentifier) {
905 _beanIdentifier = beanIdentifier;
906 }
907
908 protected Class<?> getModelClass() {
909 return MBBan.class;
910 }
911
912 protected String getModelClassName() {
913 return MBBan.class.getName();
914 }
915
916
921 protected void runSQL(String sql) throws SystemException {
922 try {
923 DataSource dataSource = mbBanPersistence.getDataSource();
924
925 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
926 sql, new int[0]);
927
928 sqlUpdate.update();
929 }
930 catch (Exception e) {
931 throw new SystemException(e);
932 }
933 }
934
935 @BeanReference(type = MBBanLocalService.class)
936 protected MBBanLocalService mbBanLocalService;
937 @BeanReference(type = MBBanService.class)
938 protected MBBanService mbBanService;
939 @BeanReference(type = MBBanPersistence.class)
940 protected MBBanPersistence mbBanPersistence;
941 @BeanReference(type = MBCategoryLocalService.class)
942 protected MBCategoryLocalService mbCategoryLocalService;
943 @BeanReference(type = MBCategoryService.class)
944 protected MBCategoryService mbCategoryService;
945 @BeanReference(type = MBCategoryPersistence.class)
946 protected MBCategoryPersistence mbCategoryPersistence;
947 @BeanReference(type = MBCategoryFinder.class)
948 protected MBCategoryFinder mbCategoryFinder;
949 @BeanReference(type = MBDiscussionLocalService.class)
950 protected MBDiscussionLocalService mbDiscussionLocalService;
951 @BeanReference(type = MBDiscussionPersistence.class)
952 protected MBDiscussionPersistence mbDiscussionPersistence;
953 @BeanReference(type = MBMailingListLocalService.class)
954 protected MBMailingListLocalService mbMailingListLocalService;
955 @BeanReference(type = MBMailingListPersistence.class)
956 protected MBMailingListPersistence mbMailingListPersistence;
957 @BeanReference(type = MBMessageLocalService.class)
958 protected MBMessageLocalService mbMessageLocalService;
959 @BeanReference(type = MBMessageService.class)
960 protected MBMessageService mbMessageService;
961 @BeanReference(type = MBMessagePersistence.class)
962 protected MBMessagePersistence mbMessagePersistence;
963 @BeanReference(type = MBMessageFinder.class)
964 protected MBMessageFinder mbMessageFinder;
965 @BeanReference(type = MBStatsUserLocalService.class)
966 protected MBStatsUserLocalService mbStatsUserLocalService;
967 @BeanReference(type = MBStatsUserPersistence.class)
968 protected MBStatsUserPersistence mbStatsUserPersistence;
969 @BeanReference(type = MBThreadLocalService.class)
970 protected MBThreadLocalService mbThreadLocalService;
971 @BeanReference(type = MBThreadService.class)
972 protected MBThreadService mbThreadService;
973 @BeanReference(type = MBThreadPersistence.class)
974 protected MBThreadPersistence mbThreadPersistence;
975 @BeanReference(type = MBThreadFinder.class)
976 protected MBThreadFinder mbThreadFinder;
977 @BeanReference(type = MBThreadFlagLocalService.class)
978 protected MBThreadFlagLocalService mbThreadFlagLocalService;
979 @BeanReference(type = MBThreadFlagPersistence.class)
980 protected MBThreadFlagPersistence mbThreadFlagPersistence;
981 @BeanReference(type = CounterLocalService.class)
982 protected CounterLocalService counterLocalService;
983 @BeanReference(type = ResourceLocalService.class)
984 protected ResourceLocalService resourceLocalService;
985 @BeanReference(type = ResourceService.class)
986 protected ResourceService resourceService;
987 @BeanReference(type = ResourcePersistence.class)
988 protected ResourcePersistence resourcePersistence;
989 @BeanReference(type = ResourceFinder.class)
990 protected ResourceFinder resourceFinder;
991 @BeanReference(type = UserLocalService.class)
992 protected UserLocalService userLocalService;
993 @BeanReference(type = UserService.class)
994 protected UserService userService;
995 @BeanReference(type = UserPersistence.class)
996 protected UserPersistence userPersistence;
997 @BeanReference(type = UserFinder.class)
998 protected UserFinder userFinder;
999 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1000 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1001 private String _beanIdentifier;
1002 }