001
014
015 package com.liferay.portlet.mobiledevicerules.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.LayoutLocalService;
033 import com.liferay.portal.service.LayoutService;
034 import com.liferay.portal.service.LayoutSetLocalService;
035 import com.liferay.portal.service.LayoutSetService;
036 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
037 import com.liferay.portal.service.ResourceLocalService;
038 import com.liferay.portal.service.ResourceService;
039 import com.liferay.portal.service.UserLocalService;
040 import com.liferay.portal.service.UserService;
041 import com.liferay.portal.service.persistence.LayoutFinder;
042 import com.liferay.portal.service.persistence.LayoutPersistence;
043 import com.liferay.portal.service.persistence.LayoutSetPersistence;
044 import com.liferay.portal.service.persistence.ResourceFinder;
045 import com.liferay.portal.service.persistence.ResourcePersistence;
046 import com.liferay.portal.service.persistence.UserFinder;
047 import com.liferay.portal.service.persistence.UserPersistence;
048
049 import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance;
050 import com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService;
051 import com.liferay.portlet.mobiledevicerules.service.MDRActionService;
052 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService;
053 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService;
054 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService;
055 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService;
056 import com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService;
057 import com.liferay.portlet.mobiledevicerules.service.MDRRuleService;
058 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRActionPersistence;
059 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupFinder;
060 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupInstancePersistence;
061 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupPersistence;
062 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRulePersistence;
063
064 import java.io.Serializable;
065
066 import java.util.List;
067
068 import javax.sql.DataSource;
069
070
082 public abstract class MDRRuleGroupInstanceLocalServiceBaseImpl
083 extends BaseLocalServiceImpl implements MDRRuleGroupInstanceLocalService,
084 IdentifiableBean {
085
090
091
098 @Indexable(type = IndexableType.REINDEX)
099 public MDRRuleGroupInstance addMDRRuleGroupInstance(
100 MDRRuleGroupInstance mdrRuleGroupInstance) throws SystemException {
101 mdrRuleGroupInstance.setNew(true);
102
103 return mdrRuleGroupInstancePersistence.update(mdrRuleGroupInstance,
104 false);
105 }
106
107
113 public MDRRuleGroupInstance createMDRRuleGroupInstance(
114 long ruleGroupInstanceId) {
115 return mdrRuleGroupInstancePersistence.create(ruleGroupInstanceId);
116 }
117
118
126 @Indexable(type = IndexableType.DELETE)
127 public MDRRuleGroupInstance deleteMDRRuleGroupInstance(
128 long ruleGroupInstanceId) throws PortalException, SystemException {
129 return mdrRuleGroupInstancePersistence.remove(ruleGroupInstanceId);
130 }
131
132
139 @Indexable(type = IndexableType.DELETE)
140 public MDRRuleGroupInstance deleteMDRRuleGroupInstance(
141 MDRRuleGroupInstance mdrRuleGroupInstance) throws SystemException {
142 return mdrRuleGroupInstancePersistence.remove(mdrRuleGroupInstance);
143 }
144
145 public DynamicQuery dynamicQuery() {
146 Class<?> clazz = getClass();
147
148 return DynamicQueryFactoryUtil.forClass(MDRRuleGroupInstance.class,
149 clazz.getClassLoader());
150 }
151
152
159 @SuppressWarnings("rawtypes")
160 public List dynamicQuery(DynamicQuery dynamicQuery)
161 throws SystemException {
162 return mdrRuleGroupInstancePersistence.findWithDynamicQuery(dynamicQuery);
163 }
164
165
178 @SuppressWarnings("rawtypes")
179 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
180 throws SystemException {
181 return mdrRuleGroupInstancePersistence.findWithDynamicQuery(dynamicQuery,
182 start, end);
183 }
184
185
199 @SuppressWarnings("rawtypes")
200 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
201 OrderByComparator orderByComparator) throws SystemException {
202 return mdrRuleGroupInstancePersistence.findWithDynamicQuery(dynamicQuery,
203 start, end, orderByComparator);
204 }
205
206
213 public long dynamicQueryCount(DynamicQuery dynamicQuery)
214 throws SystemException {
215 return mdrRuleGroupInstancePersistence.countWithDynamicQuery(dynamicQuery);
216 }
217
218 public MDRRuleGroupInstance fetchMDRRuleGroupInstance(
219 long ruleGroupInstanceId) throws SystemException {
220 return mdrRuleGroupInstancePersistence.fetchByPrimaryKey(ruleGroupInstanceId);
221 }
222
223
231 public MDRRuleGroupInstance getMDRRuleGroupInstance(
232 long ruleGroupInstanceId) throws PortalException, SystemException {
233 return mdrRuleGroupInstancePersistence.findByPrimaryKey(ruleGroupInstanceId);
234 }
235
236 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
237 throws PortalException, SystemException {
238 return mdrRuleGroupInstancePersistence.findByPrimaryKey(primaryKeyObj);
239 }
240
241
250 public MDRRuleGroupInstance getMDRRuleGroupInstanceByUuidAndGroupId(
251 String uuid, long groupId) throws PortalException, SystemException {
252 return mdrRuleGroupInstancePersistence.findByUUID_G(uuid, groupId);
253 }
254
255
267 public List<MDRRuleGroupInstance> getMDRRuleGroupInstances(int start,
268 int end) throws SystemException {
269 return mdrRuleGroupInstancePersistence.findAll(start, end);
270 }
271
272
278 public int getMDRRuleGroupInstancesCount() throws SystemException {
279 return mdrRuleGroupInstancePersistence.countAll();
280 }
281
282
289 @Indexable(type = IndexableType.REINDEX)
290 public MDRRuleGroupInstance updateMDRRuleGroupInstance(
291 MDRRuleGroupInstance mdrRuleGroupInstance) throws SystemException {
292 return updateMDRRuleGroupInstance(mdrRuleGroupInstance, true);
293 }
294
295
303 @Indexable(type = IndexableType.REINDEX)
304 public MDRRuleGroupInstance updateMDRRuleGroupInstance(
305 MDRRuleGroupInstance mdrRuleGroupInstance, boolean merge)
306 throws SystemException {
307 mdrRuleGroupInstance.setNew(false);
308
309 return mdrRuleGroupInstancePersistence.update(mdrRuleGroupInstance,
310 merge);
311 }
312
313
318 public MDRActionLocalService getMDRActionLocalService() {
319 return mdrActionLocalService;
320 }
321
322
327 public void setMDRActionLocalService(
328 MDRActionLocalService mdrActionLocalService) {
329 this.mdrActionLocalService = mdrActionLocalService;
330 }
331
332
337 public MDRActionService getMDRActionService() {
338 return mdrActionService;
339 }
340
341
346 public void setMDRActionService(MDRActionService mdrActionService) {
347 this.mdrActionService = mdrActionService;
348 }
349
350
355 public MDRActionPersistence getMDRActionPersistence() {
356 return mdrActionPersistence;
357 }
358
359
364 public void setMDRActionPersistence(
365 MDRActionPersistence mdrActionPersistence) {
366 this.mdrActionPersistence = mdrActionPersistence;
367 }
368
369
374 public MDRRuleLocalService getMDRRuleLocalService() {
375 return mdrRuleLocalService;
376 }
377
378
383 public void setMDRRuleLocalService(MDRRuleLocalService mdrRuleLocalService) {
384 this.mdrRuleLocalService = mdrRuleLocalService;
385 }
386
387
392 public MDRRuleService getMDRRuleService() {
393 return mdrRuleService;
394 }
395
396
401 public void setMDRRuleService(MDRRuleService mdrRuleService) {
402 this.mdrRuleService = mdrRuleService;
403 }
404
405
410 public MDRRulePersistence getMDRRulePersistence() {
411 return mdrRulePersistence;
412 }
413
414
419 public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
420 this.mdrRulePersistence = mdrRulePersistence;
421 }
422
423
428 public MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
429 return mdrRuleGroupLocalService;
430 }
431
432
437 public void setMDRRuleGroupLocalService(
438 MDRRuleGroupLocalService mdrRuleGroupLocalService) {
439 this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
440 }
441
442
447 public MDRRuleGroupService getMDRRuleGroupService() {
448 return mdrRuleGroupService;
449 }
450
451
456 public void setMDRRuleGroupService(MDRRuleGroupService mdrRuleGroupService) {
457 this.mdrRuleGroupService = mdrRuleGroupService;
458 }
459
460
465 public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
466 return mdrRuleGroupPersistence;
467 }
468
469
474 public void setMDRRuleGroupPersistence(
475 MDRRuleGroupPersistence mdrRuleGroupPersistence) {
476 this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
477 }
478
479
484 public MDRRuleGroupFinder getMDRRuleGroupFinder() {
485 return mdrRuleGroupFinder;
486 }
487
488
493 public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
494 this.mdrRuleGroupFinder = mdrRuleGroupFinder;
495 }
496
497
502 public MDRRuleGroupInstanceLocalService getMDRRuleGroupInstanceLocalService() {
503 return mdrRuleGroupInstanceLocalService;
504 }
505
506
511 public void setMDRRuleGroupInstanceLocalService(
512 MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService) {
513 this.mdrRuleGroupInstanceLocalService = mdrRuleGroupInstanceLocalService;
514 }
515
516
521 public MDRRuleGroupInstanceService getMDRRuleGroupInstanceService() {
522 return mdrRuleGroupInstanceService;
523 }
524
525
530 public void setMDRRuleGroupInstanceService(
531 MDRRuleGroupInstanceService mdrRuleGroupInstanceService) {
532 this.mdrRuleGroupInstanceService = mdrRuleGroupInstanceService;
533 }
534
535
540 public MDRRuleGroupInstancePersistence getMDRRuleGroupInstancePersistence() {
541 return mdrRuleGroupInstancePersistence;
542 }
543
544
549 public void setMDRRuleGroupInstancePersistence(
550 MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence) {
551 this.mdrRuleGroupInstancePersistence = mdrRuleGroupInstancePersistence;
552 }
553
554
559 public CounterLocalService getCounterLocalService() {
560 return counterLocalService;
561 }
562
563
568 public void setCounterLocalService(CounterLocalService counterLocalService) {
569 this.counterLocalService = counterLocalService;
570 }
571
572
577 public LayoutLocalService getLayoutLocalService() {
578 return layoutLocalService;
579 }
580
581
586 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
587 this.layoutLocalService = layoutLocalService;
588 }
589
590
595 public LayoutService getLayoutService() {
596 return layoutService;
597 }
598
599
604 public void setLayoutService(LayoutService layoutService) {
605 this.layoutService = layoutService;
606 }
607
608
613 public LayoutPersistence getLayoutPersistence() {
614 return layoutPersistence;
615 }
616
617
622 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
623 this.layoutPersistence = layoutPersistence;
624 }
625
626
631 public LayoutFinder getLayoutFinder() {
632 return layoutFinder;
633 }
634
635
640 public void setLayoutFinder(LayoutFinder layoutFinder) {
641 this.layoutFinder = layoutFinder;
642 }
643
644
649 public LayoutSetLocalService getLayoutSetLocalService() {
650 return layoutSetLocalService;
651 }
652
653
658 public void setLayoutSetLocalService(
659 LayoutSetLocalService layoutSetLocalService) {
660 this.layoutSetLocalService = layoutSetLocalService;
661 }
662
663
668 public LayoutSetService getLayoutSetService() {
669 return layoutSetService;
670 }
671
672
677 public void setLayoutSetService(LayoutSetService layoutSetService) {
678 this.layoutSetService = layoutSetService;
679 }
680
681
686 public LayoutSetPersistence getLayoutSetPersistence() {
687 return layoutSetPersistence;
688 }
689
690
695 public void setLayoutSetPersistence(
696 LayoutSetPersistence layoutSetPersistence) {
697 this.layoutSetPersistence = layoutSetPersistence;
698 }
699
700
705 public ResourceLocalService getResourceLocalService() {
706 return resourceLocalService;
707 }
708
709
714 public void setResourceLocalService(
715 ResourceLocalService resourceLocalService) {
716 this.resourceLocalService = resourceLocalService;
717 }
718
719
724 public ResourceService getResourceService() {
725 return resourceService;
726 }
727
728
733 public void setResourceService(ResourceService resourceService) {
734 this.resourceService = resourceService;
735 }
736
737
742 public ResourcePersistence getResourcePersistence() {
743 return resourcePersistence;
744 }
745
746
751 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
752 this.resourcePersistence = resourcePersistence;
753 }
754
755
760 public ResourceFinder getResourceFinder() {
761 return resourceFinder;
762 }
763
764
769 public void setResourceFinder(ResourceFinder resourceFinder) {
770 this.resourceFinder = resourceFinder;
771 }
772
773
778 public UserLocalService getUserLocalService() {
779 return userLocalService;
780 }
781
782
787 public void setUserLocalService(UserLocalService userLocalService) {
788 this.userLocalService = userLocalService;
789 }
790
791
796 public UserService getUserService() {
797 return userService;
798 }
799
800
805 public void setUserService(UserService userService) {
806 this.userService = userService;
807 }
808
809
814 public UserPersistence getUserPersistence() {
815 return userPersistence;
816 }
817
818
823 public void setUserPersistence(UserPersistence userPersistence) {
824 this.userPersistence = userPersistence;
825 }
826
827
832 public UserFinder getUserFinder() {
833 return userFinder;
834 }
835
836
841 public void setUserFinder(UserFinder userFinder) {
842 this.userFinder = userFinder;
843 }
844
845 public void afterPropertiesSet() {
846 persistedModelLocalServiceRegistry.register("com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance",
847 mdrRuleGroupInstanceLocalService);
848 }
849
850 public void destroy() {
851 persistedModelLocalServiceRegistry.unregister(
852 "com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance");
853 }
854
855
860 public String getBeanIdentifier() {
861 return _beanIdentifier;
862 }
863
864
869 public void setBeanIdentifier(String beanIdentifier) {
870 _beanIdentifier = beanIdentifier;
871 }
872
873 protected Class<?> getModelClass() {
874 return MDRRuleGroupInstance.class;
875 }
876
877 protected String getModelClassName() {
878 return MDRRuleGroupInstance.class.getName();
879 }
880
881
886 protected void runSQL(String sql) throws SystemException {
887 try {
888 DataSource dataSource = mdrRuleGroupInstancePersistence.getDataSource();
889
890 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
891 sql, new int[0]);
892
893 sqlUpdate.update();
894 }
895 catch (Exception e) {
896 throw new SystemException(e);
897 }
898 }
899
900 @BeanReference(type = MDRActionLocalService.class)
901 protected MDRActionLocalService mdrActionLocalService;
902 @BeanReference(type = MDRActionService.class)
903 protected MDRActionService mdrActionService;
904 @BeanReference(type = MDRActionPersistence.class)
905 protected MDRActionPersistence mdrActionPersistence;
906 @BeanReference(type = MDRRuleLocalService.class)
907 protected MDRRuleLocalService mdrRuleLocalService;
908 @BeanReference(type = MDRRuleService.class)
909 protected MDRRuleService mdrRuleService;
910 @BeanReference(type = MDRRulePersistence.class)
911 protected MDRRulePersistence mdrRulePersistence;
912 @BeanReference(type = MDRRuleGroupLocalService.class)
913 protected MDRRuleGroupLocalService mdrRuleGroupLocalService;
914 @BeanReference(type = MDRRuleGroupService.class)
915 protected MDRRuleGroupService mdrRuleGroupService;
916 @BeanReference(type = MDRRuleGroupPersistence.class)
917 protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
918 @BeanReference(type = MDRRuleGroupFinder.class)
919 protected MDRRuleGroupFinder mdrRuleGroupFinder;
920 @BeanReference(type = MDRRuleGroupInstanceLocalService.class)
921 protected MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService;
922 @BeanReference(type = MDRRuleGroupInstanceService.class)
923 protected MDRRuleGroupInstanceService mdrRuleGroupInstanceService;
924 @BeanReference(type = MDRRuleGroupInstancePersistence.class)
925 protected MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence;
926 @BeanReference(type = CounterLocalService.class)
927 protected CounterLocalService counterLocalService;
928 @BeanReference(type = LayoutLocalService.class)
929 protected LayoutLocalService layoutLocalService;
930 @BeanReference(type = LayoutService.class)
931 protected LayoutService layoutService;
932 @BeanReference(type = LayoutPersistence.class)
933 protected LayoutPersistence layoutPersistence;
934 @BeanReference(type = LayoutFinder.class)
935 protected LayoutFinder layoutFinder;
936 @BeanReference(type = LayoutSetLocalService.class)
937 protected LayoutSetLocalService layoutSetLocalService;
938 @BeanReference(type = LayoutSetService.class)
939 protected LayoutSetService layoutSetService;
940 @BeanReference(type = LayoutSetPersistence.class)
941 protected LayoutSetPersistence layoutSetPersistence;
942 @BeanReference(type = ResourceLocalService.class)
943 protected ResourceLocalService resourceLocalService;
944 @BeanReference(type = ResourceService.class)
945 protected ResourceService resourceService;
946 @BeanReference(type = ResourcePersistence.class)
947 protected ResourcePersistence resourcePersistence;
948 @BeanReference(type = ResourceFinder.class)
949 protected ResourceFinder resourceFinder;
950 @BeanReference(type = UserLocalService.class)
951 protected UserLocalService userLocalService;
952 @BeanReference(type = UserService.class)
953 protected UserService userService;
954 @BeanReference(type = UserPersistence.class)
955 protected UserPersistence userPersistence;
956 @BeanReference(type = UserFinder.class)
957 protected UserFinder userFinder;
958 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
959 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
960 private String _beanIdentifier;
961 }