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