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