001
014
015 package com.liferay.portlet.messageboards.service.base;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.db.DB;
022 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.Criterion;
027 import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
028 import com.liferay.portal.kernel.dao.orm.Disjunction;
029 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
030 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
031 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
032 import com.liferay.portal.kernel.dao.orm.Projection;
033 import com.liferay.portal.kernel.dao.orm.Property;
034 import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
035 import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
036 import com.liferay.portal.kernel.exception.PortalException;
037 import com.liferay.portal.kernel.exception.SystemException;
038 import com.liferay.portal.kernel.search.Indexable;
039 import com.liferay.portal.kernel.search.IndexableType;
040 import com.liferay.portal.kernel.util.OrderByComparator;
041 import com.liferay.portal.kernel.workflow.WorkflowConstants;
042 import com.liferay.portal.model.PersistedModel;
043 import com.liferay.portal.service.BaseLocalServiceImpl;
044 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
045 import com.liferay.portal.service.persistence.GroupFinder;
046 import com.liferay.portal.service.persistence.GroupPersistence;
047 import com.liferay.portal.service.persistence.SubscriptionPersistence;
048 import com.liferay.portal.service.persistence.UserFinder;
049 import com.liferay.portal.service.persistence.UserPersistence;
050 import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
051 import com.liferay.portal.util.PortalUtil;
052
053 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
054 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
055 import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
056 import com.liferay.portlet.exportimport.lar.ManifestSummary;
057 import com.liferay.portlet.exportimport.lar.PortletDataContext;
058 import com.liferay.portlet.exportimport.lar.StagedModelDataHandler;
059 import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerRegistryUtil;
060 import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
061 import com.liferay.portlet.exportimport.lar.StagedModelType;
062 import com.liferay.portlet.messageboards.model.MBThread;
063 import com.liferay.portlet.messageboards.service.MBThreadLocalService;
064 import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
065 import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
066 import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
067 import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
068 import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
069 import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
070 import com.liferay.portlet.messageboards.service.persistence.MBThreadFlagPersistence;
071 import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
072 import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
073 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
074 import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence;
075 import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence;
076
077 import java.io.Serializable;
078
079 import java.util.List;
080
081 import javax.sql.DataSource;
082
083
095 @ProviderType
096 public abstract class MBThreadLocalServiceBaseImpl extends BaseLocalServiceImpl
097 implements MBThreadLocalService, IdentifiableBean {
098
103
104
110 @Indexable(type = IndexableType.REINDEX)
111 @Override
112 public MBThread addMBThread(MBThread mbThread) {
113 mbThread.setNew(true);
114
115 return mbThreadPersistence.update(mbThread);
116 }
117
118
124 @Override
125 public MBThread createMBThread(long threadId) {
126 return mbThreadPersistence.create(threadId);
127 }
128
129
136 @Indexable(type = IndexableType.DELETE)
137 @Override
138 public MBThread deleteMBThread(long threadId) throws PortalException {
139 return mbThreadPersistence.remove(threadId);
140 }
141
142
148 @Indexable(type = IndexableType.DELETE)
149 @Override
150 public MBThread deleteMBThread(MBThread mbThread) {
151 return mbThreadPersistence.remove(mbThread);
152 }
153
154 @Override
155 public DynamicQuery dynamicQuery() {
156 Class<?> clazz = getClass();
157
158 return DynamicQueryFactoryUtil.forClass(MBThread.class,
159 clazz.getClassLoader());
160 }
161
162
168 @Override
169 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
170 return mbThreadPersistence.findWithDynamicQuery(dynamicQuery);
171 }
172
173
185 @Override
186 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
187 int end) {
188 return mbThreadPersistence.findWithDynamicQuery(dynamicQuery, start, end);
189 }
190
191
204 @Override
205 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
206 int end, OrderByComparator<T> orderByComparator) {
207 return mbThreadPersistence.findWithDynamicQuery(dynamicQuery, start,
208 end, orderByComparator);
209 }
210
211
217 @Override
218 public long dynamicQueryCount(DynamicQuery dynamicQuery) {
219 return mbThreadPersistence.countWithDynamicQuery(dynamicQuery);
220 }
221
222
229 @Override
230 public long dynamicQueryCount(DynamicQuery dynamicQuery,
231 Projection projection) {
232 return mbThreadPersistence.countWithDynamicQuery(dynamicQuery,
233 projection);
234 }
235
236 @Override
237 public MBThread fetchMBThread(long threadId) {
238 return mbThreadPersistence.fetchByPrimaryKey(threadId);
239 }
240
241
248 @Override
249 public MBThread fetchMBThreadByUuidAndGroupId(String uuid, long groupId) {
250 return mbThreadPersistence.fetchByUUID_G(uuid, groupId);
251 }
252
253
260 @Override
261 public MBThread getMBThread(long threadId) throws PortalException {
262 return mbThreadPersistence.findByPrimaryKey(threadId);
263 }
264
265 @Override
266 public ActionableDynamicQuery getActionableDynamicQuery() {
267 ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
268
269 actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil.getService());
270 actionableDynamicQuery.setClass(MBThread.class);
271 actionableDynamicQuery.setClassLoader(getClassLoader());
272
273 actionableDynamicQuery.setPrimaryKeyPropertyName("threadId");
274
275 return actionableDynamicQuery;
276 }
277
278 protected void initActionableDynamicQuery(
279 ActionableDynamicQuery actionableDynamicQuery) {
280 actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil.getService());
281 actionableDynamicQuery.setClass(MBThread.class);
282 actionableDynamicQuery.setClassLoader(getClassLoader());
283
284 actionableDynamicQuery.setPrimaryKeyPropertyName("threadId");
285 }
286
287 @Override
288 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
289 final PortletDataContext portletDataContext) {
290 final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
291 @Override
292 public long performCount() throws PortalException {
293 ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
294
295 StagedModelType stagedModelType = getStagedModelType();
296
297 long modelAdditionCount = super.performCount();
298
299 manifestSummary.addModelAdditionCount(stagedModelType,
300 modelAdditionCount);
301
302 long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
303 stagedModelType);
304
305 manifestSummary.addModelDeletionCount(stagedModelType,
306 modelDeletionCount);
307
308 return modelAdditionCount;
309 }
310 };
311
312 initActionableDynamicQuery(exportActionableDynamicQuery);
313
314 exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
315 @Override
316 public void addCriteria(DynamicQuery dynamicQuery) {
317 Criterion modifiedDateCriterion = portletDataContext.getDateRangeCriteria(
318 "modifiedDate");
319 Criterion statusDateCriterion = portletDataContext.getDateRangeCriteria(
320 "statusDate");
321
322 if ((modifiedDateCriterion != null) &&
323 (statusDateCriterion != null)) {
324 Disjunction disjunction = RestrictionsFactoryUtil.disjunction();
325
326 disjunction.add(modifiedDateCriterion);
327 disjunction.add(statusDateCriterion);
328
329 dynamicQuery.add(disjunction);
330 }
331
332 Property workflowStatusProperty = PropertyFactoryUtil.forName(
333 "status");
334
335 if (portletDataContext.isInitialPublication()) {
336 dynamicQuery.add(workflowStatusProperty.ne(
337 WorkflowConstants.STATUS_IN_TRASH));
338 }
339 else {
340 StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(MBThread.class.getName());
341
342 dynamicQuery.add(workflowStatusProperty.in(
343 stagedModelDataHandler.getExportableStatuses()));
344 }
345 }
346 });
347
348 exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
349
350 exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
351
352 exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<MBThread>() {
353 @Override
354 public void performAction(MBThread mbThread)
355 throws PortalException {
356 StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
357 mbThread);
358 }
359 });
360 exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
361 PortalUtil.getClassNameId(MBThread.class.getName())));
362
363 return exportActionableDynamicQuery;
364 }
365
366
369 @Override
370 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
371 throws PortalException {
372 return mbThreadLocalService.deleteMBThread((MBThread)persistedModel);
373 }
374
375 @Override
376 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
377 throws PortalException {
378 return mbThreadPersistence.findByPrimaryKey(primaryKeyObj);
379 }
380
381
388 @Override
389 public List<MBThread> getMBThreadsByUuidAndCompanyId(String uuid,
390 long companyId) {
391 return mbThreadPersistence.findByUuid_C(uuid, companyId);
392 }
393
394
404 @Override
405 public List<MBThread> getMBThreadsByUuidAndCompanyId(String uuid,
406 long companyId, int start, int end,
407 OrderByComparator<MBThread> orderByComparator) {
408 return mbThreadPersistence.findByUuid_C(uuid, companyId, start, end,
409 orderByComparator);
410 }
411
412
420 @Override
421 public MBThread getMBThreadByUuidAndGroupId(String uuid, long groupId)
422 throws PortalException {
423 return mbThreadPersistence.findByUUID_G(uuid, groupId);
424 }
425
426
437 @Override
438 public List<MBThread> getMBThreads(int start, int end) {
439 return mbThreadPersistence.findAll(start, end);
440 }
441
442
447 @Override
448 public int getMBThreadsCount() {
449 return mbThreadPersistence.countAll();
450 }
451
452
458 @Indexable(type = IndexableType.REINDEX)
459 @Override
460 public MBThread updateMBThread(MBThread mbThread) {
461 return mbThreadPersistence.update(mbThread);
462 }
463
464
469 public MBThreadLocalService getMBThreadLocalService() {
470 return mbThreadLocalService;
471 }
472
473
478 public void setMBThreadLocalService(
479 MBThreadLocalService mbThreadLocalService) {
480 this.mbThreadLocalService = mbThreadLocalService;
481 }
482
483
488 public com.liferay.portlet.messageboards.service.MBThreadService getMBThreadService() {
489 return mbThreadService;
490 }
491
492
497 public void setMBThreadService(
498 com.liferay.portlet.messageboards.service.MBThreadService mbThreadService) {
499 this.mbThreadService = mbThreadService;
500 }
501
502
507 public MBThreadPersistence getMBThreadPersistence() {
508 return mbThreadPersistence;
509 }
510
511
516 public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
517 this.mbThreadPersistence = mbThreadPersistence;
518 }
519
520
525 public MBThreadFinder getMBThreadFinder() {
526 return mbThreadFinder;
527 }
528
529
534 public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
535 this.mbThreadFinder = mbThreadFinder;
536 }
537
538
543 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
544 return counterLocalService;
545 }
546
547
552 public void setCounterLocalService(
553 com.liferay.counter.service.CounterLocalService counterLocalService) {
554 this.counterLocalService = counterLocalService;
555 }
556
557
562 public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
563 return groupLocalService;
564 }
565
566
571 public void setGroupLocalService(
572 com.liferay.portal.service.GroupLocalService groupLocalService) {
573 this.groupLocalService = groupLocalService;
574 }
575
576
581 public com.liferay.portal.service.GroupService getGroupService() {
582 return groupService;
583 }
584
585
590 public void setGroupService(
591 com.liferay.portal.service.GroupService groupService) {
592 this.groupService = groupService;
593 }
594
595
600 public GroupPersistence getGroupPersistence() {
601 return groupPersistence;
602 }
603
604
609 public void setGroupPersistence(GroupPersistence groupPersistence) {
610 this.groupPersistence = groupPersistence;
611 }
612
613
618 public GroupFinder getGroupFinder() {
619 return groupFinder;
620 }
621
622
627 public void setGroupFinder(GroupFinder groupFinder) {
628 this.groupFinder = groupFinder;
629 }
630
631
636 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
637 return resourceLocalService;
638 }
639
640
645 public void setResourceLocalService(
646 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
647 this.resourceLocalService = resourceLocalService;
648 }
649
650
655 public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() {
656 return subscriptionLocalService;
657 }
658
659
664 public void setSubscriptionLocalService(
665 com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) {
666 this.subscriptionLocalService = subscriptionLocalService;
667 }
668
669
674 public SubscriptionPersistence getSubscriptionPersistence() {
675 return subscriptionPersistence;
676 }
677
678
683 public void setSubscriptionPersistence(
684 SubscriptionPersistence subscriptionPersistence) {
685 this.subscriptionPersistence = subscriptionPersistence;
686 }
687
688
693 public com.liferay.portal.service.UserLocalService getUserLocalService() {
694 return userLocalService;
695 }
696
697
702 public void setUserLocalService(
703 com.liferay.portal.service.UserLocalService userLocalService) {
704 this.userLocalService = userLocalService;
705 }
706
707
712 public com.liferay.portal.service.UserService getUserService() {
713 return userService;
714 }
715
716
721 public void setUserService(
722 com.liferay.portal.service.UserService userService) {
723 this.userService = userService;
724 }
725
726
731 public UserPersistence getUserPersistence() {
732 return userPersistence;
733 }
734
735
740 public void setUserPersistence(UserPersistence userPersistence) {
741 this.userPersistence = userPersistence;
742 }
743
744
749 public UserFinder getUserFinder() {
750 return userFinder;
751 }
752
753
758 public void setUserFinder(UserFinder userFinder) {
759 this.userFinder = userFinder;
760 }
761
762
767 public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
768 return workflowInstanceLinkLocalService;
769 }
770
771
776 public void setWorkflowInstanceLinkLocalService(
777 com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
778 this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
779 }
780
781
786 public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
787 return workflowInstanceLinkPersistence;
788 }
789
790
795 public void setWorkflowInstanceLinkPersistence(
796 WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
797 this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
798 }
799
800
805 public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
806 return assetEntryLocalService;
807 }
808
809
814 public void setAssetEntryLocalService(
815 com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
816 this.assetEntryLocalService = assetEntryLocalService;
817 }
818
819
824 public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
825 return assetEntryService;
826 }
827
828
833 public void setAssetEntryService(
834 com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
835 this.assetEntryService = assetEntryService;
836 }
837
838
843 public AssetEntryPersistence getAssetEntryPersistence() {
844 return assetEntryPersistence;
845 }
846
847
852 public void setAssetEntryPersistence(
853 AssetEntryPersistence assetEntryPersistence) {
854 this.assetEntryPersistence = assetEntryPersistence;
855 }
856
857
862 public AssetEntryFinder getAssetEntryFinder() {
863 return assetEntryFinder;
864 }
865
866
871 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
872 this.assetEntryFinder = assetEntryFinder;
873 }
874
875
880 public com.liferay.portlet.messageboards.service.MBCategoryLocalService getMBCategoryLocalService() {
881 return mbCategoryLocalService;
882 }
883
884
889 public void setMBCategoryLocalService(
890 com.liferay.portlet.messageboards.service.MBCategoryLocalService mbCategoryLocalService) {
891 this.mbCategoryLocalService = mbCategoryLocalService;
892 }
893
894
899 public com.liferay.portlet.messageboards.service.MBCategoryService getMBCategoryService() {
900 return mbCategoryService;
901 }
902
903
908 public void setMBCategoryService(
909 com.liferay.portlet.messageboards.service.MBCategoryService mbCategoryService) {
910 this.mbCategoryService = mbCategoryService;
911 }
912
913
918 public MBCategoryPersistence getMBCategoryPersistence() {
919 return mbCategoryPersistence;
920 }
921
922
927 public void setMBCategoryPersistence(
928 MBCategoryPersistence mbCategoryPersistence) {
929 this.mbCategoryPersistence = mbCategoryPersistence;
930 }
931
932
937 public MBCategoryFinder getMBCategoryFinder() {
938 return mbCategoryFinder;
939 }
940
941
946 public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
947 this.mbCategoryFinder = mbCategoryFinder;
948 }
949
950
955 public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() {
956 return mbMessageLocalService;
957 }
958
959
964 public void setMBMessageLocalService(
965 com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) {
966 this.mbMessageLocalService = mbMessageLocalService;
967 }
968
969
974 public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() {
975 return mbMessageService;
976 }
977
978
983 public void setMBMessageService(
984 com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) {
985 this.mbMessageService = mbMessageService;
986 }
987
988
993 public MBMessagePersistence getMBMessagePersistence() {
994 return mbMessagePersistence;
995 }
996
997
1002 public void setMBMessagePersistence(
1003 MBMessagePersistence mbMessagePersistence) {
1004 this.mbMessagePersistence = mbMessagePersistence;
1005 }
1006
1007
1012 public MBMessageFinder getMBMessageFinder() {
1013 return mbMessageFinder;
1014 }
1015
1016
1021 public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
1022 this.mbMessageFinder = mbMessageFinder;
1023 }
1024
1025
1030 public com.liferay.portlet.messageboards.service.MBStatsUserLocalService getMBStatsUserLocalService() {
1031 return mbStatsUserLocalService;
1032 }
1033
1034
1039 public void setMBStatsUserLocalService(
1040 com.liferay.portlet.messageboards.service.MBStatsUserLocalService mbStatsUserLocalService) {
1041 this.mbStatsUserLocalService = mbStatsUserLocalService;
1042 }
1043
1044
1049 public MBStatsUserPersistence getMBStatsUserPersistence() {
1050 return mbStatsUserPersistence;
1051 }
1052
1053
1058 public void setMBStatsUserPersistence(
1059 MBStatsUserPersistence mbStatsUserPersistence) {
1060 this.mbStatsUserPersistence = mbStatsUserPersistence;
1061 }
1062
1063
1068 public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() {
1069 return ratingsStatsLocalService;
1070 }
1071
1072
1077 public void setRatingsStatsLocalService(
1078 com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) {
1079 this.ratingsStatsLocalService = ratingsStatsLocalService;
1080 }
1081
1082
1087 public RatingsStatsPersistence getRatingsStatsPersistence() {
1088 return ratingsStatsPersistence;
1089 }
1090
1091
1096 public void setRatingsStatsPersistence(
1097 RatingsStatsPersistence ratingsStatsPersistence) {
1098 this.ratingsStatsPersistence = ratingsStatsPersistence;
1099 }
1100
1101
1106 public RatingsStatsFinder getRatingsStatsFinder() {
1107 return ratingsStatsFinder;
1108 }
1109
1110
1115 public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
1116 this.ratingsStatsFinder = ratingsStatsFinder;
1117 }
1118
1119
1124 public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() {
1125 return trashEntryLocalService;
1126 }
1127
1128
1133 public void setTrashEntryLocalService(
1134 com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) {
1135 this.trashEntryLocalService = trashEntryLocalService;
1136 }
1137
1138
1143 public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() {
1144 return trashEntryService;
1145 }
1146
1147
1152 public void setTrashEntryService(
1153 com.liferay.portlet.trash.service.TrashEntryService trashEntryService) {
1154 this.trashEntryService = trashEntryService;
1155 }
1156
1157
1162 public TrashEntryPersistence getTrashEntryPersistence() {
1163 return trashEntryPersistence;
1164 }
1165
1166
1171 public void setTrashEntryPersistence(
1172 TrashEntryPersistence trashEntryPersistence) {
1173 this.trashEntryPersistence = trashEntryPersistence;
1174 }
1175
1176
1181 public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() {
1182 return trashVersionLocalService;
1183 }
1184
1185
1190 public void setTrashVersionLocalService(
1191 com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) {
1192 this.trashVersionLocalService = trashVersionLocalService;
1193 }
1194
1195
1200 public TrashVersionPersistence getTrashVersionPersistence() {
1201 return trashVersionPersistence;
1202 }
1203
1204
1209 public void setTrashVersionPersistence(
1210 TrashVersionPersistence trashVersionPersistence) {
1211 this.trashVersionPersistence = trashVersionPersistence;
1212 }
1213
1214
1219 public com.liferay.portlet.messageboards.service.MBThreadFlagLocalService getMBThreadFlagLocalService() {
1220 return mbThreadFlagLocalService;
1221 }
1222
1223
1228 public void setMBThreadFlagLocalService(
1229 com.liferay.portlet.messageboards.service.MBThreadFlagLocalService mbThreadFlagLocalService) {
1230 this.mbThreadFlagLocalService = mbThreadFlagLocalService;
1231 }
1232
1233
1238 public MBThreadFlagPersistence getMBThreadFlagPersistence() {
1239 return mbThreadFlagPersistence;
1240 }
1241
1242
1247 public void setMBThreadFlagPersistence(
1248 MBThreadFlagPersistence mbThreadFlagPersistence) {
1249 this.mbThreadFlagPersistence = mbThreadFlagPersistence;
1250 }
1251
1252 public void afterPropertiesSet() {
1253 persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBThread",
1254 mbThreadLocalService);
1255 }
1256
1257 public void destroy() {
1258 persistedModelLocalServiceRegistry.unregister(
1259 "com.liferay.portlet.messageboards.model.MBThread");
1260 }
1261
1262
1267 @Override
1268 public String getBeanIdentifier() {
1269 return _beanIdentifier;
1270 }
1271
1272
1277 @Override
1278 public void setBeanIdentifier(String beanIdentifier) {
1279 _beanIdentifier = beanIdentifier;
1280 }
1281
1282 protected Class<?> getModelClass() {
1283 return MBThread.class;
1284 }
1285
1286 protected String getModelClassName() {
1287 return MBThread.class.getName();
1288 }
1289
1290
1295 protected void runSQL(String sql) {
1296 try {
1297 DataSource dataSource = mbThreadPersistence.getDataSource();
1298
1299 DB db = DBFactoryUtil.getDB();
1300
1301 sql = db.buildSQL(sql);
1302 sql = PortalUtil.transformSQL(sql);
1303
1304 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1305 sql, new int[0]);
1306
1307 sqlUpdate.update();
1308 }
1309 catch (Exception e) {
1310 throw new SystemException(e);
1311 }
1312 }
1313
1314 @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadLocalService.class)
1315 protected MBThreadLocalService mbThreadLocalService;
1316 @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadService.class)
1317 protected com.liferay.portlet.messageboards.service.MBThreadService mbThreadService;
1318 @BeanReference(type = MBThreadPersistence.class)
1319 protected MBThreadPersistence mbThreadPersistence;
1320 @BeanReference(type = MBThreadFinder.class)
1321 protected MBThreadFinder mbThreadFinder;
1322 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1323 protected com.liferay.counter.service.CounterLocalService counterLocalService;
1324 @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1325 protected com.liferay.portal.service.GroupLocalService groupLocalService;
1326 @BeanReference(type = com.liferay.portal.service.GroupService.class)
1327 protected com.liferay.portal.service.GroupService groupService;
1328 @BeanReference(type = GroupPersistence.class)
1329 protected GroupPersistence groupPersistence;
1330 @BeanReference(type = GroupFinder.class)
1331 protected GroupFinder groupFinder;
1332 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1333 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1334 @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class)
1335 protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService;
1336 @BeanReference(type = SubscriptionPersistence.class)
1337 protected SubscriptionPersistence subscriptionPersistence;
1338 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1339 protected com.liferay.portal.service.UserLocalService userLocalService;
1340 @BeanReference(type = com.liferay.portal.service.UserService.class)
1341 protected com.liferay.portal.service.UserService userService;
1342 @BeanReference(type = UserPersistence.class)
1343 protected UserPersistence userPersistence;
1344 @BeanReference(type = UserFinder.class)
1345 protected UserFinder userFinder;
1346 @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
1347 protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
1348 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1349 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1350 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1351 protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1352 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
1353 protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
1354 @BeanReference(type = AssetEntryPersistence.class)
1355 protected AssetEntryPersistence assetEntryPersistence;
1356 @BeanReference(type = AssetEntryFinder.class)
1357 protected AssetEntryFinder assetEntryFinder;
1358 @BeanReference(type = com.liferay.portlet.messageboards.service.MBCategoryLocalService.class)
1359 protected com.liferay.portlet.messageboards.service.MBCategoryLocalService mbCategoryLocalService;
1360 @BeanReference(type = com.liferay.portlet.messageboards.service.MBCategoryService.class)
1361 protected com.liferay.portlet.messageboards.service.MBCategoryService mbCategoryService;
1362 @BeanReference(type = MBCategoryPersistence.class)
1363 protected MBCategoryPersistence mbCategoryPersistence;
1364 @BeanReference(type = MBCategoryFinder.class)
1365 protected MBCategoryFinder mbCategoryFinder;
1366 @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class)
1367 protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService;
1368 @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class)
1369 protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService;
1370 @BeanReference(type = MBMessagePersistence.class)
1371 protected MBMessagePersistence mbMessagePersistence;
1372 @BeanReference(type = MBMessageFinder.class)
1373 protected MBMessageFinder mbMessageFinder;
1374 @BeanReference(type = com.liferay.portlet.messageboards.service.MBStatsUserLocalService.class)
1375 protected com.liferay.portlet.messageboards.service.MBStatsUserLocalService mbStatsUserLocalService;
1376 @BeanReference(type = MBStatsUserPersistence.class)
1377 protected MBStatsUserPersistence mbStatsUserPersistence;
1378 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
1379 protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
1380 @BeanReference(type = RatingsStatsPersistence.class)
1381 protected RatingsStatsPersistence ratingsStatsPersistence;
1382 @BeanReference(type = RatingsStatsFinder.class)
1383 protected RatingsStatsFinder ratingsStatsFinder;
1384 @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class)
1385 protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService;
1386 @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class)
1387 protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService;
1388 @BeanReference(type = TrashEntryPersistence.class)
1389 protected TrashEntryPersistence trashEntryPersistence;
1390 @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class)
1391 protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService;
1392 @BeanReference(type = TrashVersionPersistence.class)
1393 protected TrashVersionPersistence trashVersionPersistence;
1394 @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadFlagLocalService.class)
1395 protected com.liferay.portlet.messageboards.service.MBThreadFlagLocalService mbThreadFlagLocalService;
1396 @BeanReference(type = MBThreadFlagPersistence.class)
1397 protected MBThreadFlagPersistence mbThreadFlagPersistence;
1398 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1399 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1400 private String _beanIdentifier;
1401 }