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