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