001
014
015 package com.liferay.portlet.mobiledevicerules.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.Projection;
024 import com.liferay.portal.kernel.exception.PortalException;
025 import com.liferay.portal.kernel.exception.SystemException;
026 import com.liferay.portal.kernel.search.Indexable;
027 import com.liferay.portal.kernel.search.IndexableType;
028 import com.liferay.portal.kernel.util.OrderByComparator;
029 import com.liferay.portal.model.PersistedModel;
030 import com.liferay.portal.service.BaseLocalServiceImpl;
031 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032 import com.liferay.portal.service.persistence.GroupFinder;
033 import com.liferay.portal.service.persistence.GroupPersistence;
034 import com.liferay.portal.service.persistence.SystemEventPersistence;
035 import com.liferay.portal.service.persistence.UserFinder;
036 import com.liferay.portal.service.persistence.UserPersistence;
037
038 import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup;
039 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService;
040 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRActionPersistence;
041 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupFinder;
042 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupInstancePersistence;
043 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupPersistence;
044 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRulePersistence;
045
046 import java.io.Serializable;
047
048 import java.util.List;
049
050 import javax.sql.DataSource;
051
052
064 public abstract class MDRRuleGroupLocalServiceBaseImpl
065 extends BaseLocalServiceImpl implements MDRRuleGroupLocalService,
066 IdentifiableBean {
067
072
073
080 @Indexable(type = IndexableType.REINDEX)
081 @Override
082 public MDRRuleGroup addMDRRuleGroup(MDRRuleGroup mdrRuleGroup)
083 throws SystemException {
084 mdrRuleGroup.setNew(true);
085
086 return mdrRuleGroupPersistence.update(mdrRuleGroup);
087 }
088
089
095 @Override
096 public MDRRuleGroup createMDRRuleGroup(long ruleGroupId) {
097 return mdrRuleGroupPersistence.create(ruleGroupId);
098 }
099
100
108 @Indexable(type = IndexableType.DELETE)
109 @Override
110 public MDRRuleGroup deleteMDRRuleGroup(long ruleGroupId)
111 throws PortalException, SystemException {
112 return mdrRuleGroupPersistence.remove(ruleGroupId);
113 }
114
115
122 @Indexable(type = IndexableType.DELETE)
123 @Override
124 public MDRRuleGroup deleteMDRRuleGroup(MDRRuleGroup mdrRuleGroup)
125 throws SystemException {
126 return mdrRuleGroupPersistence.remove(mdrRuleGroup);
127 }
128
129 @Override
130 public DynamicQuery dynamicQuery() {
131 Class<?> clazz = getClass();
132
133 return DynamicQueryFactoryUtil.forClass(MDRRuleGroup.class,
134 clazz.getClassLoader());
135 }
136
137
144 @Override
145 @SuppressWarnings("rawtypes")
146 public List dynamicQuery(DynamicQuery dynamicQuery)
147 throws SystemException {
148 return mdrRuleGroupPersistence.findWithDynamicQuery(dynamicQuery);
149 }
150
151
164 @Override
165 @SuppressWarnings("rawtypes")
166 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
167 throws SystemException {
168 return mdrRuleGroupPersistence.findWithDynamicQuery(dynamicQuery,
169 start, end);
170 }
171
172
186 @Override
187 @SuppressWarnings("rawtypes")
188 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
189 OrderByComparator orderByComparator) throws SystemException {
190 return mdrRuleGroupPersistence.findWithDynamicQuery(dynamicQuery,
191 start, end, orderByComparator);
192 }
193
194
201 @Override
202 public long dynamicQueryCount(DynamicQuery dynamicQuery)
203 throws SystemException {
204 return mdrRuleGroupPersistence.countWithDynamicQuery(dynamicQuery);
205 }
206
207
215 @Override
216 public long dynamicQueryCount(DynamicQuery dynamicQuery,
217 Projection projection) throws SystemException {
218 return mdrRuleGroupPersistence.countWithDynamicQuery(dynamicQuery,
219 projection);
220 }
221
222 @Override
223 public MDRRuleGroup fetchMDRRuleGroup(long ruleGroupId)
224 throws SystemException {
225 return mdrRuleGroupPersistence.fetchByPrimaryKey(ruleGroupId);
226 }
227
228
236 @Override
237 public MDRRuleGroup fetchMDRRuleGroupByUuidAndCompanyId(String uuid,
238 long companyId) throws SystemException {
239 return mdrRuleGroupPersistence.fetchByUuid_C_First(uuid, companyId, null);
240 }
241
242
250 @Override
251 public MDRRuleGroup fetchMDRRuleGroupByUuidAndGroupId(String uuid,
252 long groupId) throws SystemException {
253 return mdrRuleGroupPersistence.fetchByUUID_G(uuid, groupId);
254 }
255
256
264 @Override
265 public MDRRuleGroup getMDRRuleGroup(long ruleGroupId)
266 throws PortalException, SystemException {
267 return mdrRuleGroupPersistence.findByPrimaryKey(ruleGroupId);
268 }
269
270 @Override
271 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
272 throws PortalException, SystemException {
273 return mdrRuleGroupPersistence.findByPrimaryKey(primaryKeyObj);
274 }
275
276
285 @Override
286 public MDRRuleGroup getMDRRuleGroupByUuidAndCompanyId(String uuid,
287 long companyId) throws PortalException, SystemException {
288 return mdrRuleGroupPersistence.findByUuid_C_First(uuid, companyId, null);
289 }
290
291
300 @Override
301 public MDRRuleGroup getMDRRuleGroupByUuidAndGroupId(String uuid,
302 long groupId) throws PortalException, SystemException {
303 return mdrRuleGroupPersistence.findByUUID_G(uuid, groupId);
304 }
305
306
318 @Override
319 public List<MDRRuleGroup> getMDRRuleGroups(int start, int end)
320 throws SystemException {
321 return mdrRuleGroupPersistence.findAll(start, end);
322 }
323
324
330 @Override
331 public int getMDRRuleGroupsCount() throws SystemException {
332 return mdrRuleGroupPersistence.countAll();
333 }
334
335
342 @Indexable(type = IndexableType.REINDEX)
343 @Override
344 public MDRRuleGroup updateMDRRuleGroup(MDRRuleGroup mdrRuleGroup)
345 throws SystemException {
346 return mdrRuleGroupPersistence.update(mdrRuleGroup);
347 }
348
349
354 public com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService getMDRActionLocalService() {
355 return mdrActionLocalService;
356 }
357
358
363 public void setMDRActionLocalService(
364 com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService mdrActionLocalService) {
365 this.mdrActionLocalService = mdrActionLocalService;
366 }
367
368
373 public com.liferay.portlet.mobiledevicerules.service.MDRActionService getMDRActionService() {
374 return mdrActionService;
375 }
376
377
382 public void setMDRActionService(
383 com.liferay.portlet.mobiledevicerules.service.MDRActionService mdrActionService) {
384 this.mdrActionService = mdrActionService;
385 }
386
387
392 public MDRActionPersistence getMDRActionPersistence() {
393 return mdrActionPersistence;
394 }
395
396
401 public void setMDRActionPersistence(
402 MDRActionPersistence mdrActionPersistence) {
403 this.mdrActionPersistence = mdrActionPersistence;
404 }
405
406
411 public com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService getMDRRuleLocalService() {
412 return mdrRuleLocalService;
413 }
414
415
420 public void setMDRRuleLocalService(
421 com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService) {
422 this.mdrRuleLocalService = mdrRuleLocalService;
423 }
424
425
430 public com.liferay.portlet.mobiledevicerules.service.MDRRuleService getMDRRuleService() {
431 return mdrRuleService;
432 }
433
434
439 public void setMDRRuleService(
440 com.liferay.portlet.mobiledevicerules.service.MDRRuleService mdrRuleService) {
441 this.mdrRuleService = mdrRuleService;
442 }
443
444
449 public MDRRulePersistence getMDRRulePersistence() {
450 return mdrRulePersistence;
451 }
452
453
458 public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
459 this.mdrRulePersistence = mdrRulePersistence;
460 }
461
462
467 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
468 return mdrRuleGroupLocalService;
469 }
470
471
476 public void setMDRRuleGroupLocalService(
477 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService) {
478 this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
479 }
480
481
486 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService getMDRRuleGroupService() {
487 return mdrRuleGroupService;
488 }
489
490
495 public void setMDRRuleGroupService(
496 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService) {
497 this.mdrRuleGroupService = mdrRuleGroupService;
498 }
499
500
505 public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
506 return mdrRuleGroupPersistence;
507 }
508
509
514 public void setMDRRuleGroupPersistence(
515 MDRRuleGroupPersistence mdrRuleGroupPersistence) {
516 this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
517 }
518
519
524 public MDRRuleGroupFinder getMDRRuleGroupFinder() {
525 return mdrRuleGroupFinder;
526 }
527
528
533 public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
534 this.mdrRuleGroupFinder = mdrRuleGroupFinder;
535 }
536
537
542 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService getMDRRuleGroupInstanceLocalService() {
543 return mdrRuleGroupInstanceLocalService;
544 }
545
546
551 public void setMDRRuleGroupInstanceLocalService(
552 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService) {
553 this.mdrRuleGroupInstanceLocalService = mdrRuleGroupInstanceLocalService;
554 }
555
556
561 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService getMDRRuleGroupInstanceService() {
562 return mdrRuleGroupInstanceService;
563 }
564
565
570 public void setMDRRuleGroupInstanceService(
571 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService mdrRuleGroupInstanceService) {
572 this.mdrRuleGroupInstanceService = mdrRuleGroupInstanceService;
573 }
574
575
580 public MDRRuleGroupInstancePersistence getMDRRuleGroupInstancePersistence() {
581 return mdrRuleGroupInstancePersistence;
582 }
583
584
589 public void setMDRRuleGroupInstancePersistence(
590 MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence) {
591 this.mdrRuleGroupInstancePersistence = mdrRuleGroupInstancePersistence;
592 }
593
594
599 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
600 return counterLocalService;
601 }
602
603
608 public void setCounterLocalService(
609 com.liferay.counter.service.CounterLocalService counterLocalService) {
610 this.counterLocalService = counterLocalService;
611 }
612
613
618 public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
619 return groupLocalService;
620 }
621
622
627 public void setGroupLocalService(
628 com.liferay.portal.service.GroupLocalService groupLocalService) {
629 this.groupLocalService = groupLocalService;
630 }
631
632
637 public com.liferay.portal.service.GroupService getGroupService() {
638 return groupService;
639 }
640
641
646 public void setGroupService(
647 com.liferay.portal.service.GroupService groupService) {
648 this.groupService = groupService;
649 }
650
651
656 public GroupPersistence getGroupPersistence() {
657 return groupPersistence;
658 }
659
660
665 public void setGroupPersistence(GroupPersistence groupPersistence) {
666 this.groupPersistence = groupPersistence;
667 }
668
669
674 public GroupFinder getGroupFinder() {
675 return groupFinder;
676 }
677
678
683 public void setGroupFinder(GroupFinder groupFinder) {
684 this.groupFinder = groupFinder;
685 }
686
687
692 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
693 return resourceLocalService;
694 }
695
696
701 public void setResourceLocalService(
702 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
703 this.resourceLocalService = resourceLocalService;
704 }
705
706
711 public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
712 return systemEventLocalService;
713 }
714
715
720 public void setSystemEventLocalService(
721 com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
722 this.systemEventLocalService = systemEventLocalService;
723 }
724
725
730 public SystemEventPersistence getSystemEventPersistence() {
731 return systemEventPersistence;
732 }
733
734
739 public void setSystemEventPersistence(
740 SystemEventPersistence systemEventPersistence) {
741 this.systemEventPersistence = systemEventPersistence;
742 }
743
744
749 public com.liferay.portal.service.UserLocalService getUserLocalService() {
750 return userLocalService;
751 }
752
753
758 public void setUserLocalService(
759 com.liferay.portal.service.UserLocalService userLocalService) {
760 this.userLocalService = userLocalService;
761 }
762
763
768 public com.liferay.portal.service.UserService getUserService() {
769 return userService;
770 }
771
772
777 public void setUserService(
778 com.liferay.portal.service.UserService userService) {
779 this.userService = userService;
780 }
781
782
787 public UserPersistence getUserPersistence() {
788 return userPersistence;
789 }
790
791
796 public void setUserPersistence(UserPersistence userPersistence) {
797 this.userPersistence = userPersistence;
798 }
799
800
805 public UserFinder getUserFinder() {
806 return userFinder;
807 }
808
809
814 public void setUserFinder(UserFinder userFinder) {
815 this.userFinder = userFinder;
816 }
817
818 public void afterPropertiesSet() {
819 persistedModelLocalServiceRegistry.register("com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup",
820 mdrRuleGroupLocalService);
821 }
822
823 public void destroy() {
824 persistedModelLocalServiceRegistry.unregister(
825 "com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup");
826 }
827
828
833 @Override
834 public String getBeanIdentifier() {
835 return _beanIdentifier;
836 }
837
838
843 @Override
844 public void setBeanIdentifier(String beanIdentifier) {
845 _beanIdentifier = beanIdentifier;
846 }
847
848 protected Class<?> getModelClass() {
849 return MDRRuleGroup.class;
850 }
851
852 protected String getModelClassName() {
853 return MDRRuleGroup.class.getName();
854 }
855
856
861 protected void runSQL(String sql) throws SystemException {
862 try {
863 DataSource dataSource = mdrRuleGroupPersistence.getDataSource();
864
865 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
866 sql, new int[0]);
867
868 sqlUpdate.update();
869 }
870 catch (Exception e) {
871 throw new SystemException(e);
872 }
873 }
874
875 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService.class)
876 protected com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService mdrActionLocalService;
877 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRActionService.class)
878 protected com.liferay.portlet.mobiledevicerules.service.MDRActionService mdrActionService;
879 @BeanReference(type = MDRActionPersistence.class)
880 protected MDRActionPersistence mdrActionPersistence;
881 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService.class)
882 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService;
883 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleService.class)
884 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleService mdrRuleService;
885 @BeanReference(type = MDRRulePersistence.class)
886 protected MDRRulePersistence mdrRulePersistence;
887 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService.class)
888 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService;
889 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService.class)
890 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService;
891 @BeanReference(type = MDRRuleGroupPersistence.class)
892 protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
893 @BeanReference(type = MDRRuleGroupFinder.class)
894 protected MDRRuleGroupFinder mdrRuleGroupFinder;
895 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService.class)
896 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService;
897 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService.class)
898 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService mdrRuleGroupInstanceService;
899 @BeanReference(type = MDRRuleGroupInstancePersistence.class)
900 protected MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence;
901 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
902 protected com.liferay.counter.service.CounterLocalService counterLocalService;
903 @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
904 protected com.liferay.portal.service.GroupLocalService groupLocalService;
905 @BeanReference(type = com.liferay.portal.service.GroupService.class)
906 protected com.liferay.portal.service.GroupService groupService;
907 @BeanReference(type = GroupPersistence.class)
908 protected GroupPersistence groupPersistence;
909 @BeanReference(type = GroupFinder.class)
910 protected GroupFinder groupFinder;
911 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
912 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
913 @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
914 protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
915 @BeanReference(type = SystemEventPersistence.class)
916 protected SystemEventPersistence systemEventPersistence;
917 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
918 protected com.liferay.portal.service.UserLocalService userLocalService;
919 @BeanReference(type = com.liferay.portal.service.UserService.class)
920 protected com.liferay.portal.service.UserService userService;
921 @BeanReference(type = UserPersistence.class)
922 protected UserPersistence userPersistence;
923 @BeanReference(type = UserFinder.class)
924 protected UserFinder userFinder;
925 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
926 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
927 private String _beanIdentifier;
928 }