001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.log.Log;
027    import com.liferay.portal.kernel.log.LogFactoryUtil;
028    import com.liferay.portal.kernel.search.Indexer;
029    import com.liferay.portal.kernel.search.IndexerRegistryUtil;
030    import com.liferay.portal.kernel.search.SearchException;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.GroupLocalService;
034    import com.liferay.portal.service.GroupService;
035    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
036    import com.liferay.portal.service.ResourceLocalService;
037    import com.liferay.portal.service.ResourceService;
038    import com.liferay.portal.service.UserLocalService;
039    import com.liferay.portal.service.UserService;
040    import com.liferay.portal.service.persistence.GroupFinder;
041    import com.liferay.portal.service.persistence.GroupPersistence;
042    import com.liferay.portal.service.persistence.ResourceFinder;
043    import com.liferay.portal.service.persistence.ResourcePersistence;
044    import com.liferay.portal.service.persistence.UserFinder;
045    import com.liferay.portal.service.persistence.UserPersistence;
046    
047    import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup;
048    import com.liferay.portlet.mobiledevicerules.service.MDRActionLocalService;
049    import com.liferay.portlet.mobiledevicerules.service.MDRActionService;
050    import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService;
051    import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService;
052    import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService;
053    import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService;
054    import com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService;
055    import com.liferay.portlet.mobiledevicerules.service.MDRRuleService;
056    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRActionPersistence;
057    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupFinder;
058    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupInstancePersistence;
059    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupPersistence;
060    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRulePersistence;
061    
062    import java.io.Serializable;
063    
064    import java.util.List;
065    
066    import javax.sql.DataSource;
067    
068    /**
069     * The base implementation of the m d r rule group local service.
070     *
071     * <p>
072     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupLocalServiceImpl}.
073     * </p>
074     *
075     * @author Edward C. Han
076     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupLocalServiceImpl
077     * @see com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalServiceUtil
078     * @generated
079     */
080    public abstract class MDRRuleGroupLocalServiceBaseImpl
081            implements MDRRuleGroupLocalService, IdentifiableBean {
082            /*
083             * NOTE FOR DEVELOPERS:
084             *
085             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalServiceUtil} to access the m d r rule group local service.
086             */
087    
088            /**
089             * Adds the m d r rule group to the database. Also notifies the appropriate model listeners.
090             *
091             * @param mdrRuleGroup the m d r rule group
092             * @return the m d r rule group that was added
093             * @throws SystemException if a system exception occurred
094             */
095            public MDRRuleGroup addMDRRuleGroup(MDRRuleGroup mdrRuleGroup)
096                    throws SystemException {
097                    mdrRuleGroup.setNew(true);
098    
099                    mdrRuleGroup = mdrRuleGroupPersistence.update(mdrRuleGroup, false);
100    
101                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
102    
103                    if (indexer != null) {
104                            try {
105                                    indexer.reindex(mdrRuleGroup);
106                            }
107                            catch (SearchException se) {
108                                    if (_log.isWarnEnabled()) {
109                                            _log.warn(se, se);
110                                    }
111                            }
112                    }
113    
114                    return mdrRuleGroup;
115            }
116    
117            /**
118             * Creates a new m d r rule group with the primary key. Does not add the m d r rule group to the database.
119             *
120             * @param ruleGroupId the primary key for the new m d r rule group
121             * @return the new m d r rule group
122             */
123            public MDRRuleGroup createMDRRuleGroup(long ruleGroupId) {
124                    return mdrRuleGroupPersistence.create(ruleGroupId);
125            }
126    
127            /**
128             * Deletes the m d r rule group with the primary key from the database. Also notifies the appropriate model listeners.
129             *
130             * @param ruleGroupId the primary key of the m d r rule group
131             * @throws PortalException if a m d r rule group with the primary key could not be found
132             * @throws SystemException if a system exception occurred
133             */
134            public void deleteMDRRuleGroup(long ruleGroupId)
135                    throws PortalException, SystemException {
136                    MDRRuleGroup mdrRuleGroup = mdrRuleGroupPersistence.remove(ruleGroupId);
137    
138                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
139    
140                    if (indexer != null) {
141                            try {
142                                    indexer.delete(mdrRuleGroup);
143                            }
144                            catch (SearchException se) {
145                                    if (_log.isWarnEnabled()) {
146                                            _log.warn(se, se);
147                                    }
148                            }
149                    }
150            }
151    
152            /**
153             * Deletes the m d r rule group from the database. Also notifies the appropriate model listeners.
154             *
155             * @param mdrRuleGroup the m d r rule group
156             * @throws SystemException if a system exception occurred
157             */
158            public void deleteMDRRuleGroup(MDRRuleGroup mdrRuleGroup)
159                    throws SystemException {
160                    mdrRuleGroupPersistence.remove(mdrRuleGroup);
161    
162                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
163    
164                    if (indexer != null) {
165                            try {
166                                    indexer.delete(mdrRuleGroup);
167                            }
168                            catch (SearchException se) {
169                                    if (_log.isWarnEnabled()) {
170                                            _log.warn(se, se);
171                                    }
172                            }
173                    }
174            }
175    
176            /**
177             * Performs a dynamic query on the database and returns the matching rows.
178             *
179             * @param dynamicQuery the dynamic query
180             * @return the matching rows
181             * @throws SystemException if a system exception occurred
182             */
183            @SuppressWarnings("rawtypes")
184            public List dynamicQuery(DynamicQuery dynamicQuery)
185                    throws SystemException {
186                    return mdrRuleGroupPersistence.findWithDynamicQuery(dynamicQuery);
187            }
188    
189            /**
190             * Performs a dynamic query on the database and returns a range of the matching rows.
191             *
192             * <p>
193             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
194             * </p>
195             *
196             * @param dynamicQuery the dynamic query
197             * @param start the lower bound of the range of model instances
198             * @param end the upper bound of the range of model instances (not inclusive)
199             * @return the range of matching rows
200             * @throws SystemException if a system exception occurred
201             */
202            @SuppressWarnings("rawtypes")
203            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
204                    throws SystemException {
205                    return mdrRuleGroupPersistence.findWithDynamicQuery(dynamicQuery,
206                            start, end);
207            }
208    
209            /**
210             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
211             *
212             * <p>
213             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
214             * </p>
215             *
216             * @param dynamicQuery the dynamic query
217             * @param start the lower bound of the range of model instances
218             * @param end the upper bound of the range of model instances (not inclusive)
219             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
220             * @return the ordered range of matching rows
221             * @throws SystemException if a system exception occurred
222             */
223            @SuppressWarnings("rawtypes")
224            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
225                    OrderByComparator orderByComparator) throws SystemException {
226                    return mdrRuleGroupPersistence.findWithDynamicQuery(dynamicQuery,
227                            start, end, orderByComparator);
228            }
229    
230            /**
231             * Returns the number of rows that match the dynamic query.
232             *
233             * @param dynamicQuery the dynamic query
234             * @return the number of rows that match the dynamic query
235             * @throws SystemException if a system exception occurred
236             */
237            public long dynamicQueryCount(DynamicQuery dynamicQuery)
238                    throws SystemException {
239                    return mdrRuleGroupPersistence.countWithDynamicQuery(dynamicQuery);
240            }
241    
242            public MDRRuleGroup fetchMDRRuleGroup(long ruleGroupId)
243                    throws SystemException {
244                    return mdrRuleGroupPersistence.fetchByPrimaryKey(ruleGroupId);
245            }
246    
247            /**
248             * Returns the m d r rule group with the primary key.
249             *
250             * @param ruleGroupId the primary key of the m d r rule group
251             * @return the m d r rule group
252             * @throws PortalException if a m d r rule group with the primary key could not be found
253             * @throws SystemException if a system exception occurred
254             */
255            public MDRRuleGroup getMDRRuleGroup(long ruleGroupId)
256                    throws PortalException, SystemException {
257                    return mdrRuleGroupPersistence.findByPrimaryKey(ruleGroupId);
258            }
259    
260            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
261                    throws PortalException, SystemException {
262                    return mdrRuleGroupPersistence.findByPrimaryKey(primaryKeyObj);
263            }
264    
265            /**
266             * Returns the m d r rule group with the UUID in the group.
267             *
268             * @param uuid the UUID of m d r rule group
269             * @param groupId the group id of the m d r rule group
270             * @return the m d r rule group
271             * @throws PortalException if a m d r rule group with the UUID in the group could not be found
272             * @throws SystemException if a system exception occurred
273             */
274            public MDRRuleGroup getMDRRuleGroupByUuidAndGroupId(String uuid,
275                    long groupId) throws PortalException, SystemException {
276                    return mdrRuleGroupPersistence.findByUUID_G(uuid, groupId);
277            }
278    
279            /**
280             * Returns a range of all the m d r rule groups.
281             *
282             * <p>
283             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
284             * </p>
285             *
286             * @param start the lower bound of the range of m d r rule groups
287             * @param end the upper bound of the range of m d r rule groups (not inclusive)
288             * @return the range of m d r rule groups
289             * @throws SystemException if a system exception occurred
290             */
291            public List<MDRRuleGroup> getMDRRuleGroups(int start, int end)
292                    throws SystemException {
293                    return mdrRuleGroupPersistence.findAll(start, end);
294            }
295    
296            /**
297             * Returns the number of m d r rule groups.
298             *
299             * @return the number of m d r rule groups
300             * @throws SystemException if a system exception occurred
301             */
302            public int getMDRRuleGroupsCount() throws SystemException {
303                    return mdrRuleGroupPersistence.countAll();
304            }
305    
306            /**
307             * Updates the m d r rule group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
308             *
309             * @param mdrRuleGroup the m d r rule group
310             * @return the m d r rule group that was updated
311             * @throws SystemException if a system exception occurred
312             */
313            public MDRRuleGroup updateMDRRuleGroup(MDRRuleGroup mdrRuleGroup)
314                    throws SystemException {
315                    return updateMDRRuleGroup(mdrRuleGroup, true);
316            }
317    
318            /**
319             * Updates the m d r rule group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
320             *
321             * @param mdrRuleGroup the m d r rule group
322             * @param merge whether to merge the m d r rule group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
323             * @return the m d r rule group that was updated
324             * @throws SystemException if a system exception occurred
325             */
326            public MDRRuleGroup updateMDRRuleGroup(MDRRuleGroup mdrRuleGroup,
327                    boolean merge) throws SystemException {
328                    mdrRuleGroup.setNew(false);
329    
330                    mdrRuleGroup = mdrRuleGroupPersistence.update(mdrRuleGroup, merge);
331    
332                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
333    
334                    if (indexer != null) {
335                            try {
336                                    indexer.reindex(mdrRuleGroup);
337                            }
338                            catch (SearchException se) {
339                                    if (_log.isWarnEnabled()) {
340                                            _log.warn(se, se);
341                                    }
342                            }
343                    }
344    
345                    return mdrRuleGroup;
346            }
347    
348            /**
349             * Returns the m d r action local service.
350             *
351             * @return the m d r action local service
352             */
353            public MDRActionLocalService getMDRActionLocalService() {
354                    return mdrActionLocalService;
355            }
356    
357            /**
358             * Sets the m d r action local service.
359             *
360             * @param mdrActionLocalService the m d r action local service
361             */
362            public void setMDRActionLocalService(
363                    MDRActionLocalService mdrActionLocalService) {
364                    this.mdrActionLocalService = mdrActionLocalService;
365            }
366    
367            /**
368             * Returns the m d r action remote service.
369             *
370             * @return the m d r action remote service
371             */
372            public MDRActionService getMDRActionService() {
373                    return mdrActionService;
374            }
375    
376            /**
377             * Sets the m d r action remote service.
378             *
379             * @param mdrActionService the m d r action remote service
380             */
381            public void setMDRActionService(MDRActionService mdrActionService) {
382                    this.mdrActionService = mdrActionService;
383            }
384    
385            /**
386             * Returns the m d r action persistence.
387             *
388             * @return the m d r action persistence
389             */
390            public MDRActionPersistence getMDRActionPersistence() {
391                    return mdrActionPersistence;
392            }
393    
394            /**
395             * Sets the m d r action persistence.
396             *
397             * @param mdrActionPersistence the m d r action persistence
398             */
399            public void setMDRActionPersistence(
400                    MDRActionPersistence mdrActionPersistence) {
401                    this.mdrActionPersistence = mdrActionPersistence;
402            }
403    
404            /**
405             * Returns the m d r rule local service.
406             *
407             * @return the m d r rule local service
408             */
409            public MDRRuleLocalService getMDRRuleLocalService() {
410                    return mdrRuleLocalService;
411            }
412    
413            /**
414             * Sets the m d r rule local service.
415             *
416             * @param mdrRuleLocalService the m d r rule local service
417             */
418            public void setMDRRuleLocalService(MDRRuleLocalService mdrRuleLocalService) {
419                    this.mdrRuleLocalService = mdrRuleLocalService;
420            }
421    
422            /**
423             * Returns the m d r rule remote service.
424             *
425             * @return the m d r rule remote service
426             */
427            public MDRRuleService getMDRRuleService() {
428                    return mdrRuleService;
429            }
430    
431            /**
432             * Sets the m d r rule remote service.
433             *
434             * @param mdrRuleService the m d r rule remote service
435             */
436            public void setMDRRuleService(MDRRuleService mdrRuleService) {
437                    this.mdrRuleService = mdrRuleService;
438            }
439    
440            /**
441             * Returns the m d r rule persistence.
442             *
443             * @return the m d r rule persistence
444             */
445            public MDRRulePersistence getMDRRulePersistence() {
446                    return mdrRulePersistence;
447            }
448    
449            /**
450             * Sets the m d r rule persistence.
451             *
452             * @param mdrRulePersistence the m d r rule persistence
453             */
454            public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
455                    this.mdrRulePersistence = mdrRulePersistence;
456            }
457    
458            /**
459             * Returns the m d r rule group local service.
460             *
461             * @return the m d r rule group local service
462             */
463            public MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
464                    return mdrRuleGroupLocalService;
465            }
466    
467            /**
468             * Sets the m d r rule group local service.
469             *
470             * @param mdrRuleGroupLocalService the m d r rule group local service
471             */
472            public void setMDRRuleGroupLocalService(
473                    MDRRuleGroupLocalService mdrRuleGroupLocalService) {
474                    this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
475            }
476    
477            /**
478             * Returns the m d r rule group remote service.
479             *
480             * @return the m d r rule group remote service
481             */
482            public MDRRuleGroupService getMDRRuleGroupService() {
483                    return mdrRuleGroupService;
484            }
485    
486            /**
487             * Sets the m d r rule group remote service.
488             *
489             * @param mdrRuleGroupService the m d r rule group remote service
490             */
491            public void setMDRRuleGroupService(MDRRuleGroupService mdrRuleGroupService) {
492                    this.mdrRuleGroupService = mdrRuleGroupService;
493            }
494    
495            /**
496             * Returns the m d r rule group persistence.
497             *
498             * @return the m d r rule group persistence
499             */
500            public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
501                    return mdrRuleGroupPersistence;
502            }
503    
504            /**
505             * Sets the m d r rule group persistence.
506             *
507             * @param mdrRuleGroupPersistence the m d r rule group persistence
508             */
509            public void setMDRRuleGroupPersistence(
510                    MDRRuleGroupPersistence mdrRuleGroupPersistence) {
511                    this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
512            }
513    
514            /**
515             * Returns the m d r rule group finder.
516             *
517             * @return the m d r rule group finder
518             */
519            public MDRRuleGroupFinder getMDRRuleGroupFinder() {
520                    return mdrRuleGroupFinder;
521            }
522    
523            /**
524             * Sets the m d r rule group finder.
525             *
526             * @param mdrRuleGroupFinder the m d r rule group finder
527             */
528            public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
529                    this.mdrRuleGroupFinder = mdrRuleGroupFinder;
530            }
531    
532            /**
533             * Returns the m d r rule group instance local service.
534             *
535             * @return the m d r rule group instance local service
536             */
537            public MDRRuleGroupInstanceLocalService getMDRRuleGroupInstanceLocalService() {
538                    return mdrRuleGroupInstanceLocalService;
539            }
540    
541            /**
542             * Sets the m d r rule group instance local service.
543             *
544             * @param mdrRuleGroupInstanceLocalService the m d r rule group instance local service
545             */
546            public void setMDRRuleGroupInstanceLocalService(
547                    MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService) {
548                    this.mdrRuleGroupInstanceLocalService = mdrRuleGroupInstanceLocalService;
549            }
550    
551            /**
552             * Returns the m d r rule group instance remote service.
553             *
554             * @return the m d r rule group instance remote service
555             */
556            public MDRRuleGroupInstanceService getMDRRuleGroupInstanceService() {
557                    return mdrRuleGroupInstanceService;
558            }
559    
560            /**
561             * Sets the m d r rule group instance remote service.
562             *
563             * @param mdrRuleGroupInstanceService the m d r rule group instance remote service
564             */
565            public void setMDRRuleGroupInstanceService(
566                    MDRRuleGroupInstanceService mdrRuleGroupInstanceService) {
567                    this.mdrRuleGroupInstanceService = mdrRuleGroupInstanceService;
568            }
569    
570            /**
571             * Returns the m d r rule group instance persistence.
572             *
573             * @return the m d r rule group instance persistence
574             */
575            public MDRRuleGroupInstancePersistence getMDRRuleGroupInstancePersistence() {
576                    return mdrRuleGroupInstancePersistence;
577            }
578    
579            /**
580             * Sets the m d r rule group instance persistence.
581             *
582             * @param mdrRuleGroupInstancePersistence the m d r rule group instance persistence
583             */
584            public void setMDRRuleGroupInstancePersistence(
585                    MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence) {
586                    this.mdrRuleGroupInstancePersistence = mdrRuleGroupInstancePersistence;
587            }
588    
589            /**
590             * Returns the counter local service.
591             *
592             * @return the counter local service
593             */
594            public CounterLocalService getCounterLocalService() {
595                    return counterLocalService;
596            }
597    
598            /**
599             * Sets the counter local service.
600             *
601             * @param counterLocalService the counter local service
602             */
603            public void setCounterLocalService(CounterLocalService counterLocalService) {
604                    this.counterLocalService = counterLocalService;
605            }
606    
607            /**
608             * Returns the group local service.
609             *
610             * @return the group local service
611             */
612            public GroupLocalService getGroupLocalService() {
613                    return groupLocalService;
614            }
615    
616            /**
617             * Sets the group local service.
618             *
619             * @param groupLocalService the group local service
620             */
621            public void setGroupLocalService(GroupLocalService groupLocalService) {
622                    this.groupLocalService = groupLocalService;
623            }
624    
625            /**
626             * Returns the group remote service.
627             *
628             * @return the group remote service
629             */
630            public GroupService getGroupService() {
631                    return groupService;
632            }
633    
634            /**
635             * Sets the group remote service.
636             *
637             * @param groupService the group remote service
638             */
639            public void setGroupService(GroupService groupService) {
640                    this.groupService = groupService;
641            }
642    
643            /**
644             * Returns the group persistence.
645             *
646             * @return the group persistence
647             */
648            public GroupPersistence getGroupPersistence() {
649                    return groupPersistence;
650            }
651    
652            /**
653             * Sets the group persistence.
654             *
655             * @param groupPersistence the group persistence
656             */
657            public void setGroupPersistence(GroupPersistence groupPersistence) {
658                    this.groupPersistence = groupPersistence;
659            }
660    
661            /**
662             * Returns the group finder.
663             *
664             * @return the group finder
665             */
666            public GroupFinder getGroupFinder() {
667                    return groupFinder;
668            }
669    
670            /**
671             * Sets the group finder.
672             *
673             * @param groupFinder the group finder
674             */
675            public void setGroupFinder(GroupFinder groupFinder) {
676                    this.groupFinder = groupFinder;
677            }
678    
679            /**
680             * Returns the resource local service.
681             *
682             * @return the resource local service
683             */
684            public ResourceLocalService getResourceLocalService() {
685                    return resourceLocalService;
686            }
687    
688            /**
689             * Sets the resource local service.
690             *
691             * @param resourceLocalService the resource local service
692             */
693            public void setResourceLocalService(
694                    ResourceLocalService resourceLocalService) {
695                    this.resourceLocalService = resourceLocalService;
696            }
697    
698            /**
699             * Returns the resource remote service.
700             *
701             * @return the resource remote service
702             */
703            public ResourceService getResourceService() {
704                    return resourceService;
705            }
706    
707            /**
708             * Sets the resource remote service.
709             *
710             * @param resourceService the resource remote service
711             */
712            public void setResourceService(ResourceService resourceService) {
713                    this.resourceService = resourceService;
714            }
715    
716            /**
717             * Returns the resource persistence.
718             *
719             * @return the resource persistence
720             */
721            public ResourcePersistence getResourcePersistence() {
722                    return resourcePersistence;
723            }
724    
725            /**
726             * Sets the resource persistence.
727             *
728             * @param resourcePersistence the resource persistence
729             */
730            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
731                    this.resourcePersistence = resourcePersistence;
732            }
733    
734            /**
735             * Returns the resource finder.
736             *
737             * @return the resource finder
738             */
739            public ResourceFinder getResourceFinder() {
740                    return resourceFinder;
741            }
742    
743            /**
744             * Sets the resource finder.
745             *
746             * @param resourceFinder the resource finder
747             */
748            public void setResourceFinder(ResourceFinder resourceFinder) {
749                    this.resourceFinder = resourceFinder;
750            }
751    
752            /**
753             * Returns the user local service.
754             *
755             * @return the user local service
756             */
757            public UserLocalService getUserLocalService() {
758                    return userLocalService;
759            }
760    
761            /**
762             * Sets the user local service.
763             *
764             * @param userLocalService the user local service
765             */
766            public void setUserLocalService(UserLocalService userLocalService) {
767                    this.userLocalService = userLocalService;
768            }
769    
770            /**
771             * Returns the user remote service.
772             *
773             * @return the user remote service
774             */
775            public UserService getUserService() {
776                    return userService;
777            }
778    
779            /**
780             * Sets the user remote service.
781             *
782             * @param userService the user remote service
783             */
784            public void setUserService(UserService userService) {
785                    this.userService = userService;
786            }
787    
788            /**
789             * Returns the user persistence.
790             *
791             * @return the user persistence
792             */
793            public UserPersistence getUserPersistence() {
794                    return userPersistence;
795            }
796    
797            /**
798             * Sets the user persistence.
799             *
800             * @param userPersistence the user persistence
801             */
802            public void setUserPersistence(UserPersistence userPersistence) {
803                    this.userPersistence = userPersistence;
804            }
805    
806            /**
807             * Returns the user finder.
808             *
809             * @return the user finder
810             */
811            public UserFinder getUserFinder() {
812                    return userFinder;
813            }
814    
815            /**
816             * Sets the user finder.
817             *
818             * @param userFinder the user finder
819             */
820            public void setUserFinder(UserFinder userFinder) {
821                    this.userFinder = userFinder;
822            }
823    
824            public void afterPropertiesSet() {
825                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup",
826                            mdrRuleGroupLocalService);
827            }
828    
829            public void destroy() {
830                    persistedModelLocalServiceRegistry.unregister(
831                            "com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup");
832            }
833    
834            /**
835             * Returns the Spring bean ID for this bean.
836             *
837             * @return the Spring bean ID for this bean
838             */
839            public String getBeanIdentifier() {
840                    return _beanIdentifier;
841            }
842    
843            /**
844             * Sets the Spring bean ID for this bean.
845             *
846             * @param beanIdentifier the Spring bean ID for this bean
847             */
848            public void setBeanIdentifier(String beanIdentifier) {
849                    _beanIdentifier = beanIdentifier;
850            }
851    
852            protected ClassLoader getClassLoader() {
853                    Class<?> clazz = getClass();
854    
855                    return clazz.getClassLoader();
856            }
857    
858            protected Class<?> getModelClass() {
859                    return MDRRuleGroup.class;
860            }
861    
862            protected String getModelClassName() {
863                    return MDRRuleGroup.class.getName();
864            }
865    
866            /**
867             * Performs an SQL query.
868             *
869             * @param sql the sql query
870             */
871            protected void runSQL(String sql) throws SystemException {
872                    try {
873                            DataSource dataSource = mdrRuleGroupPersistence.getDataSource();
874    
875                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
876                                            sql, new int[0]);
877    
878                            sqlUpdate.update();
879                    }
880                    catch (Exception e) {
881                            throw new SystemException(e);
882                    }
883            }
884    
885            @BeanReference(type = MDRActionLocalService.class)
886            protected MDRActionLocalService mdrActionLocalService;
887            @BeanReference(type = MDRActionService.class)
888            protected MDRActionService mdrActionService;
889            @BeanReference(type = MDRActionPersistence.class)
890            protected MDRActionPersistence mdrActionPersistence;
891            @BeanReference(type = MDRRuleLocalService.class)
892            protected MDRRuleLocalService mdrRuleLocalService;
893            @BeanReference(type = MDRRuleService.class)
894            protected MDRRuleService mdrRuleService;
895            @BeanReference(type = MDRRulePersistence.class)
896            protected MDRRulePersistence mdrRulePersistence;
897            @BeanReference(type = MDRRuleGroupLocalService.class)
898            protected MDRRuleGroupLocalService mdrRuleGroupLocalService;
899            @BeanReference(type = MDRRuleGroupService.class)
900            protected MDRRuleGroupService mdrRuleGroupService;
901            @BeanReference(type = MDRRuleGroupPersistence.class)
902            protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
903            @BeanReference(type = MDRRuleGroupFinder.class)
904            protected MDRRuleGroupFinder mdrRuleGroupFinder;
905            @BeanReference(type = MDRRuleGroupInstanceLocalService.class)
906            protected MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService;
907            @BeanReference(type = MDRRuleGroupInstanceService.class)
908            protected MDRRuleGroupInstanceService mdrRuleGroupInstanceService;
909            @BeanReference(type = MDRRuleGroupInstancePersistence.class)
910            protected MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence;
911            @BeanReference(type = CounterLocalService.class)
912            protected CounterLocalService counterLocalService;
913            @BeanReference(type = GroupLocalService.class)
914            protected GroupLocalService groupLocalService;
915            @BeanReference(type = GroupService.class)
916            protected GroupService groupService;
917            @BeanReference(type = GroupPersistence.class)
918            protected GroupPersistence groupPersistence;
919            @BeanReference(type = GroupFinder.class)
920            protected GroupFinder groupFinder;
921            @BeanReference(type = ResourceLocalService.class)
922            protected ResourceLocalService resourceLocalService;
923            @BeanReference(type = ResourceService.class)
924            protected ResourceService resourceService;
925            @BeanReference(type = ResourcePersistence.class)
926            protected ResourcePersistence resourcePersistence;
927            @BeanReference(type = ResourceFinder.class)
928            protected ResourceFinder resourceFinder;
929            @BeanReference(type = UserLocalService.class)
930            protected UserLocalService userLocalService;
931            @BeanReference(type = UserService.class)
932            protected UserService userService;
933            @BeanReference(type = UserPersistence.class)
934            protected UserPersistence userPersistence;
935            @BeanReference(type = UserFinder.class)
936            protected UserFinder userFinder;
937            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
938            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
939            private static Log _log = LogFactoryUtil.getLog(MDRRuleGroupLocalServiceBaseImpl.class);
940            private String _beanIdentifier;
941    }