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