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