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