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.portal.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.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.MembershipRequest;
036    import com.liferay.portal.model.PersistedModel;
037    import com.liferay.portal.service.BaseLocalServiceImpl;
038    import com.liferay.portal.service.MembershipRequestLocalService;
039    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
040    import com.liferay.portal.service.persistence.GroupFinder;
041    import com.liferay.portal.service.persistence.GroupPersistence;
042    import com.liferay.portal.service.persistence.MembershipRequestPersistence;
043    import com.liferay.portal.service.persistence.RoleFinder;
044    import com.liferay.portal.service.persistence.RolePersistence;
045    import com.liferay.portal.service.persistence.UserFinder;
046    import com.liferay.portal.service.persistence.UserGroupFinder;
047    import com.liferay.portal.service.persistence.UserGroupPersistence;
048    import com.liferay.portal.service.persistence.UserGroupRoleFinder;
049    import com.liferay.portal.service.persistence.UserGroupRolePersistence;
050    import com.liferay.portal.service.persistence.UserPersistence;
051    import com.liferay.portal.util.PortalUtil;
052    
053    import java.io.Serializable;
054    
055    import java.util.List;
056    
057    import javax.sql.DataSource;
058    
059    /**
060     * Provides the base implementation for the membership request local service.
061     *
062     * <p>
063     * 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.portal.service.impl.MembershipRequestLocalServiceImpl}.
064     * </p>
065     *
066     * @author Brian Wing Shun Chan
067     * @see com.liferay.portal.service.impl.MembershipRequestLocalServiceImpl
068     * @see com.liferay.portal.service.MembershipRequestLocalServiceUtil
069     * @generated
070     */
071    @ProviderType
072    public abstract class MembershipRequestLocalServiceBaseImpl
073            extends BaseLocalServiceImpl implements MembershipRequestLocalService,
074                    IdentifiableBean {
075            /*
076             * NOTE FOR DEVELOPERS:
077             *
078             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.MembershipRequestLocalServiceUtil} to access the membership request local service.
079             */
080    
081            /**
082             * Adds the membership request to the database. Also notifies the appropriate model listeners.
083             *
084             * @param membershipRequest the membership request
085             * @return the membership request that was added
086             */
087            @Indexable(type = IndexableType.REINDEX)
088            @Override
089            public MembershipRequest addMembershipRequest(
090                    MembershipRequest membershipRequest) {
091                    membershipRequest.setNew(true);
092    
093                    return membershipRequestPersistence.update(membershipRequest);
094            }
095    
096            /**
097             * Creates a new membership request with the primary key. Does not add the membership request to the database.
098             *
099             * @param membershipRequestId the primary key for the new membership request
100             * @return the new membership request
101             */
102            @Override
103            public MembershipRequest createMembershipRequest(long membershipRequestId) {
104                    return membershipRequestPersistence.create(membershipRequestId);
105            }
106    
107            /**
108             * Deletes the membership request with the primary key from the database. Also notifies the appropriate model listeners.
109             *
110             * @param membershipRequestId the primary key of the membership request
111             * @return the membership request that was removed
112             * @throws PortalException if a membership request with the primary key could not be found
113             */
114            @Indexable(type = IndexableType.DELETE)
115            @Override
116            public MembershipRequest deleteMembershipRequest(long membershipRequestId)
117                    throws PortalException {
118                    return membershipRequestPersistence.remove(membershipRequestId);
119            }
120    
121            /**
122             * Deletes the membership request from the database. Also notifies the appropriate model listeners.
123             *
124             * @param membershipRequest the membership request
125             * @return the membership request that was removed
126             */
127            @Indexable(type = IndexableType.DELETE)
128            @Override
129            public MembershipRequest deleteMembershipRequest(
130                    MembershipRequest membershipRequest) {
131                    return membershipRequestPersistence.remove(membershipRequest);
132            }
133    
134            @Override
135            public DynamicQuery dynamicQuery() {
136                    Class<?> clazz = getClass();
137    
138                    return DynamicQueryFactoryUtil.forClass(MembershipRequest.class,
139                            clazz.getClassLoader());
140            }
141    
142            /**
143             * Performs a dynamic query on the database and returns the matching rows.
144             *
145             * @param dynamicQuery the dynamic query
146             * @return the matching rows
147             */
148            @Override
149            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
150                    return membershipRequestPersistence.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. 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.portal.model.impl.MembershipRequestModelImpl}. 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.
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             */
165            @Override
166            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
167                    int end) {
168                    return membershipRequestPersistence.findWithDynamicQuery(dynamicQuery,
169                            start, end);
170            }
171    
172            /**
173             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
174             *
175             * <p>
176             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.MembershipRequestModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
177             * </p>
178             *
179             * @param dynamicQuery the dynamic query
180             * @param start the lower bound of the range of model instances
181             * @param end the upper bound of the range of model instances (not inclusive)
182             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
183             * @return the ordered range of matching rows
184             */
185            @Override
186            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
187                    int end, OrderByComparator<T> orderByComparator) {
188                    return membershipRequestPersistence.findWithDynamicQuery(dynamicQuery,
189                            start, end, orderByComparator);
190            }
191    
192            /**
193             * Returns the number of rows matching the dynamic query.
194             *
195             * @param dynamicQuery the dynamic query
196             * @return the number of rows matching the dynamic query
197             */
198            @Override
199            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
200                    return membershipRequestPersistence.countWithDynamicQuery(dynamicQuery);
201            }
202    
203            /**
204             * Returns the number of rows matching the dynamic query.
205             *
206             * @param dynamicQuery the dynamic query
207             * @param projection the projection to apply to the query
208             * @return the number of rows matching the dynamic query
209             */
210            @Override
211            public long dynamicQueryCount(DynamicQuery dynamicQuery,
212                    Projection projection) {
213                    return membershipRequestPersistence.countWithDynamicQuery(dynamicQuery,
214                            projection);
215            }
216    
217            @Override
218            public MembershipRequest fetchMembershipRequest(long membershipRequestId) {
219                    return membershipRequestPersistence.fetchByPrimaryKey(membershipRequestId);
220            }
221    
222            /**
223             * Returns the membership request with the primary key.
224             *
225             * @param membershipRequestId the primary key of the membership request
226             * @return the membership request
227             * @throws PortalException if a membership request with the primary key could not be found
228             */
229            @Override
230            public MembershipRequest getMembershipRequest(long membershipRequestId)
231                    throws PortalException {
232                    return membershipRequestPersistence.findByPrimaryKey(membershipRequestId);
233            }
234    
235            @Override
236            public ActionableDynamicQuery getActionableDynamicQuery() {
237                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
238    
239                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.MembershipRequestLocalServiceUtil.getService());
240                    actionableDynamicQuery.setClass(MembershipRequest.class);
241                    actionableDynamicQuery.setClassLoader(getClassLoader());
242    
243                    actionableDynamicQuery.setPrimaryKeyPropertyName("membershipRequestId");
244    
245                    return actionableDynamicQuery;
246            }
247    
248            protected void initActionableDynamicQuery(
249                    ActionableDynamicQuery actionableDynamicQuery) {
250                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.MembershipRequestLocalServiceUtil.getService());
251                    actionableDynamicQuery.setClass(MembershipRequest.class);
252                    actionableDynamicQuery.setClassLoader(getClassLoader());
253    
254                    actionableDynamicQuery.setPrimaryKeyPropertyName("membershipRequestId");
255            }
256    
257            /**
258             * @throws PortalException
259             */
260            @Override
261            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
262                    throws PortalException {
263                    return membershipRequestLocalService.deleteMembershipRequest((MembershipRequest)persistedModel);
264            }
265    
266            @Override
267            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
268                    throws PortalException {
269                    return membershipRequestPersistence.findByPrimaryKey(primaryKeyObj);
270            }
271    
272            /**
273             * Returns a range of all the membership requests.
274             *
275             * <p>
276             * 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.portal.model.impl.MembershipRequestModelImpl}. 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.
277             * </p>
278             *
279             * @param start the lower bound of the range of membership requests
280             * @param end the upper bound of the range of membership requests (not inclusive)
281             * @return the range of membership requests
282             */
283            @Override
284            public List<MembershipRequest> getMembershipRequests(int start, int end) {
285                    return membershipRequestPersistence.findAll(start, end);
286            }
287    
288            /**
289             * Returns the number of membership requests.
290             *
291             * @return the number of membership requests
292             */
293            @Override
294            public int getMembershipRequestsCount() {
295                    return membershipRequestPersistence.countAll();
296            }
297    
298            /**
299             * Updates the membership request in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
300             *
301             * @param membershipRequest the membership request
302             * @return the membership request that was updated
303             */
304            @Indexable(type = IndexableType.REINDEX)
305            @Override
306            public MembershipRequest updateMembershipRequest(
307                    MembershipRequest membershipRequest) {
308                    return membershipRequestPersistence.update(membershipRequest);
309            }
310    
311            /**
312             * Returns the membership request local service.
313             *
314             * @return the membership request local service
315             */
316            public MembershipRequestLocalService getMembershipRequestLocalService() {
317                    return membershipRequestLocalService;
318            }
319    
320            /**
321             * Sets the membership request local service.
322             *
323             * @param membershipRequestLocalService the membership request local service
324             */
325            public void setMembershipRequestLocalService(
326                    MembershipRequestLocalService membershipRequestLocalService) {
327                    this.membershipRequestLocalService = membershipRequestLocalService;
328            }
329    
330            /**
331             * Returns the membership request remote service.
332             *
333             * @return the membership request remote service
334             */
335            public com.liferay.portal.service.MembershipRequestService getMembershipRequestService() {
336                    return membershipRequestService;
337            }
338    
339            /**
340             * Sets the membership request remote service.
341             *
342             * @param membershipRequestService the membership request remote service
343             */
344            public void setMembershipRequestService(
345                    com.liferay.portal.service.MembershipRequestService membershipRequestService) {
346                    this.membershipRequestService = membershipRequestService;
347            }
348    
349            /**
350             * Returns the membership request persistence.
351             *
352             * @return the membership request persistence
353             */
354            public MembershipRequestPersistence getMembershipRequestPersistence() {
355                    return membershipRequestPersistence;
356            }
357    
358            /**
359             * Sets the membership request persistence.
360             *
361             * @param membershipRequestPersistence the membership request persistence
362             */
363            public void setMembershipRequestPersistence(
364                    MembershipRequestPersistence membershipRequestPersistence) {
365                    this.membershipRequestPersistence = membershipRequestPersistence;
366            }
367    
368            /**
369             * Returns the counter local service.
370             *
371             * @return the counter local service
372             */
373            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
374                    return counterLocalService;
375            }
376    
377            /**
378             * Sets the counter local service.
379             *
380             * @param counterLocalService the counter local service
381             */
382            public void setCounterLocalService(
383                    com.liferay.counter.service.CounterLocalService counterLocalService) {
384                    this.counterLocalService = counterLocalService;
385            }
386    
387            /**
388             * Returns the mail remote service.
389             *
390             * @return the mail remote service
391             */
392            public com.liferay.mail.service.MailService getMailService() {
393                    return mailService;
394            }
395    
396            /**
397             * Sets the mail remote service.
398             *
399             * @param mailService the mail remote service
400             */
401            public void setMailService(com.liferay.mail.service.MailService mailService) {
402                    this.mailService = mailService;
403            }
404    
405            /**
406             * Returns the group local service.
407             *
408             * @return the group local service
409             */
410            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
411                    return groupLocalService;
412            }
413    
414            /**
415             * Sets the group local service.
416             *
417             * @param groupLocalService the group local service
418             */
419            public void setGroupLocalService(
420                    com.liferay.portal.service.GroupLocalService groupLocalService) {
421                    this.groupLocalService = groupLocalService;
422            }
423    
424            /**
425             * Returns the group remote service.
426             *
427             * @return the group remote service
428             */
429            public com.liferay.portal.service.GroupService getGroupService() {
430                    return groupService;
431            }
432    
433            /**
434             * Sets the group remote service.
435             *
436             * @param groupService the group remote service
437             */
438            public void setGroupService(
439                    com.liferay.portal.service.GroupService groupService) {
440                    this.groupService = groupService;
441            }
442    
443            /**
444             * Returns the group persistence.
445             *
446             * @return the group persistence
447             */
448            public GroupPersistence getGroupPersistence() {
449                    return groupPersistence;
450            }
451    
452            /**
453             * Sets the group persistence.
454             *
455             * @param groupPersistence the group persistence
456             */
457            public void setGroupPersistence(GroupPersistence groupPersistence) {
458                    this.groupPersistence = groupPersistence;
459            }
460    
461            /**
462             * Returns the group finder.
463             *
464             * @return the group finder
465             */
466            public GroupFinder getGroupFinder() {
467                    return groupFinder;
468            }
469    
470            /**
471             * Sets the group finder.
472             *
473             * @param groupFinder the group finder
474             */
475            public void setGroupFinder(GroupFinder groupFinder) {
476                    this.groupFinder = groupFinder;
477            }
478    
479            /**
480             * Returns the resource local service.
481             *
482             * @return the resource local service
483             */
484            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
485                    return resourceLocalService;
486            }
487    
488            /**
489             * Sets the resource local service.
490             *
491             * @param resourceLocalService the resource local service
492             */
493            public void setResourceLocalService(
494                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
495                    this.resourceLocalService = resourceLocalService;
496            }
497    
498            /**
499             * Returns the role local service.
500             *
501             * @return the role local service
502             */
503            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
504                    return roleLocalService;
505            }
506    
507            /**
508             * Sets the role local service.
509             *
510             * @param roleLocalService the role local service
511             */
512            public void setRoleLocalService(
513                    com.liferay.portal.service.RoleLocalService roleLocalService) {
514                    this.roleLocalService = roleLocalService;
515            }
516    
517            /**
518             * Returns the role remote service.
519             *
520             * @return the role remote service
521             */
522            public com.liferay.portal.service.RoleService getRoleService() {
523                    return roleService;
524            }
525    
526            /**
527             * Sets the role remote service.
528             *
529             * @param roleService the role remote service
530             */
531            public void setRoleService(
532                    com.liferay.portal.service.RoleService roleService) {
533                    this.roleService = roleService;
534            }
535    
536            /**
537             * Returns the role persistence.
538             *
539             * @return the role persistence
540             */
541            public RolePersistence getRolePersistence() {
542                    return rolePersistence;
543            }
544    
545            /**
546             * Sets the role persistence.
547             *
548             * @param rolePersistence the role persistence
549             */
550            public void setRolePersistence(RolePersistence rolePersistence) {
551                    this.rolePersistence = rolePersistence;
552            }
553    
554            /**
555             * Returns the role finder.
556             *
557             * @return the role finder
558             */
559            public RoleFinder getRoleFinder() {
560                    return roleFinder;
561            }
562    
563            /**
564             * Sets the role finder.
565             *
566             * @param roleFinder the role finder
567             */
568            public void setRoleFinder(RoleFinder roleFinder) {
569                    this.roleFinder = roleFinder;
570            }
571    
572            /**
573             * Returns the user local service.
574             *
575             * @return the user local service
576             */
577            public com.liferay.portal.service.UserLocalService getUserLocalService() {
578                    return userLocalService;
579            }
580    
581            /**
582             * Sets the user local service.
583             *
584             * @param userLocalService the user local service
585             */
586            public void setUserLocalService(
587                    com.liferay.portal.service.UserLocalService userLocalService) {
588                    this.userLocalService = userLocalService;
589            }
590    
591            /**
592             * Returns the user remote service.
593             *
594             * @return the user remote service
595             */
596            public com.liferay.portal.service.UserService getUserService() {
597                    return userService;
598            }
599    
600            /**
601             * Sets the user remote service.
602             *
603             * @param userService the user remote service
604             */
605            public void setUserService(
606                    com.liferay.portal.service.UserService userService) {
607                    this.userService = userService;
608            }
609    
610            /**
611             * Returns the user persistence.
612             *
613             * @return the user persistence
614             */
615            public UserPersistence getUserPersistence() {
616                    return userPersistence;
617            }
618    
619            /**
620             * Sets the user persistence.
621             *
622             * @param userPersistence the user persistence
623             */
624            public void setUserPersistence(UserPersistence userPersistence) {
625                    this.userPersistence = userPersistence;
626            }
627    
628            /**
629             * Returns the user finder.
630             *
631             * @return the user finder
632             */
633            public UserFinder getUserFinder() {
634                    return userFinder;
635            }
636    
637            /**
638             * Sets the user finder.
639             *
640             * @param userFinder the user finder
641             */
642            public void setUserFinder(UserFinder userFinder) {
643                    this.userFinder = userFinder;
644            }
645    
646            /**
647             * Returns the user group local service.
648             *
649             * @return the user group local service
650             */
651            public com.liferay.portal.service.UserGroupLocalService getUserGroupLocalService() {
652                    return userGroupLocalService;
653            }
654    
655            /**
656             * Sets the user group local service.
657             *
658             * @param userGroupLocalService the user group local service
659             */
660            public void setUserGroupLocalService(
661                    com.liferay.portal.service.UserGroupLocalService userGroupLocalService) {
662                    this.userGroupLocalService = userGroupLocalService;
663            }
664    
665            /**
666             * Returns the user group remote service.
667             *
668             * @return the user group remote service
669             */
670            public com.liferay.portal.service.UserGroupService getUserGroupService() {
671                    return userGroupService;
672            }
673    
674            /**
675             * Sets the user group remote service.
676             *
677             * @param userGroupService the user group remote service
678             */
679            public void setUserGroupService(
680                    com.liferay.portal.service.UserGroupService userGroupService) {
681                    this.userGroupService = userGroupService;
682            }
683    
684            /**
685             * Returns the user group persistence.
686             *
687             * @return the user group persistence
688             */
689            public UserGroupPersistence getUserGroupPersistence() {
690                    return userGroupPersistence;
691            }
692    
693            /**
694             * Sets the user group persistence.
695             *
696             * @param userGroupPersistence the user group persistence
697             */
698            public void setUserGroupPersistence(
699                    UserGroupPersistence userGroupPersistence) {
700                    this.userGroupPersistence = userGroupPersistence;
701            }
702    
703            /**
704             * Returns the user group finder.
705             *
706             * @return the user group finder
707             */
708            public UserGroupFinder getUserGroupFinder() {
709                    return userGroupFinder;
710            }
711    
712            /**
713             * Sets the user group finder.
714             *
715             * @param userGroupFinder the user group finder
716             */
717            public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
718                    this.userGroupFinder = userGroupFinder;
719            }
720    
721            /**
722             * Returns the user group role local service.
723             *
724             * @return the user group role local service
725             */
726            public com.liferay.portal.service.UserGroupRoleLocalService getUserGroupRoleLocalService() {
727                    return userGroupRoleLocalService;
728            }
729    
730            /**
731             * Sets the user group role local service.
732             *
733             * @param userGroupRoleLocalService the user group role local service
734             */
735            public void setUserGroupRoleLocalService(
736                    com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService) {
737                    this.userGroupRoleLocalService = userGroupRoleLocalService;
738            }
739    
740            /**
741             * Returns the user group role remote service.
742             *
743             * @return the user group role remote service
744             */
745            public com.liferay.portal.service.UserGroupRoleService getUserGroupRoleService() {
746                    return userGroupRoleService;
747            }
748    
749            /**
750             * Sets the user group role remote service.
751             *
752             * @param userGroupRoleService the user group role remote service
753             */
754            public void setUserGroupRoleService(
755                    com.liferay.portal.service.UserGroupRoleService userGroupRoleService) {
756                    this.userGroupRoleService = userGroupRoleService;
757            }
758    
759            /**
760             * Returns the user group role persistence.
761             *
762             * @return the user group role persistence
763             */
764            public UserGroupRolePersistence getUserGroupRolePersistence() {
765                    return userGroupRolePersistence;
766            }
767    
768            /**
769             * Sets the user group role persistence.
770             *
771             * @param userGroupRolePersistence the user group role persistence
772             */
773            public void setUserGroupRolePersistence(
774                    UserGroupRolePersistence userGroupRolePersistence) {
775                    this.userGroupRolePersistence = userGroupRolePersistence;
776            }
777    
778            /**
779             * Returns the user group role finder.
780             *
781             * @return the user group role finder
782             */
783            public UserGroupRoleFinder getUserGroupRoleFinder() {
784                    return userGroupRoleFinder;
785            }
786    
787            /**
788             * Sets the user group role finder.
789             *
790             * @param userGroupRoleFinder the user group role finder
791             */
792            public void setUserGroupRoleFinder(UserGroupRoleFinder userGroupRoleFinder) {
793                    this.userGroupRoleFinder = userGroupRoleFinder;
794            }
795    
796            public void afterPropertiesSet() {
797                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.MembershipRequest",
798                            membershipRequestLocalService);
799            }
800    
801            public void destroy() {
802                    persistedModelLocalServiceRegistry.unregister(
803                            "com.liferay.portal.model.MembershipRequest");
804            }
805    
806            /**
807             * Returns the Spring bean ID for this bean.
808             *
809             * @return the Spring bean ID for this bean
810             */
811            @Override
812            public String getBeanIdentifier() {
813                    return _beanIdentifier;
814            }
815    
816            /**
817             * Sets the Spring bean ID for this bean.
818             *
819             * @param beanIdentifier the Spring bean ID for this bean
820             */
821            @Override
822            public void setBeanIdentifier(String beanIdentifier) {
823                    _beanIdentifier = beanIdentifier;
824            }
825    
826            protected Class<?> getModelClass() {
827                    return MembershipRequest.class;
828            }
829    
830            protected String getModelClassName() {
831                    return MembershipRequest.class.getName();
832            }
833    
834            /**
835             * Performs a SQL query.
836             *
837             * @param sql the sql query
838             */
839            protected void runSQL(String sql) {
840                    try {
841                            DataSource dataSource = membershipRequestPersistence.getDataSource();
842    
843                            DB db = DBFactoryUtil.getDB();
844    
845                            sql = db.buildSQL(sql);
846                            sql = PortalUtil.transformSQL(sql);
847    
848                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
849                                            sql, new int[0]);
850    
851                            sqlUpdate.update();
852                    }
853                    catch (Exception e) {
854                            throw new SystemException(e);
855                    }
856            }
857    
858            @BeanReference(type = MembershipRequestLocalService.class)
859            protected MembershipRequestLocalService membershipRequestLocalService;
860            @BeanReference(type = com.liferay.portal.service.MembershipRequestService.class)
861            protected com.liferay.portal.service.MembershipRequestService membershipRequestService;
862            @BeanReference(type = MembershipRequestPersistence.class)
863            protected MembershipRequestPersistence membershipRequestPersistence;
864            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
865            protected com.liferay.counter.service.CounterLocalService counterLocalService;
866            @BeanReference(type = com.liferay.mail.service.MailService.class)
867            protected com.liferay.mail.service.MailService mailService;
868            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
869            protected com.liferay.portal.service.GroupLocalService groupLocalService;
870            @BeanReference(type = com.liferay.portal.service.GroupService.class)
871            protected com.liferay.portal.service.GroupService groupService;
872            @BeanReference(type = GroupPersistence.class)
873            protected GroupPersistence groupPersistence;
874            @BeanReference(type = GroupFinder.class)
875            protected GroupFinder groupFinder;
876            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
877            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
878            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
879            protected com.liferay.portal.service.RoleLocalService roleLocalService;
880            @BeanReference(type = com.liferay.portal.service.RoleService.class)
881            protected com.liferay.portal.service.RoleService roleService;
882            @BeanReference(type = RolePersistence.class)
883            protected RolePersistence rolePersistence;
884            @BeanReference(type = RoleFinder.class)
885            protected RoleFinder roleFinder;
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.portal.service.UserGroupLocalService.class)
895            protected com.liferay.portal.service.UserGroupLocalService userGroupLocalService;
896            @BeanReference(type = com.liferay.portal.service.UserGroupService.class)
897            protected com.liferay.portal.service.UserGroupService userGroupService;
898            @BeanReference(type = UserGroupPersistence.class)
899            protected UserGroupPersistence userGroupPersistence;
900            @BeanReference(type = UserGroupFinder.class)
901            protected UserGroupFinder userGroupFinder;
902            @BeanReference(type = com.liferay.portal.service.UserGroupRoleLocalService.class)
903            protected com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService;
904            @BeanReference(type = com.liferay.portal.service.UserGroupRoleService.class)
905            protected com.liferay.portal.service.UserGroupRoleService userGroupRoleService;
906            @BeanReference(type = UserGroupRolePersistence.class)
907            protected UserGroupRolePersistence userGroupRolePersistence;
908            @BeanReference(type = UserGroupRoleFinder.class)
909            protected UserGroupRoleFinder userGroupRoleFinder;
910            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
911            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
912            private String _beanIdentifier;
913    }