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.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.mobiledevicerules.model.MDRAction;
043 import com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService;
044 import com.liferay.portlet.mobiledevicerules.service.MDRActionService;
045 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService;
046 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService;
047 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService;
048 import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService;
049 import com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService;
050 import com.liferay.portlet.mobiledevicerules.service.MDRRuleService;
051 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRActionPersistence;
052 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupFinder;
053 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupInstancePersistence;
054 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupPersistence;
055 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRulePersistence;
056
057 import java.io.Serializable;
058
059 import java.util.List;
060
061 import javax.sql.DataSource;
062
063
075 public abstract class MDRActionLocalServiceBaseImpl extends BaseLocalServiceImpl
076 implements MDRActionLocalService, IdentifiableBean {
077
082
083
090 @Indexable(type = IndexableType.REINDEX)
091 public MDRAction addMDRAction(MDRAction mdrAction)
092 throws SystemException {
093 mdrAction.setNew(true);
094
095 return mdrActionPersistence.update(mdrAction, false);
096 }
097
098
104 public MDRAction createMDRAction(long actionId) {
105 return mdrActionPersistence.create(actionId);
106 }
107
108
116 @Indexable(type = IndexableType.DELETE)
117 public MDRAction deleteMDRAction(long actionId)
118 throws PortalException, SystemException {
119 return mdrActionPersistence.remove(actionId);
120 }
121
122
129 @Indexable(type = IndexableType.DELETE)
130 public MDRAction deleteMDRAction(MDRAction mdrAction)
131 throws SystemException {
132 return mdrActionPersistence.remove(mdrAction);
133 }
134
135 public DynamicQuery dynamicQuery() {
136 Class<?> clazz = getClass();
137
138 return DynamicQueryFactoryUtil.forClass(MDRAction.class,
139 clazz.getClassLoader());
140 }
141
142
149 @SuppressWarnings("rawtypes")
150 public List dynamicQuery(DynamicQuery dynamicQuery)
151 throws SystemException {
152 return mdrActionPersistence.findWithDynamicQuery(dynamicQuery);
153 }
154
155
168 @SuppressWarnings("rawtypes")
169 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
170 throws SystemException {
171 return mdrActionPersistence.findWithDynamicQuery(dynamicQuery, start,
172 end);
173 }
174
175
189 @SuppressWarnings("rawtypes")
190 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
191 OrderByComparator orderByComparator) throws SystemException {
192 return mdrActionPersistence.findWithDynamicQuery(dynamicQuery, start,
193 end, orderByComparator);
194 }
195
196
203 public long dynamicQueryCount(DynamicQuery dynamicQuery)
204 throws SystemException {
205 return mdrActionPersistence.countWithDynamicQuery(dynamicQuery);
206 }
207
208 public MDRAction fetchMDRAction(long actionId) throws SystemException {
209 return mdrActionPersistence.fetchByPrimaryKey(actionId);
210 }
211
212
220 public MDRAction getMDRAction(long actionId)
221 throws PortalException, SystemException {
222 return mdrActionPersistence.findByPrimaryKey(actionId);
223 }
224
225 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
226 throws PortalException, SystemException {
227 return mdrActionPersistence.findByPrimaryKey(primaryKeyObj);
228 }
229
230
239 public MDRAction getMDRActionByUuidAndGroupId(String uuid, long groupId)
240 throws PortalException, SystemException {
241 return mdrActionPersistence.findByUUID_G(uuid, groupId);
242 }
243
244
256 public List<MDRAction> getMDRActions(int start, int end)
257 throws SystemException {
258 return mdrActionPersistence.findAll(start, end);
259 }
260
261
267 public int getMDRActionsCount() throws SystemException {
268 return mdrActionPersistence.countAll();
269 }
270
271
278 @Indexable(type = IndexableType.REINDEX)
279 public MDRAction updateMDRAction(MDRAction mdrAction)
280 throws SystemException {
281 return updateMDRAction(mdrAction, true);
282 }
283
284
292 @Indexable(type = IndexableType.REINDEX)
293 public MDRAction updateMDRAction(MDRAction mdrAction, boolean merge)
294 throws SystemException {
295 mdrAction.setNew(false);
296
297 return mdrActionPersistence.update(mdrAction, merge);
298 }
299
300
305 public MDRActionLocalService getMDRActionLocalService() {
306 return mdrActionLocalService;
307 }
308
309
314 public void setMDRActionLocalService(
315 MDRActionLocalService mdrActionLocalService) {
316 this.mdrActionLocalService = mdrActionLocalService;
317 }
318
319
324 public MDRActionService getMDRActionService() {
325 return mdrActionService;
326 }
327
328
333 public void setMDRActionService(MDRActionService mdrActionService) {
334 this.mdrActionService = mdrActionService;
335 }
336
337
342 public MDRActionPersistence getMDRActionPersistence() {
343 return mdrActionPersistence;
344 }
345
346
351 public void setMDRActionPersistence(
352 MDRActionPersistence mdrActionPersistence) {
353 this.mdrActionPersistence = mdrActionPersistence;
354 }
355
356
361 public MDRRuleLocalService getMDRRuleLocalService() {
362 return mdrRuleLocalService;
363 }
364
365
370 public void setMDRRuleLocalService(MDRRuleLocalService mdrRuleLocalService) {
371 this.mdrRuleLocalService = mdrRuleLocalService;
372 }
373
374
379 public MDRRuleService getMDRRuleService() {
380 return mdrRuleService;
381 }
382
383
388 public void setMDRRuleService(MDRRuleService mdrRuleService) {
389 this.mdrRuleService = mdrRuleService;
390 }
391
392
397 public MDRRulePersistence getMDRRulePersistence() {
398 return mdrRulePersistence;
399 }
400
401
406 public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
407 this.mdrRulePersistence = mdrRulePersistence;
408 }
409
410
415 public MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
416 return mdrRuleGroupLocalService;
417 }
418
419
424 public void setMDRRuleGroupLocalService(
425 MDRRuleGroupLocalService mdrRuleGroupLocalService) {
426 this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
427 }
428
429
434 public MDRRuleGroupService getMDRRuleGroupService() {
435 return mdrRuleGroupService;
436 }
437
438
443 public void setMDRRuleGroupService(MDRRuleGroupService mdrRuleGroupService) {
444 this.mdrRuleGroupService = mdrRuleGroupService;
445 }
446
447
452 public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
453 return mdrRuleGroupPersistence;
454 }
455
456
461 public void setMDRRuleGroupPersistence(
462 MDRRuleGroupPersistence mdrRuleGroupPersistence) {
463 this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
464 }
465
466
471 public MDRRuleGroupFinder getMDRRuleGroupFinder() {
472 return mdrRuleGroupFinder;
473 }
474
475
480 public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
481 this.mdrRuleGroupFinder = mdrRuleGroupFinder;
482 }
483
484
489 public MDRRuleGroupInstanceLocalService getMDRRuleGroupInstanceLocalService() {
490 return mdrRuleGroupInstanceLocalService;
491 }
492
493
498 public void setMDRRuleGroupInstanceLocalService(
499 MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService) {
500 this.mdrRuleGroupInstanceLocalService = mdrRuleGroupInstanceLocalService;
501 }
502
503
508 public MDRRuleGroupInstanceService getMDRRuleGroupInstanceService() {
509 return mdrRuleGroupInstanceService;
510 }
511
512
517 public void setMDRRuleGroupInstanceService(
518 MDRRuleGroupInstanceService mdrRuleGroupInstanceService) {
519 this.mdrRuleGroupInstanceService = mdrRuleGroupInstanceService;
520 }
521
522
527 public MDRRuleGroupInstancePersistence getMDRRuleGroupInstancePersistence() {
528 return mdrRuleGroupInstancePersistence;
529 }
530
531
536 public void setMDRRuleGroupInstancePersistence(
537 MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence) {
538 this.mdrRuleGroupInstancePersistence = mdrRuleGroupInstancePersistence;
539 }
540
541
546 public CounterLocalService getCounterLocalService() {
547 return counterLocalService;
548 }
549
550
555 public void setCounterLocalService(CounterLocalService counterLocalService) {
556 this.counterLocalService = counterLocalService;
557 }
558
559
564 public ResourceLocalService getResourceLocalService() {
565 return resourceLocalService;
566 }
567
568
573 public void setResourceLocalService(
574 ResourceLocalService resourceLocalService) {
575 this.resourceLocalService = resourceLocalService;
576 }
577
578
583 public ResourceService getResourceService() {
584 return resourceService;
585 }
586
587
592 public void setResourceService(ResourceService resourceService) {
593 this.resourceService = resourceService;
594 }
595
596
601 public ResourcePersistence getResourcePersistence() {
602 return resourcePersistence;
603 }
604
605
610 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
611 this.resourcePersistence = resourcePersistence;
612 }
613
614
619 public ResourceFinder getResourceFinder() {
620 return resourceFinder;
621 }
622
623
628 public void setResourceFinder(ResourceFinder resourceFinder) {
629 this.resourceFinder = resourceFinder;
630 }
631
632
637 public UserLocalService getUserLocalService() {
638 return userLocalService;
639 }
640
641
646 public void setUserLocalService(UserLocalService userLocalService) {
647 this.userLocalService = userLocalService;
648 }
649
650
655 public UserService getUserService() {
656 return userService;
657 }
658
659
664 public void setUserService(UserService userService) {
665 this.userService = userService;
666 }
667
668
673 public UserPersistence getUserPersistence() {
674 return userPersistence;
675 }
676
677
682 public void setUserPersistence(UserPersistence userPersistence) {
683 this.userPersistence = userPersistence;
684 }
685
686
691 public UserFinder getUserFinder() {
692 return userFinder;
693 }
694
695
700 public void setUserFinder(UserFinder userFinder) {
701 this.userFinder = userFinder;
702 }
703
704 public void afterPropertiesSet() {
705 persistedModelLocalServiceRegistry.register("com.liferay.portlet.mobiledevicerules.model.MDRAction",
706 mdrActionLocalService);
707 }
708
709 public void destroy() {
710 persistedModelLocalServiceRegistry.unregister(
711 "com.liferay.portlet.mobiledevicerules.model.MDRAction");
712 }
713
714
719 public String getBeanIdentifier() {
720 return _beanIdentifier;
721 }
722
723
728 public void setBeanIdentifier(String beanIdentifier) {
729 _beanIdentifier = beanIdentifier;
730 }
731
732 protected Class<?> getModelClass() {
733 return MDRAction.class;
734 }
735
736 protected String getModelClassName() {
737 return MDRAction.class.getName();
738 }
739
740
745 protected void runSQL(String sql) throws SystemException {
746 try {
747 DataSource dataSource = mdrActionPersistence.getDataSource();
748
749 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
750 sql, new int[0]);
751
752 sqlUpdate.update();
753 }
754 catch (Exception e) {
755 throw new SystemException(e);
756 }
757 }
758
759 @BeanReference(type = MDRActionLocalService.class)
760 protected MDRActionLocalService mdrActionLocalService;
761 @BeanReference(type = MDRActionService.class)
762 protected MDRActionService mdrActionService;
763 @BeanReference(type = MDRActionPersistence.class)
764 protected MDRActionPersistence mdrActionPersistence;
765 @BeanReference(type = MDRRuleLocalService.class)
766 protected MDRRuleLocalService mdrRuleLocalService;
767 @BeanReference(type = MDRRuleService.class)
768 protected MDRRuleService mdrRuleService;
769 @BeanReference(type = MDRRulePersistence.class)
770 protected MDRRulePersistence mdrRulePersistence;
771 @BeanReference(type = MDRRuleGroupLocalService.class)
772 protected MDRRuleGroupLocalService mdrRuleGroupLocalService;
773 @BeanReference(type = MDRRuleGroupService.class)
774 protected MDRRuleGroupService mdrRuleGroupService;
775 @BeanReference(type = MDRRuleGroupPersistence.class)
776 protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
777 @BeanReference(type = MDRRuleGroupFinder.class)
778 protected MDRRuleGroupFinder mdrRuleGroupFinder;
779 @BeanReference(type = MDRRuleGroupInstanceLocalService.class)
780 protected MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService;
781 @BeanReference(type = MDRRuleGroupInstanceService.class)
782 protected MDRRuleGroupInstanceService mdrRuleGroupInstanceService;
783 @BeanReference(type = MDRRuleGroupInstancePersistence.class)
784 protected MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence;
785 @BeanReference(type = CounterLocalService.class)
786 protected CounterLocalService counterLocalService;
787 @BeanReference(type = ResourceLocalService.class)
788 protected ResourceLocalService resourceLocalService;
789 @BeanReference(type = ResourceService.class)
790 protected ResourceService resourceService;
791 @BeanReference(type = ResourcePersistence.class)
792 protected ResourcePersistence resourcePersistence;
793 @BeanReference(type = ResourceFinder.class)
794 protected ResourceFinder resourceFinder;
795 @BeanReference(type = UserLocalService.class)
796 protected UserLocalService userLocalService;
797 @BeanReference(type = UserService.class)
798 protected UserService userService;
799 @BeanReference(type = UserPersistence.class)
800 protected UserPersistence userPersistence;
801 @BeanReference(type = UserFinder.class)
802 protected UserFinder userFinder;
803 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
804 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
805 private String _beanIdentifier;
806 }