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.ExportActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.dao.orm.Property;
032    import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
033    import com.liferay.portal.kernel.exception.PortalException;
034    import com.liferay.portal.kernel.exception.SystemException;
035    import com.liferay.portal.kernel.search.Indexable;
036    import com.liferay.portal.kernel.search.IndexableType;
037    import com.liferay.portal.kernel.util.OrderByComparator;
038    import com.liferay.portal.model.PersistedModel;
039    import com.liferay.portal.model.Role;
040    import com.liferay.portal.service.BaseLocalServiceImpl;
041    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
042    import com.liferay.portal.service.RoleLocalService;
043    import com.liferay.portal.service.persistence.ClassNamePersistence;
044    import com.liferay.portal.service.persistence.CompanyPersistence;
045    import com.liferay.portal.service.persistence.GroupFinder;
046    import com.liferay.portal.service.persistence.GroupPersistence;
047    import com.liferay.portal.service.persistence.LayoutFinder;
048    import com.liferay.portal.service.persistence.LayoutPersistence;
049    import com.liferay.portal.service.persistence.ResourceActionPersistence;
050    import com.liferay.portal.service.persistence.ResourceBlockFinder;
051    import com.liferay.portal.service.persistence.ResourceBlockPermissionPersistence;
052    import com.liferay.portal.service.persistence.ResourceBlockPersistence;
053    import com.liferay.portal.service.persistence.ResourcePermissionFinder;
054    import com.liferay.portal.service.persistence.ResourcePermissionPersistence;
055    import com.liferay.portal.service.persistence.ResourceTypePermissionFinder;
056    import com.liferay.portal.service.persistence.ResourceTypePermissionPersistence;
057    import com.liferay.portal.service.persistence.RoleFinder;
058    import com.liferay.portal.service.persistence.RolePersistence;
059    import com.liferay.portal.service.persistence.ShardPersistence;
060    import com.liferay.portal.service.persistence.TeamFinder;
061    import com.liferay.portal.service.persistence.TeamPersistence;
062    import com.liferay.portal.service.persistence.UserFinder;
063    import com.liferay.portal.service.persistence.UserGroupGroupRoleFinder;
064    import com.liferay.portal.service.persistence.UserGroupGroupRolePersistence;
065    import com.liferay.portal.service.persistence.UserGroupRoleFinder;
066    import com.liferay.portal.service.persistence.UserGroupRolePersistence;
067    import com.liferay.portal.service.persistence.UserPersistence;
068    import com.liferay.portal.util.PortalUtil;
069    
070    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
071    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
072    import com.liferay.portlet.exportimport.lar.ManifestSummary;
073    import com.liferay.portlet.exportimport.lar.PortletDataContext;
074    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
075    import com.liferay.portlet.exportimport.lar.StagedModelType;
076    
077    import java.io.Serializable;
078    
079    import java.util.List;
080    
081    import javax.sql.DataSource;
082    
083    /**
084     * Provides the base implementation for the role local service.
085     *
086     * <p>
087     * 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.RoleLocalServiceImpl}.
088     * </p>
089     *
090     * @author Brian Wing Shun Chan
091     * @see com.liferay.portal.service.impl.RoleLocalServiceImpl
092     * @see com.liferay.portal.service.RoleLocalServiceUtil
093     * @generated
094     */
095    @ProviderType
096    public abstract class RoleLocalServiceBaseImpl extends BaseLocalServiceImpl
097            implements RoleLocalService, IdentifiableBean {
098            /*
099             * NOTE FOR DEVELOPERS:
100             *
101             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.RoleLocalServiceUtil} to access the role local service.
102             */
103    
104            /**
105             * Adds the role to the database. Also notifies the appropriate model listeners.
106             *
107             * @param role the role
108             * @return the role that was added
109             */
110            @Indexable(type = IndexableType.REINDEX)
111            @Override
112            public Role addRole(Role role) {
113                    role.setNew(true);
114    
115                    return rolePersistence.update(role);
116            }
117    
118            /**
119             * Creates a new role with the primary key. Does not add the role to the database.
120             *
121             * @param roleId the primary key for the new role
122             * @return the new role
123             */
124            @Override
125            public Role createRole(long roleId) {
126                    return rolePersistence.create(roleId);
127            }
128    
129            /**
130             * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
131             *
132             * @param roleId the primary key of the role
133             * @return the role that was removed
134             * @throws PortalException if a role with the primary key could not be found
135             */
136            @Indexable(type = IndexableType.DELETE)
137            @Override
138            public Role deleteRole(long roleId) throws PortalException {
139                    return rolePersistence.remove(roleId);
140            }
141    
142            /**
143             * Deletes the role from the database. Also notifies the appropriate model listeners.
144             *
145             * @param role the role
146             * @return the role that was removed
147             * @throws PortalException
148             */
149            @Indexable(type = IndexableType.DELETE)
150            @Override
151            public Role deleteRole(Role role) throws PortalException {
152                    return rolePersistence.remove(role);
153            }
154    
155            @Override
156            public DynamicQuery dynamicQuery() {
157                    Class<?> clazz = getClass();
158    
159                    return DynamicQueryFactoryUtil.forClass(Role.class,
160                            clazz.getClassLoader());
161            }
162    
163            /**
164             * Performs a dynamic query on the database and returns the matching rows.
165             *
166             * @param dynamicQuery the dynamic query
167             * @return the matching rows
168             */
169            @Override
170            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
171                    return rolePersistence.findWithDynamicQuery(dynamicQuery);
172            }
173    
174            /**
175             * Performs a dynamic query on the database and returns a range of the matching rows.
176             *
177             * <p>
178             * 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.RoleModelImpl}. 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.
179             * </p>
180             *
181             * @param dynamicQuery the dynamic query
182             * @param start the lower bound of the range of model instances
183             * @param end the upper bound of the range of model instances (not inclusive)
184             * @return the range of matching rows
185             */
186            @Override
187            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
188                    int end) {
189                    return rolePersistence.findWithDynamicQuery(dynamicQuery, start, end);
190            }
191    
192            /**
193             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
194             *
195             * <p>
196             * 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.RoleModelImpl}. 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.
197             * </p>
198             *
199             * @param dynamicQuery the dynamic query
200             * @param start the lower bound of the range of model instances
201             * @param end the upper bound of the range of model instances (not inclusive)
202             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
203             * @return the ordered range of matching rows
204             */
205            @Override
206            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
207                    int end, OrderByComparator<T> orderByComparator) {
208                    return rolePersistence.findWithDynamicQuery(dynamicQuery, start, end,
209                            orderByComparator);
210            }
211    
212            /**
213             * Returns the number of rows matching the dynamic query.
214             *
215             * @param dynamicQuery the dynamic query
216             * @return the number of rows matching the dynamic query
217             */
218            @Override
219            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
220                    return rolePersistence.countWithDynamicQuery(dynamicQuery);
221            }
222    
223            /**
224             * Returns the number of rows matching the dynamic query.
225             *
226             * @param dynamicQuery the dynamic query
227             * @param projection the projection to apply to the query
228             * @return the number of rows matching the dynamic query
229             */
230            @Override
231            public long dynamicQueryCount(DynamicQuery dynamicQuery,
232                    Projection projection) {
233                    return rolePersistence.countWithDynamicQuery(dynamicQuery, projection);
234            }
235    
236            @Override
237            public Role fetchRole(long roleId) {
238                    return rolePersistence.fetchByPrimaryKey(roleId);
239            }
240    
241            /**
242             * Returns the role with the matching UUID and company.
243             *
244             * @param uuid the role's UUID
245             * @param companyId the primary key of the company
246             * @return the matching role, or <code>null</code> if a matching role could not be found
247             */
248            @Override
249            public Role fetchRoleByUuidAndCompanyId(String uuid, long companyId) {
250                    return rolePersistence.fetchByUuid_C_First(uuid, companyId, null);
251            }
252    
253            /**
254             * Returns the role with the primary key.
255             *
256             * @param roleId the primary key of the role
257             * @return the role
258             * @throws PortalException if a role with the primary key could not be found
259             */
260            @Override
261            public Role getRole(long roleId) throws PortalException {
262                    return rolePersistence.findByPrimaryKey(roleId);
263            }
264    
265            @Override
266            public ActionableDynamicQuery getActionableDynamicQuery() {
267                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
268    
269                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.RoleLocalServiceUtil.getService());
270                    actionableDynamicQuery.setClass(Role.class);
271                    actionableDynamicQuery.setClassLoader(getClassLoader());
272    
273                    actionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
274    
275                    return actionableDynamicQuery;
276            }
277    
278            protected void initActionableDynamicQuery(
279                    ActionableDynamicQuery actionableDynamicQuery) {
280                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.RoleLocalServiceUtil.getService());
281                    actionableDynamicQuery.setClass(Role.class);
282                    actionableDynamicQuery.setClassLoader(getClassLoader());
283    
284                    actionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
285            }
286    
287            @Override
288            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
289                    final PortletDataContext portletDataContext) {
290                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
291                                    @Override
292                                    public long performCount() throws PortalException {
293                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
294    
295                                            StagedModelType stagedModelType = getStagedModelType();
296    
297                                            long modelAdditionCount = super.performCount();
298    
299                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
300                                                    modelAdditionCount);
301    
302                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
303                                                            stagedModelType);
304    
305                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
306                                                    modelDeletionCount);
307    
308                                            return modelAdditionCount;
309                                    }
310                            };
311    
312                    initActionableDynamicQuery(exportActionableDynamicQuery);
313    
314                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
315                                    @Override
316                                    public void addCriteria(DynamicQuery dynamicQuery) {
317                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
318                                                    "modifiedDate");
319    
320                                            StagedModelType stagedModelType = exportActionableDynamicQuery.getStagedModelType();
321    
322                                            if (stagedModelType.getReferrerClassNameId() >= 0) {
323                                                    Property classNameIdProperty = PropertyFactoryUtil.forName(
324                                                                    "classNameId");
325    
326                                                    dynamicQuery.add(classNameIdProperty.eq(
327                                                                    stagedModelType.getReferrerClassNameId()));
328                                            }
329                                    }
330                            });
331    
332                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
333    
334                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
335                                    @Override
336                                    public void performAction(Object object)
337                                            throws PortalException {
338                                            Role stagedModel = (Role)object;
339    
340                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
341                                                    stagedModel);
342                                    }
343                            });
344                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
345                                    PortalUtil.getClassNameId(Role.class.getName())));
346    
347                    return exportActionableDynamicQuery;
348            }
349    
350            /**
351             * @throws PortalException
352             */
353            @Override
354            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
355                    throws PortalException {
356                    return roleLocalService.deleteRole((Role)persistedModel);
357            }
358    
359            @Override
360            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
361                    throws PortalException {
362                    return rolePersistence.findByPrimaryKey(primaryKeyObj);
363            }
364    
365            /**
366             * Returns the role with the matching UUID and company.
367             *
368             * @param uuid the role's UUID
369             * @param companyId the primary key of the company
370             * @return the matching role
371             * @throws PortalException if a matching role could not be found
372             */
373            @Override
374            public Role getRoleByUuidAndCompanyId(String uuid, long companyId)
375                    throws PortalException {
376                    return rolePersistence.findByUuid_C_First(uuid, companyId, null);
377            }
378    
379            /**
380             * Returns a range of all the roles.
381             *
382             * <p>
383             * 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.RoleModelImpl}. 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.
384             * </p>
385             *
386             * @param start the lower bound of the range of roles
387             * @param end the upper bound of the range of roles (not inclusive)
388             * @return the range of roles
389             */
390            @Override
391            public List<Role> getRoles(int start, int end) {
392                    return rolePersistence.findAll(start, end);
393            }
394    
395            /**
396             * Returns the number of roles.
397             *
398             * @return the number of roles
399             */
400            @Override
401            public int getRolesCount() {
402                    return rolePersistence.countAll();
403            }
404    
405            /**
406             * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
407             *
408             * @param role the role
409             * @return the role that was updated
410             */
411            @Indexable(type = IndexableType.REINDEX)
412            @Override
413            public Role updateRole(Role role) {
414                    return rolePersistence.update(role);
415            }
416    
417            /**
418             */
419            @Override
420            public void addGroupRole(long groupId, long roleId) {
421                    groupPersistence.addRole(groupId, roleId);
422            }
423    
424            /**
425             */
426            @Override
427            public void addGroupRole(long groupId, Role role) {
428                    groupPersistence.addRole(groupId, role);
429            }
430    
431            /**
432             */
433            @Override
434            public void addGroupRoles(long groupId, long[] roleIds) {
435                    groupPersistence.addRoles(groupId, roleIds);
436            }
437    
438            /**
439             */
440            @Override
441            public void addGroupRoles(long groupId, List<Role> Roles) {
442                    groupPersistence.addRoles(groupId, Roles);
443            }
444    
445            /**
446             */
447            @Override
448            public void clearGroupRoles(long groupId) {
449                    groupPersistence.clearRoles(groupId);
450            }
451    
452            /**
453             */
454            @Override
455            public void deleteGroupRole(long groupId, long roleId) {
456                    groupPersistence.removeRole(groupId, roleId);
457            }
458    
459            /**
460             */
461            @Override
462            public void deleteGroupRole(long groupId, Role role) {
463                    groupPersistence.removeRole(groupId, role);
464            }
465    
466            /**
467             */
468            @Override
469            public void deleteGroupRoles(long groupId, long[] roleIds) {
470                    groupPersistence.removeRoles(groupId, roleIds);
471            }
472    
473            /**
474             */
475            @Override
476            public void deleteGroupRoles(long groupId, List<Role> Roles) {
477                    groupPersistence.removeRoles(groupId, Roles);
478            }
479    
480            /**
481             * Returns the groupIds of the groups associated with the role.
482             *
483             * @param roleId the roleId of the role
484             * @return long[] the groupIds of groups associated with the role
485             */
486            @Override
487            public long[] getGroupPrimaryKeys(long roleId) {
488                    return rolePersistence.getGroupPrimaryKeys(roleId);
489            }
490    
491            /**
492             */
493            @Override
494            public List<Role> getGroupRoles(long groupId) {
495                    return groupPersistence.getRoles(groupId);
496            }
497    
498            /**
499             */
500            @Override
501            public List<Role> getGroupRoles(long groupId, int start, int end) {
502                    return groupPersistence.getRoles(groupId, start, end);
503            }
504    
505            /**
506             */
507            @Override
508            public List<Role> getGroupRoles(long groupId, int start, int end,
509                    OrderByComparator<Role> orderByComparator) {
510                    return groupPersistence.getRoles(groupId, start, end, orderByComparator);
511            }
512    
513            /**
514             */
515            @Override
516            public int getGroupRolesCount(long groupId) {
517                    return groupPersistence.getRolesSize(groupId);
518            }
519    
520            /**
521             */
522            @Override
523            public boolean hasGroupRole(long groupId, long roleId) {
524                    return groupPersistence.containsRole(groupId, roleId);
525            }
526    
527            /**
528             */
529            @Override
530            public boolean hasGroupRoles(long groupId) {
531                    return groupPersistence.containsRoles(groupId);
532            }
533    
534            /**
535             */
536            @Override
537            public void setGroupRoles(long groupId, long[] roleIds) {
538                    groupPersistence.setRoles(groupId, roleIds);
539            }
540    
541            /**
542             */
543            @Override
544            public void addUserRole(long userId, long roleId) {
545                    userPersistence.addRole(userId, roleId);
546            }
547    
548            /**
549             */
550            @Override
551            public void addUserRole(long userId, Role role) {
552                    userPersistence.addRole(userId, role);
553            }
554    
555            /**
556             * @throws PortalException
557             */
558            @Override
559            public void addUserRoles(long userId, long[] roleIds)
560                    throws PortalException {
561                    userPersistence.addRoles(userId, roleIds);
562            }
563    
564            /**
565             * @throws PortalException
566             */
567            @Override
568            public void addUserRoles(long userId, List<Role> Roles)
569                    throws PortalException {
570                    userPersistence.addRoles(userId, Roles);
571            }
572    
573            /**
574             */
575            @Override
576            public void clearUserRoles(long userId) {
577                    userPersistence.clearRoles(userId);
578            }
579    
580            /**
581             */
582            @Override
583            public void deleteUserRole(long userId, long roleId) {
584                    userPersistence.removeRole(userId, roleId);
585            }
586    
587            /**
588             */
589            @Override
590            public void deleteUserRole(long userId, Role role) {
591                    userPersistence.removeRole(userId, role);
592            }
593    
594            /**
595             */
596            @Override
597            public void deleteUserRoles(long userId, long[] roleIds) {
598                    userPersistence.removeRoles(userId, roleIds);
599            }
600    
601            /**
602             */
603            @Override
604            public void deleteUserRoles(long userId, List<Role> Roles) {
605                    userPersistence.removeRoles(userId, Roles);
606            }
607    
608            /**
609             * Returns the userIds of the users associated with the role.
610             *
611             * @param roleId the roleId of the role
612             * @return long[] the userIds of users associated with the role
613             */
614            @Override
615            public long[] getUserPrimaryKeys(long roleId) {
616                    return rolePersistence.getUserPrimaryKeys(roleId);
617            }
618    
619            /**
620             */
621            @Override
622            public List<Role> getUserRoles(long userId) {
623                    return userPersistence.getRoles(userId);
624            }
625    
626            /**
627             */
628            @Override
629            public List<Role> getUserRoles(long userId, int start, int end) {
630                    return userPersistence.getRoles(userId, start, end);
631            }
632    
633            /**
634             */
635            @Override
636            public List<Role> getUserRoles(long userId, int start, int end,
637                    OrderByComparator<Role> orderByComparator) {
638                    return userPersistence.getRoles(userId, start, end, orderByComparator);
639            }
640    
641            /**
642             */
643            @Override
644            public int getUserRolesCount(long userId) {
645                    return userPersistence.getRolesSize(userId);
646            }
647    
648            /**
649             */
650            @Override
651            public boolean hasUserRole(long userId, long roleId) {
652                    return userPersistence.containsRole(userId, roleId);
653            }
654    
655            /**
656             */
657            @Override
658            public boolean hasUserRoles(long userId) {
659                    return userPersistence.containsRoles(userId);
660            }
661    
662            /**
663             * @throws PortalException
664             */
665            @Override
666            public void setUserRoles(long userId, long[] roleIds)
667                    throws PortalException {
668                    userPersistence.setRoles(userId, roleIds);
669            }
670    
671            /**
672             * Returns the role local service.
673             *
674             * @return the role local service
675             */
676            public RoleLocalService getRoleLocalService() {
677                    return roleLocalService;
678            }
679    
680            /**
681             * Sets the role local service.
682             *
683             * @param roleLocalService the role local service
684             */
685            public void setRoleLocalService(RoleLocalService roleLocalService) {
686                    this.roleLocalService = roleLocalService;
687            }
688    
689            /**
690             * Returns the role remote service.
691             *
692             * @return the role remote service
693             */
694            public com.liferay.portal.service.RoleService getRoleService() {
695                    return roleService;
696            }
697    
698            /**
699             * Sets the role remote service.
700             *
701             * @param roleService the role remote service
702             */
703            public void setRoleService(
704                    com.liferay.portal.service.RoleService roleService) {
705                    this.roleService = roleService;
706            }
707    
708            /**
709             * Returns the role persistence.
710             *
711             * @return the role persistence
712             */
713            public RolePersistence getRolePersistence() {
714                    return rolePersistence;
715            }
716    
717            /**
718             * Sets the role persistence.
719             *
720             * @param rolePersistence the role persistence
721             */
722            public void setRolePersistence(RolePersistence rolePersistence) {
723                    this.rolePersistence = rolePersistence;
724            }
725    
726            /**
727             * Returns the role finder.
728             *
729             * @return the role finder
730             */
731            public RoleFinder getRoleFinder() {
732                    return roleFinder;
733            }
734    
735            /**
736             * Sets the role finder.
737             *
738             * @param roleFinder the role finder
739             */
740            public void setRoleFinder(RoleFinder roleFinder) {
741                    this.roleFinder = roleFinder;
742            }
743    
744            /**
745             * Returns the counter local service.
746             *
747             * @return the counter local service
748             */
749            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
750                    return counterLocalService;
751            }
752    
753            /**
754             * Sets the counter local service.
755             *
756             * @param counterLocalService the counter local service
757             */
758            public void setCounterLocalService(
759                    com.liferay.counter.service.CounterLocalService counterLocalService) {
760                    this.counterLocalService = counterLocalService;
761            }
762    
763            /**
764             * Returns the class name local service.
765             *
766             * @return the class name local service
767             */
768            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
769                    return classNameLocalService;
770            }
771    
772            /**
773             * Sets the class name local service.
774             *
775             * @param classNameLocalService the class name local service
776             */
777            public void setClassNameLocalService(
778                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
779                    this.classNameLocalService = classNameLocalService;
780            }
781    
782            /**
783             * Returns the class name remote service.
784             *
785             * @return the class name remote service
786             */
787            public com.liferay.portal.service.ClassNameService getClassNameService() {
788                    return classNameService;
789            }
790    
791            /**
792             * Sets the class name remote service.
793             *
794             * @param classNameService the class name remote service
795             */
796            public void setClassNameService(
797                    com.liferay.portal.service.ClassNameService classNameService) {
798                    this.classNameService = classNameService;
799            }
800    
801            /**
802             * Returns the class name persistence.
803             *
804             * @return the class name persistence
805             */
806            public ClassNamePersistence getClassNamePersistence() {
807                    return classNamePersistence;
808            }
809    
810            /**
811             * Sets the class name persistence.
812             *
813             * @param classNamePersistence the class name persistence
814             */
815            public void setClassNamePersistence(
816                    ClassNamePersistence classNamePersistence) {
817                    this.classNamePersistence = classNamePersistence;
818            }
819    
820            /**
821             * Returns the company local service.
822             *
823             * @return the company local service
824             */
825            public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() {
826                    return companyLocalService;
827            }
828    
829            /**
830             * Sets the company local service.
831             *
832             * @param companyLocalService the company local service
833             */
834            public void setCompanyLocalService(
835                    com.liferay.portal.service.CompanyLocalService companyLocalService) {
836                    this.companyLocalService = companyLocalService;
837            }
838    
839            /**
840             * Returns the company remote service.
841             *
842             * @return the company remote service
843             */
844            public com.liferay.portal.service.CompanyService getCompanyService() {
845                    return companyService;
846            }
847    
848            /**
849             * Sets the company remote service.
850             *
851             * @param companyService the company remote service
852             */
853            public void setCompanyService(
854                    com.liferay.portal.service.CompanyService companyService) {
855                    this.companyService = companyService;
856            }
857    
858            /**
859             * Returns the company persistence.
860             *
861             * @return the company persistence
862             */
863            public CompanyPersistence getCompanyPersistence() {
864                    return companyPersistence;
865            }
866    
867            /**
868             * Sets the company persistence.
869             *
870             * @param companyPersistence the company persistence
871             */
872            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
873                    this.companyPersistence = companyPersistence;
874            }
875    
876            /**
877             * Returns the group local service.
878             *
879             * @return the group local service
880             */
881            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
882                    return groupLocalService;
883            }
884    
885            /**
886             * Sets the group local service.
887             *
888             * @param groupLocalService the group local service
889             */
890            public void setGroupLocalService(
891                    com.liferay.portal.service.GroupLocalService groupLocalService) {
892                    this.groupLocalService = groupLocalService;
893            }
894    
895            /**
896             * Returns the group remote service.
897             *
898             * @return the group remote service
899             */
900            public com.liferay.portal.service.GroupService getGroupService() {
901                    return groupService;
902            }
903    
904            /**
905             * Sets the group remote service.
906             *
907             * @param groupService the group remote service
908             */
909            public void setGroupService(
910                    com.liferay.portal.service.GroupService groupService) {
911                    this.groupService = groupService;
912            }
913    
914            /**
915             * Returns the group persistence.
916             *
917             * @return the group persistence
918             */
919            public GroupPersistence getGroupPersistence() {
920                    return groupPersistence;
921            }
922    
923            /**
924             * Sets the group persistence.
925             *
926             * @param groupPersistence the group persistence
927             */
928            public void setGroupPersistence(GroupPersistence groupPersistence) {
929                    this.groupPersistence = groupPersistence;
930            }
931    
932            /**
933             * Returns the group finder.
934             *
935             * @return the group finder
936             */
937            public GroupFinder getGroupFinder() {
938                    return groupFinder;
939            }
940    
941            /**
942             * Sets the group finder.
943             *
944             * @param groupFinder the group finder
945             */
946            public void setGroupFinder(GroupFinder groupFinder) {
947                    this.groupFinder = groupFinder;
948            }
949    
950            /**
951             * Returns the layout local service.
952             *
953             * @return the layout local service
954             */
955            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
956                    return layoutLocalService;
957            }
958    
959            /**
960             * Sets the layout local service.
961             *
962             * @param layoutLocalService the layout local service
963             */
964            public void setLayoutLocalService(
965                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
966                    this.layoutLocalService = layoutLocalService;
967            }
968    
969            /**
970             * Returns the layout remote service.
971             *
972             * @return the layout remote service
973             */
974            public com.liferay.portal.service.LayoutService getLayoutService() {
975                    return layoutService;
976            }
977    
978            /**
979             * Sets the layout remote service.
980             *
981             * @param layoutService the layout remote service
982             */
983            public void setLayoutService(
984                    com.liferay.portal.service.LayoutService layoutService) {
985                    this.layoutService = layoutService;
986            }
987    
988            /**
989             * Returns the layout persistence.
990             *
991             * @return the layout persistence
992             */
993            public LayoutPersistence getLayoutPersistence() {
994                    return layoutPersistence;
995            }
996    
997            /**
998             * Sets the layout persistence.
999             *
1000             * @param layoutPersistence the layout persistence
1001             */
1002            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
1003                    this.layoutPersistence = layoutPersistence;
1004            }
1005    
1006            /**
1007             * Returns the layout finder.
1008             *
1009             * @return the layout finder
1010             */
1011            public LayoutFinder getLayoutFinder() {
1012                    return layoutFinder;
1013            }
1014    
1015            /**
1016             * Sets the layout finder.
1017             *
1018             * @param layoutFinder the layout finder
1019             */
1020            public void setLayoutFinder(LayoutFinder layoutFinder) {
1021                    this.layoutFinder = layoutFinder;
1022            }
1023    
1024            /**
1025             * Returns the resource local service.
1026             *
1027             * @return the resource local service
1028             */
1029            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
1030                    return resourceLocalService;
1031            }
1032    
1033            /**
1034             * Sets the resource local service.
1035             *
1036             * @param resourceLocalService the resource local service
1037             */
1038            public void setResourceLocalService(
1039                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
1040                    this.resourceLocalService = resourceLocalService;
1041            }
1042    
1043            /**
1044             * Returns the resource action local service.
1045             *
1046             * @return the resource action local service
1047             */
1048            public com.liferay.portal.service.ResourceActionLocalService getResourceActionLocalService() {
1049                    return resourceActionLocalService;
1050            }
1051    
1052            /**
1053             * Sets the resource action local service.
1054             *
1055             * @param resourceActionLocalService the resource action local service
1056             */
1057            public void setResourceActionLocalService(
1058                    com.liferay.portal.service.ResourceActionLocalService resourceActionLocalService) {
1059                    this.resourceActionLocalService = resourceActionLocalService;
1060            }
1061    
1062            /**
1063             * Returns the resource action persistence.
1064             *
1065             * @return the resource action persistence
1066             */
1067            public ResourceActionPersistence getResourceActionPersistence() {
1068                    return resourceActionPersistence;
1069            }
1070    
1071            /**
1072             * Sets the resource action persistence.
1073             *
1074             * @param resourceActionPersistence the resource action persistence
1075             */
1076            public void setResourceActionPersistence(
1077                    ResourceActionPersistence resourceActionPersistence) {
1078                    this.resourceActionPersistence = resourceActionPersistence;
1079            }
1080    
1081            /**
1082             * Returns the resource block local service.
1083             *
1084             * @return the resource block local service
1085             */
1086            public com.liferay.portal.service.ResourceBlockLocalService getResourceBlockLocalService() {
1087                    return resourceBlockLocalService;
1088            }
1089    
1090            /**
1091             * Sets the resource block local service.
1092             *
1093             * @param resourceBlockLocalService the resource block local service
1094             */
1095            public void setResourceBlockLocalService(
1096                    com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService) {
1097                    this.resourceBlockLocalService = resourceBlockLocalService;
1098            }
1099    
1100            /**
1101             * Returns the resource block remote service.
1102             *
1103             * @return the resource block remote service
1104             */
1105            public com.liferay.portal.service.ResourceBlockService getResourceBlockService() {
1106                    return resourceBlockService;
1107            }
1108    
1109            /**
1110             * Sets the resource block remote service.
1111             *
1112             * @param resourceBlockService the resource block remote service
1113             */
1114            public void setResourceBlockService(
1115                    com.liferay.portal.service.ResourceBlockService resourceBlockService) {
1116                    this.resourceBlockService = resourceBlockService;
1117            }
1118    
1119            /**
1120             * Returns the resource block persistence.
1121             *
1122             * @return the resource block persistence
1123             */
1124            public ResourceBlockPersistence getResourceBlockPersistence() {
1125                    return resourceBlockPersistence;
1126            }
1127    
1128            /**
1129             * Sets the resource block persistence.
1130             *
1131             * @param resourceBlockPersistence the resource block persistence
1132             */
1133            public void setResourceBlockPersistence(
1134                    ResourceBlockPersistence resourceBlockPersistence) {
1135                    this.resourceBlockPersistence = resourceBlockPersistence;
1136            }
1137    
1138            /**
1139             * Returns the resource block finder.
1140             *
1141             * @return the resource block finder
1142             */
1143            public ResourceBlockFinder getResourceBlockFinder() {
1144                    return resourceBlockFinder;
1145            }
1146    
1147            /**
1148             * Sets the resource block finder.
1149             *
1150             * @param resourceBlockFinder the resource block finder
1151             */
1152            public void setResourceBlockFinder(ResourceBlockFinder resourceBlockFinder) {
1153                    this.resourceBlockFinder = resourceBlockFinder;
1154            }
1155    
1156            /**
1157             * Returns the resource block permission local service.
1158             *
1159             * @return the resource block permission local service
1160             */
1161            public com.liferay.portal.service.ResourceBlockPermissionLocalService getResourceBlockPermissionLocalService() {
1162                    return resourceBlockPermissionLocalService;
1163            }
1164    
1165            /**
1166             * Sets the resource block permission local service.
1167             *
1168             * @param resourceBlockPermissionLocalService the resource block permission local service
1169             */
1170            public void setResourceBlockPermissionLocalService(
1171                    com.liferay.portal.service.ResourceBlockPermissionLocalService resourceBlockPermissionLocalService) {
1172                    this.resourceBlockPermissionLocalService = resourceBlockPermissionLocalService;
1173            }
1174    
1175            /**
1176             * Returns the resource block permission persistence.
1177             *
1178             * @return the resource block permission persistence
1179             */
1180            public ResourceBlockPermissionPersistence getResourceBlockPermissionPersistence() {
1181                    return resourceBlockPermissionPersistence;
1182            }
1183    
1184            /**
1185             * Sets the resource block permission persistence.
1186             *
1187             * @param resourceBlockPermissionPersistence the resource block permission persistence
1188             */
1189            public void setResourceBlockPermissionPersistence(
1190                    ResourceBlockPermissionPersistence resourceBlockPermissionPersistence) {
1191                    this.resourceBlockPermissionPersistence = resourceBlockPermissionPersistence;
1192            }
1193    
1194            /**
1195             * Returns the resource permission local service.
1196             *
1197             * @return the resource permission local service
1198             */
1199            public com.liferay.portal.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
1200                    return resourcePermissionLocalService;
1201            }
1202    
1203            /**
1204             * Sets the resource permission local service.
1205             *
1206             * @param resourcePermissionLocalService the resource permission local service
1207             */
1208            public void setResourcePermissionLocalService(
1209                    com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService) {
1210                    this.resourcePermissionLocalService = resourcePermissionLocalService;
1211            }
1212    
1213            /**
1214             * Returns the resource permission remote service.
1215             *
1216             * @return the resource permission remote service
1217             */
1218            public com.liferay.portal.service.ResourcePermissionService getResourcePermissionService() {
1219                    return resourcePermissionService;
1220            }
1221    
1222            /**
1223             * Sets the resource permission remote service.
1224             *
1225             * @param resourcePermissionService the resource permission remote service
1226             */
1227            public void setResourcePermissionService(
1228                    com.liferay.portal.service.ResourcePermissionService resourcePermissionService) {
1229                    this.resourcePermissionService = resourcePermissionService;
1230            }
1231    
1232            /**
1233             * Returns the resource permission persistence.
1234             *
1235             * @return the resource permission persistence
1236             */
1237            public ResourcePermissionPersistence getResourcePermissionPersistence() {
1238                    return resourcePermissionPersistence;
1239            }
1240    
1241            /**
1242             * Sets the resource permission persistence.
1243             *
1244             * @param resourcePermissionPersistence the resource permission persistence
1245             */
1246            public void setResourcePermissionPersistence(
1247                    ResourcePermissionPersistence resourcePermissionPersistence) {
1248                    this.resourcePermissionPersistence = resourcePermissionPersistence;
1249            }
1250    
1251            /**
1252             * Returns the resource permission finder.
1253             *
1254             * @return the resource permission finder
1255             */
1256            public ResourcePermissionFinder getResourcePermissionFinder() {
1257                    return resourcePermissionFinder;
1258            }
1259    
1260            /**
1261             * Sets the resource permission finder.
1262             *
1263             * @param resourcePermissionFinder the resource permission finder
1264             */
1265            public void setResourcePermissionFinder(
1266                    ResourcePermissionFinder resourcePermissionFinder) {
1267                    this.resourcePermissionFinder = resourcePermissionFinder;
1268            }
1269    
1270            /**
1271             * Returns the resource type permission local service.
1272             *
1273             * @return the resource type permission local service
1274             */
1275            public com.liferay.portal.service.ResourceTypePermissionLocalService getResourceTypePermissionLocalService() {
1276                    return resourceTypePermissionLocalService;
1277            }
1278    
1279            /**
1280             * Sets the resource type permission local service.
1281             *
1282             * @param resourceTypePermissionLocalService the resource type permission local service
1283             */
1284            public void setResourceTypePermissionLocalService(
1285                    com.liferay.portal.service.ResourceTypePermissionLocalService resourceTypePermissionLocalService) {
1286                    this.resourceTypePermissionLocalService = resourceTypePermissionLocalService;
1287            }
1288    
1289            /**
1290             * Returns the resource type permission persistence.
1291             *
1292             * @return the resource type permission persistence
1293             */
1294            public ResourceTypePermissionPersistence getResourceTypePermissionPersistence() {
1295                    return resourceTypePermissionPersistence;
1296            }
1297    
1298            /**
1299             * Sets the resource type permission persistence.
1300             *
1301             * @param resourceTypePermissionPersistence the resource type permission persistence
1302             */
1303            public void setResourceTypePermissionPersistence(
1304                    ResourceTypePermissionPersistence resourceTypePermissionPersistence) {
1305                    this.resourceTypePermissionPersistence = resourceTypePermissionPersistence;
1306            }
1307    
1308            /**
1309             * Returns the resource type permission finder.
1310             *
1311             * @return the resource type permission finder
1312             */
1313            public ResourceTypePermissionFinder getResourceTypePermissionFinder() {
1314                    return resourceTypePermissionFinder;
1315            }
1316    
1317            /**
1318             * Sets the resource type permission finder.
1319             *
1320             * @param resourceTypePermissionFinder the resource type permission finder
1321             */
1322            public void setResourceTypePermissionFinder(
1323                    ResourceTypePermissionFinder resourceTypePermissionFinder) {
1324                    this.resourceTypePermissionFinder = resourceTypePermissionFinder;
1325            }
1326    
1327            /**
1328             * Returns the expando row local service.
1329             *
1330             * @return the expando row local service
1331             */
1332            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
1333                    return expandoRowLocalService;
1334            }
1335    
1336            /**
1337             * Sets the expando row local service.
1338             *
1339             * @param expandoRowLocalService the expando row local service
1340             */
1341            public void setExpandoRowLocalService(
1342                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
1343                    this.expandoRowLocalService = expandoRowLocalService;
1344            }
1345    
1346            /**
1347             * Returns the expando row persistence.
1348             *
1349             * @return the expando row persistence
1350             */
1351            public ExpandoRowPersistence getExpandoRowPersistence() {
1352                    return expandoRowPersistence;
1353            }
1354    
1355            /**
1356             * Sets the expando row persistence.
1357             *
1358             * @param expandoRowPersistence the expando row persistence
1359             */
1360            public void setExpandoRowPersistence(
1361                    ExpandoRowPersistence expandoRowPersistence) {
1362                    this.expandoRowPersistence = expandoRowPersistence;
1363            }
1364    
1365            /**
1366             * Returns the shard local service.
1367             *
1368             * @return the shard local service
1369             */
1370            public com.liferay.portal.service.ShardLocalService getShardLocalService() {
1371                    return shardLocalService;
1372            }
1373    
1374            /**
1375             * Sets the shard local service.
1376             *
1377             * @param shardLocalService the shard local service
1378             */
1379            public void setShardLocalService(
1380                    com.liferay.portal.service.ShardLocalService shardLocalService) {
1381                    this.shardLocalService = shardLocalService;
1382            }
1383    
1384            /**
1385             * Returns the shard persistence.
1386             *
1387             * @return the shard persistence
1388             */
1389            public ShardPersistence getShardPersistence() {
1390                    return shardPersistence;
1391            }
1392    
1393            /**
1394             * Sets the shard persistence.
1395             *
1396             * @param shardPersistence the shard persistence
1397             */
1398            public void setShardPersistence(ShardPersistence shardPersistence) {
1399                    this.shardPersistence = shardPersistence;
1400            }
1401    
1402            /**
1403             * Returns the team local service.
1404             *
1405             * @return the team local service
1406             */
1407            public com.liferay.portal.service.TeamLocalService getTeamLocalService() {
1408                    return teamLocalService;
1409            }
1410    
1411            /**
1412             * Sets the team local service.
1413             *
1414             * @param teamLocalService the team local service
1415             */
1416            public void setTeamLocalService(
1417                    com.liferay.portal.service.TeamLocalService teamLocalService) {
1418                    this.teamLocalService = teamLocalService;
1419            }
1420    
1421            /**
1422             * Returns the team remote service.
1423             *
1424             * @return the team remote service
1425             */
1426            public com.liferay.portal.service.TeamService getTeamService() {
1427                    return teamService;
1428            }
1429    
1430            /**
1431             * Sets the team remote service.
1432             *
1433             * @param teamService the team remote service
1434             */
1435            public void setTeamService(
1436                    com.liferay.portal.service.TeamService teamService) {
1437                    this.teamService = teamService;
1438            }
1439    
1440            /**
1441             * Returns the team persistence.
1442             *
1443             * @return the team persistence
1444             */
1445            public TeamPersistence getTeamPersistence() {
1446                    return teamPersistence;
1447            }
1448    
1449            /**
1450             * Sets the team persistence.
1451             *
1452             * @param teamPersistence the team persistence
1453             */
1454            public void setTeamPersistence(TeamPersistence teamPersistence) {
1455                    this.teamPersistence = teamPersistence;
1456            }
1457    
1458            /**
1459             * Returns the team finder.
1460             *
1461             * @return the team finder
1462             */
1463            public TeamFinder getTeamFinder() {
1464                    return teamFinder;
1465            }
1466    
1467            /**
1468             * Sets the team finder.
1469             *
1470             * @param teamFinder the team finder
1471             */
1472            public void setTeamFinder(TeamFinder teamFinder) {
1473                    this.teamFinder = teamFinder;
1474            }
1475    
1476            /**
1477             * Returns the user local service.
1478             *
1479             * @return the user local service
1480             */
1481            public com.liferay.portal.service.UserLocalService getUserLocalService() {
1482                    return userLocalService;
1483            }
1484    
1485            /**
1486             * Sets the user local service.
1487             *
1488             * @param userLocalService the user local service
1489             */
1490            public void setUserLocalService(
1491                    com.liferay.portal.service.UserLocalService userLocalService) {
1492                    this.userLocalService = userLocalService;
1493            }
1494    
1495            /**
1496             * Returns the user remote service.
1497             *
1498             * @return the user remote service
1499             */
1500            public com.liferay.portal.service.UserService getUserService() {
1501                    return userService;
1502            }
1503    
1504            /**
1505             * Sets the user remote service.
1506             *
1507             * @param userService the user remote service
1508             */
1509            public void setUserService(
1510                    com.liferay.portal.service.UserService userService) {
1511                    this.userService = userService;
1512            }
1513    
1514            /**
1515             * Returns the user persistence.
1516             *
1517             * @return the user persistence
1518             */
1519            public UserPersistence getUserPersistence() {
1520                    return userPersistence;
1521            }
1522    
1523            /**
1524             * Sets the user persistence.
1525             *
1526             * @param userPersistence the user persistence
1527             */
1528            public void setUserPersistence(UserPersistence userPersistence) {
1529                    this.userPersistence = userPersistence;
1530            }
1531    
1532            /**
1533             * Returns the user finder.
1534             *
1535             * @return the user finder
1536             */
1537            public UserFinder getUserFinder() {
1538                    return userFinder;
1539            }
1540    
1541            /**
1542             * Sets the user finder.
1543             *
1544             * @param userFinder the user finder
1545             */
1546            public void setUserFinder(UserFinder userFinder) {
1547                    this.userFinder = userFinder;
1548            }
1549    
1550            /**
1551             * Returns the user group group role local service.
1552             *
1553             * @return the user group group role local service
1554             */
1555            public com.liferay.portal.service.UserGroupGroupRoleLocalService getUserGroupGroupRoleLocalService() {
1556                    return userGroupGroupRoleLocalService;
1557            }
1558    
1559            /**
1560             * Sets the user group group role local service.
1561             *
1562             * @param userGroupGroupRoleLocalService the user group group role local service
1563             */
1564            public void setUserGroupGroupRoleLocalService(
1565                    com.liferay.portal.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService) {
1566                    this.userGroupGroupRoleLocalService = userGroupGroupRoleLocalService;
1567            }
1568    
1569            /**
1570             * Returns the user group group role remote service.
1571             *
1572             * @return the user group group role remote service
1573             */
1574            public com.liferay.portal.service.UserGroupGroupRoleService getUserGroupGroupRoleService() {
1575                    return userGroupGroupRoleService;
1576            }
1577    
1578            /**
1579             * Sets the user group group role remote service.
1580             *
1581             * @param userGroupGroupRoleService the user group group role remote service
1582             */
1583            public void setUserGroupGroupRoleService(
1584                    com.liferay.portal.service.UserGroupGroupRoleService userGroupGroupRoleService) {
1585                    this.userGroupGroupRoleService = userGroupGroupRoleService;
1586            }
1587    
1588            /**
1589             * Returns the user group group role persistence.
1590             *
1591             * @return the user group group role persistence
1592             */
1593            public UserGroupGroupRolePersistence getUserGroupGroupRolePersistence() {
1594                    return userGroupGroupRolePersistence;
1595            }
1596    
1597            /**
1598             * Sets the user group group role persistence.
1599             *
1600             * @param userGroupGroupRolePersistence the user group group role persistence
1601             */
1602            public void setUserGroupGroupRolePersistence(
1603                    UserGroupGroupRolePersistence userGroupGroupRolePersistence) {
1604                    this.userGroupGroupRolePersistence = userGroupGroupRolePersistence;
1605            }
1606    
1607            /**
1608             * Returns the user group group role finder.
1609             *
1610             * @return the user group group role finder
1611             */
1612            public UserGroupGroupRoleFinder getUserGroupGroupRoleFinder() {
1613                    return userGroupGroupRoleFinder;
1614            }
1615    
1616            /**
1617             * Sets the user group group role finder.
1618             *
1619             * @param userGroupGroupRoleFinder the user group group role finder
1620             */
1621            public void setUserGroupGroupRoleFinder(
1622                    UserGroupGroupRoleFinder userGroupGroupRoleFinder) {
1623                    this.userGroupGroupRoleFinder = userGroupGroupRoleFinder;
1624            }
1625    
1626            /**
1627             * Returns the user group role local service.
1628             *
1629             * @return the user group role local service
1630             */
1631            public com.liferay.portal.service.UserGroupRoleLocalService getUserGroupRoleLocalService() {
1632                    return userGroupRoleLocalService;
1633            }
1634    
1635            /**
1636             * Sets the user group role local service.
1637             *
1638             * @param userGroupRoleLocalService the user group role local service
1639             */
1640            public void setUserGroupRoleLocalService(
1641                    com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService) {
1642                    this.userGroupRoleLocalService = userGroupRoleLocalService;
1643            }
1644    
1645            /**
1646             * Returns the user group role remote service.
1647             *
1648             * @return the user group role remote service
1649             */
1650            public com.liferay.portal.service.UserGroupRoleService getUserGroupRoleService() {
1651                    return userGroupRoleService;
1652            }
1653    
1654            /**
1655             * Sets the user group role remote service.
1656             *
1657             * @param userGroupRoleService the user group role remote service
1658             */
1659            public void setUserGroupRoleService(
1660                    com.liferay.portal.service.UserGroupRoleService userGroupRoleService) {
1661                    this.userGroupRoleService = userGroupRoleService;
1662            }
1663    
1664            /**
1665             * Returns the user group role persistence.
1666             *
1667             * @return the user group role persistence
1668             */
1669            public UserGroupRolePersistence getUserGroupRolePersistence() {
1670                    return userGroupRolePersistence;
1671            }
1672    
1673            /**
1674             * Sets the user group role persistence.
1675             *
1676             * @param userGroupRolePersistence the user group role persistence
1677             */
1678            public void setUserGroupRolePersistence(
1679                    UserGroupRolePersistence userGroupRolePersistence) {
1680                    this.userGroupRolePersistence = userGroupRolePersistence;
1681            }
1682    
1683            /**
1684             * Returns the user group role finder.
1685             *
1686             * @return the user group role finder
1687             */
1688            public UserGroupRoleFinder getUserGroupRoleFinder() {
1689                    return userGroupRoleFinder;
1690            }
1691    
1692            /**
1693             * Sets the user group role finder.
1694             *
1695             * @param userGroupRoleFinder the user group role finder
1696             */
1697            public void setUserGroupRoleFinder(UserGroupRoleFinder userGroupRoleFinder) {
1698                    this.userGroupRoleFinder = userGroupRoleFinder;
1699            }
1700    
1701            public void afterPropertiesSet() {
1702                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.Role",
1703                            roleLocalService);
1704            }
1705    
1706            public void destroy() {
1707                    persistedModelLocalServiceRegistry.unregister(
1708                            "com.liferay.portal.model.Role");
1709            }
1710    
1711            /**
1712             * Returns the Spring bean ID for this bean.
1713             *
1714             * @return the Spring bean ID for this bean
1715             */
1716            @Override
1717            public String getBeanIdentifier() {
1718                    return _beanIdentifier;
1719            }
1720    
1721            /**
1722             * Sets the Spring bean ID for this bean.
1723             *
1724             * @param beanIdentifier the Spring bean ID for this bean
1725             */
1726            @Override
1727            public void setBeanIdentifier(String beanIdentifier) {
1728                    _beanIdentifier = beanIdentifier;
1729            }
1730    
1731            protected Class<?> getModelClass() {
1732                    return Role.class;
1733            }
1734    
1735            protected String getModelClassName() {
1736                    return Role.class.getName();
1737            }
1738    
1739            /**
1740             * Performs a SQL query.
1741             *
1742             * @param sql the sql query
1743             */
1744            protected void runSQL(String sql) {
1745                    try {
1746                            DataSource dataSource = rolePersistence.getDataSource();
1747    
1748                            DB db = DBFactoryUtil.getDB();
1749    
1750                            sql = db.buildSQL(sql);
1751                            sql = PortalUtil.transformSQL(sql);
1752    
1753                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1754                                            sql, new int[0]);
1755    
1756                            sqlUpdate.update();
1757                    }
1758                    catch (Exception e) {
1759                            throw new SystemException(e);
1760                    }
1761            }
1762    
1763            @BeanReference(type = RoleLocalService.class)
1764            protected RoleLocalService roleLocalService;
1765            @BeanReference(type = com.liferay.portal.service.RoleService.class)
1766            protected com.liferay.portal.service.RoleService roleService;
1767            @BeanReference(type = RolePersistence.class)
1768            protected RolePersistence rolePersistence;
1769            @BeanReference(type = RoleFinder.class)
1770            protected RoleFinder roleFinder;
1771            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1772            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1773            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1774            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1775            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
1776            protected com.liferay.portal.service.ClassNameService classNameService;
1777            @BeanReference(type = ClassNamePersistence.class)
1778            protected ClassNamePersistence classNamePersistence;
1779            @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class)
1780            protected com.liferay.portal.service.CompanyLocalService companyLocalService;
1781            @BeanReference(type = com.liferay.portal.service.CompanyService.class)
1782            protected com.liferay.portal.service.CompanyService companyService;
1783            @BeanReference(type = CompanyPersistence.class)
1784            protected CompanyPersistence companyPersistence;
1785            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1786            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1787            @BeanReference(type = com.liferay.portal.service.GroupService.class)
1788            protected com.liferay.portal.service.GroupService groupService;
1789            @BeanReference(type = GroupPersistence.class)
1790            protected GroupPersistence groupPersistence;
1791            @BeanReference(type = GroupFinder.class)
1792            protected GroupFinder groupFinder;
1793            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
1794            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
1795            @BeanReference(type = com.liferay.portal.service.LayoutService.class)
1796            protected com.liferay.portal.service.LayoutService layoutService;
1797            @BeanReference(type = LayoutPersistence.class)
1798            protected LayoutPersistence layoutPersistence;
1799            @BeanReference(type = LayoutFinder.class)
1800            protected LayoutFinder layoutFinder;
1801            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1802            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1803            @BeanReference(type = com.liferay.portal.service.ResourceActionLocalService.class)
1804            protected com.liferay.portal.service.ResourceActionLocalService resourceActionLocalService;
1805            @BeanReference(type = ResourceActionPersistence.class)
1806            protected ResourceActionPersistence resourceActionPersistence;
1807            @BeanReference(type = com.liferay.portal.service.ResourceBlockLocalService.class)
1808            protected com.liferay.portal.service.ResourceBlockLocalService resourceBlockLocalService;
1809            @BeanReference(type = com.liferay.portal.service.ResourceBlockService.class)
1810            protected com.liferay.portal.service.ResourceBlockService resourceBlockService;
1811            @BeanReference(type = ResourceBlockPersistence.class)
1812            protected ResourceBlockPersistence resourceBlockPersistence;
1813            @BeanReference(type = ResourceBlockFinder.class)
1814            protected ResourceBlockFinder resourceBlockFinder;
1815            @BeanReference(type = com.liferay.portal.service.ResourceBlockPermissionLocalService.class)
1816            protected com.liferay.portal.service.ResourceBlockPermissionLocalService resourceBlockPermissionLocalService;
1817            @BeanReference(type = ResourceBlockPermissionPersistence.class)
1818            protected ResourceBlockPermissionPersistence resourceBlockPermissionPersistence;
1819            @BeanReference(type = com.liferay.portal.service.ResourcePermissionLocalService.class)
1820            protected com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService;
1821            @BeanReference(type = com.liferay.portal.service.ResourcePermissionService.class)
1822            protected com.liferay.portal.service.ResourcePermissionService resourcePermissionService;
1823            @BeanReference(type = ResourcePermissionPersistence.class)
1824            protected ResourcePermissionPersistence resourcePermissionPersistence;
1825            @BeanReference(type = ResourcePermissionFinder.class)
1826            protected ResourcePermissionFinder resourcePermissionFinder;
1827            @BeanReference(type = com.liferay.portal.service.ResourceTypePermissionLocalService.class)
1828            protected com.liferay.portal.service.ResourceTypePermissionLocalService resourceTypePermissionLocalService;
1829            @BeanReference(type = ResourceTypePermissionPersistence.class)
1830            protected ResourceTypePermissionPersistence resourceTypePermissionPersistence;
1831            @BeanReference(type = ResourceTypePermissionFinder.class)
1832            protected ResourceTypePermissionFinder resourceTypePermissionFinder;
1833            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
1834            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
1835            @BeanReference(type = ExpandoRowPersistence.class)
1836            protected ExpandoRowPersistence expandoRowPersistence;
1837            @BeanReference(type = com.liferay.portal.service.ShardLocalService.class)
1838            protected com.liferay.portal.service.ShardLocalService shardLocalService;
1839            @BeanReference(type = ShardPersistence.class)
1840            protected ShardPersistence shardPersistence;
1841            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
1842            protected com.liferay.portal.service.TeamLocalService teamLocalService;
1843            @BeanReference(type = com.liferay.portal.service.TeamService.class)
1844            protected com.liferay.portal.service.TeamService teamService;
1845            @BeanReference(type = TeamPersistence.class)
1846            protected TeamPersistence teamPersistence;
1847            @BeanReference(type = TeamFinder.class)
1848            protected TeamFinder teamFinder;
1849            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1850            protected com.liferay.portal.service.UserLocalService userLocalService;
1851            @BeanReference(type = com.liferay.portal.service.UserService.class)
1852            protected com.liferay.portal.service.UserService userService;
1853            @BeanReference(type = UserPersistence.class)
1854            protected UserPersistence userPersistence;
1855            @BeanReference(type = UserFinder.class)
1856            protected UserFinder userFinder;
1857            @BeanReference(type = com.liferay.portal.service.UserGroupGroupRoleLocalService.class)
1858            protected com.liferay.portal.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService;
1859            @BeanReference(type = com.liferay.portal.service.UserGroupGroupRoleService.class)
1860            protected com.liferay.portal.service.UserGroupGroupRoleService userGroupGroupRoleService;
1861            @BeanReference(type = UserGroupGroupRolePersistence.class)
1862            protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1863            @BeanReference(type = UserGroupGroupRoleFinder.class)
1864            protected UserGroupGroupRoleFinder userGroupGroupRoleFinder;
1865            @BeanReference(type = com.liferay.portal.service.UserGroupRoleLocalService.class)
1866            protected com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService;
1867            @BeanReference(type = com.liferay.portal.service.UserGroupRoleService.class)
1868            protected com.liferay.portal.service.UserGroupRoleService userGroupRoleService;
1869            @BeanReference(type = UserGroupRolePersistence.class)
1870            protected UserGroupRolePersistence userGroupRolePersistence;
1871            @BeanReference(type = UserGroupRoleFinder.class)
1872            protected UserGroupRoleFinder userGroupRoleFinder;
1873            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1874            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1875            private String _beanIdentifier;
1876    }