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