/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.service.base;
import aQute.bnd.annotation.ProviderType;
import com.liferay.expando.kernel.service.persistence.ExpandoRowPersistence;
import com.liferay.exportimport.kernel.lar.ExportImportHelperUtil;
import com.liferay.exportimport.kernel.lar.ManifestSummary;
import com.liferay.exportimport.kernel.lar.PortletDataContext;
import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil;
import com.liferay.exportimport.kernel.lar.StagedModelType;
import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.dao.db.DB;
import com.liferay.portal.kernel.dao.db.DBManagerUtil;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.Projection;
import com.liferay.portal.kernel.dao.orm.Property;
import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.model.PersistedModel;
import com.liferay.portal.kernel.model.Role;
import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
import com.liferay.portal.kernel.search.Indexable;
import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.service.BaseLocalServiceImpl;
import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry;
import com.liferay.portal.kernel.service.RoleLocalService;
import com.liferay.portal.kernel.service.persistence.ClassNamePersistence;
import com.liferay.portal.kernel.service.persistence.CompanyPersistence;
import com.liferay.portal.kernel.service.persistence.GroupFinder;
import com.liferay.portal.kernel.service.persistence.GroupPersistence;
import com.liferay.portal.kernel.service.persistence.LayoutFinder;
import com.liferay.portal.kernel.service.persistence.LayoutPersistence;
import com.liferay.portal.kernel.service.persistence.ResourceActionPersistence;
import com.liferay.portal.kernel.service.persistence.ResourceBlockFinder;
import com.liferay.portal.kernel.service.persistence.ResourceBlockPermissionPersistence;
import com.liferay.portal.kernel.service.persistence.ResourceBlockPersistence;
import com.liferay.portal.kernel.service.persistence.ResourcePermissionFinder;
import com.liferay.portal.kernel.service.persistence.ResourcePermissionPersistence;
import com.liferay.portal.kernel.service.persistence.ResourceTypePermissionFinder;
import com.liferay.portal.kernel.service.persistence.ResourceTypePermissionPersistence;
import com.liferay.portal.kernel.service.persistence.RoleFinder;
import com.liferay.portal.kernel.service.persistence.RolePersistence;
import com.liferay.portal.kernel.service.persistence.TeamFinder;
import com.liferay.portal.kernel.service.persistence.TeamPersistence;
import com.liferay.portal.kernel.service.persistence.UserFinder;
import com.liferay.portal.kernel.service.persistence.UserGroupGroupRoleFinder;
import com.liferay.portal.kernel.service.persistence.UserGroupGroupRolePersistence;
import com.liferay.portal.kernel.service.persistence.UserGroupRoleFinder;
import com.liferay.portal.kernel.service.persistence.UserGroupRolePersistence;
import com.liferay.portal.kernel.service.persistence.UserPersistence;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.PortalUtil;
import java.io.Serializable;
import java.util.List;
import javax.sql.DataSource;
/**
* Provides the base implementation for the role local service.
*
* <p>
* 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}.
* </p>
*
* @author Brian Wing Shun Chan
* @see com.liferay.portal.service.impl.RoleLocalServiceImpl
* @see com.liferay.portal.kernel.service.RoleLocalServiceUtil
* @generated
*/
@ProviderType
public abstract class RoleLocalServiceBaseImpl extends BaseLocalServiceImpl
implements RoleLocalService, IdentifiableOSGiService {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this class directly. Always use {@link com.liferay.portal.kernel.service.RoleLocalServiceUtil} to access the role local service.
*/
/**
* Adds the role to the database. Also notifies the appropriate model listeners.
*
* @param role the role
* @return the role that was added
*/
@Indexable(type = IndexableType.REINDEX)
@Override
public Role addRole(Role role) {
role.setNew(true);
return rolePersistence.update(role);
}
/**
* Creates a new role with the primary key. Does not add the role to the database.
*
* @param roleId the primary key for the new role
* @return the new role
*/
@Override
public Role createRole(long roleId) {
return rolePersistence.create(roleId);
}
/**
* Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param roleId the primary key of the role
* @return the role that was removed
* @throws PortalException if a role with the primary key could not be found
*/
@Indexable(type = IndexableType.DELETE)
@Override
public Role deleteRole(long roleId) throws PortalException {
return rolePersistence.remove(roleId);
}
/**
* Deletes the role from the database. Also notifies the appropriate model listeners.
*
* @param role the role
* @return the role that was removed
* @throws PortalException
*/
@Indexable(type = IndexableType.DELETE)
@Override
public Role deleteRole(Role role) throws PortalException {
return rolePersistence.remove(role);
}
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(Role.class,
clazz.getClassLoader());
}
/**
* Performs a dynamic query on the database and returns the matching rows.
*
* @param dynamicQuery the dynamic query
* @return the matching rows
*/
@Override
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
return rolePersistence.findWithDynamicQuery(dynamicQuery);
}
/**
* Performs a dynamic query on the database and returns a range of the matching rows.
*
* <p>
* 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.
* </p>
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @return the range of matching rows
*/
@Override
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
int end) {
return rolePersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
/**
* Performs a dynamic query on the database and returns an ordered range of the matching rows.
*
* <p>
* 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.
* </p>
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching rows
*/
@Override
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
int end, OrderByComparator<T> orderByComparator) {
return rolePersistence.findWithDynamicQuery(dynamicQuery, start, end,
orderByComparator);
}
/**
* Returns the number of rows matching the dynamic query.
*
* @param dynamicQuery the dynamic query
* @return the number of rows matching the dynamic query
*/
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery) {
return rolePersistence.countWithDynamicQuery(dynamicQuery);
}
/**
* Returns the number of rows matching the dynamic query.
*
* @param dynamicQuery the dynamic query
* @param projection the projection to apply to the query
* @return the number of rows matching the dynamic query
*/
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection) {
return rolePersistence.countWithDynamicQuery(dynamicQuery, projection);
}
@Override
public Role fetchRole(long roleId) {
return rolePersistence.fetchByPrimaryKey(roleId);
}
/**
* Returns the role with the matching UUID and company.
*
* @param uuid the role's UUID
* @param companyId the primary key of the company
* @return the matching role, or <code>null</code> if a matching role could not be found
*/
@Override
public Role fetchRoleByUuidAndCompanyId(String uuid, long companyId) {
return rolePersistence.fetchByUuid_C_First(uuid, companyId, null);
}
/**
* Returns the role with the primary key.
*
* @param roleId the primary key of the role
* @return the role
* @throws PortalException if a role with the primary key could not be found
*/
@Override
public Role getRole(long roleId) throws PortalException {
return rolePersistence.findByPrimaryKey(roleId);
}
@Override
public ActionableDynamicQuery getActionableDynamicQuery() {
ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
actionableDynamicQuery.setBaseLocalService(roleLocalService);
actionableDynamicQuery.setClassLoader(getClassLoader());
actionableDynamicQuery.setModelClass(Role.class);
actionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
return actionableDynamicQuery;
}
@Override
public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
indexableActionableDynamicQuery.setBaseLocalService(roleLocalService);
indexableActionableDynamicQuery.setClassLoader(getClassLoader());
indexableActionableDynamicQuery.setModelClass(Role.class);
indexableActionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
return indexableActionableDynamicQuery;
}
protected void initActionableDynamicQuery(
ActionableDynamicQuery actionableDynamicQuery) {
actionableDynamicQuery.setBaseLocalService(roleLocalService);
actionableDynamicQuery.setClassLoader(getClassLoader());
actionableDynamicQuery.setModelClass(Role.class);
actionableDynamicQuery.setPrimaryKeyPropertyName("roleId");
}
@Override
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
final PortletDataContext portletDataContext) {
final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
@Override
public long performCount() throws PortalException {
ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
StagedModelType stagedModelType = getStagedModelType();
long modelAdditionCount = super.performCount();
manifestSummary.addModelAdditionCount(stagedModelType,
modelAdditionCount);
long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
stagedModelType);
manifestSummary.addModelDeletionCount(stagedModelType,
modelDeletionCount);
return modelAdditionCount;
}
};
initActionableDynamicQuery(exportActionableDynamicQuery);
exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
@Override
public void addCriteria(DynamicQuery dynamicQuery) {
portletDataContext.addDateRangeCriteria(dynamicQuery,
"modifiedDate");
StagedModelType stagedModelType = exportActionableDynamicQuery.getStagedModelType();
long referrerClassNameId = stagedModelType.getReferrerClassNameId();
Property classNameIdProperty = PropertyFactoryUtil.forName(
"classNameId");
if ((referrerClassNameId != StagedModelType.REFERRER_CLASS_NAME_ID_ALL) &&
(referrerClassNameId != StagedModelType.REFERRER_CLASS_NAME_ID_ANY)) {
dynamicQuery.add(classNameIdProperty.eq(
stagedModelType.getReferrerClassNameId()));
}
else if (referrerClassNameId == StagedModelType.REFERRER_CLASS_NAME_ID_ANY) {
dynamicQuery.add(classNameIdProperty.isNotNull());
}
}
});
exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Role>() {
@Override
public void performAction(Role role) throws PortalException {
StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
role);
}
});
exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
PortalUtil.getClassNameId(Role.class.getName()),
StagedModelType.REFERRER_CLASS_NAME_ID_ALL));
return exportActionableDynamicQuery;
}
/**
* @throws PortalException
*/
@Override
public PersistedModel deletePersistedModel(PersistedModel persistedModel)
throws PortalException {
return roleLocalService.deleteRole((Role)persistedModel);
}
@Override
public PersistedModel getPersistedModel(Serializable primaryKeyObj)
throws PortalException {
return rolePersistence.findByPrimaryKey(primaryKeyObj);
}
/**
* Returns the role with the matching UUID and company.
*
* @param uuid the role's UUID
* @param companyId the primary key of the company
* @return the matching role
* @throws PortalException if a matching role could not be found
*/
@Override
public Role getRoleByUuidAndCompanyId(String uuid, long companyId)
throws PortalException {
return rolePersistence.findByUuid_C_First(uuid, companyId, null);
}
/**
* Returns a range of all the roles.
*
* <p>
* 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.
* </p>
*
* @param start the lower bound of the range of roles
* @param end the upper bound of the range of roles (not inclusive)
* @return the range of roles
*/
@Override
public List<Role> getRoles(int start, int end) {
return rolePersistence.findAll(start, end);
}
/**
* Returns the number of roles.
*
* @return the number of roles
*/
@Override
public int getRolesCount() {
return rolePersistence.countAll();
}
/**
* Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
*
* @param role the role
* @return the role that was updated
*/
@Indexable(type = IndexableType.REINDEX)
@Override
public Role updateRole(Role role) {
return rolePersistence.update(role);
}
/**
*/
@Override
public void addGroupRole(long groupId, long roleId) {
groupPersistence.addRole(groupId, roleId);
}
/**
*/
@Override
public void addGroupRole(long groupId, Role role) {
groupPersistence.addRole(groupId, role);
}
/**
*/
@Override
public void addGroupRoles(long groupId, long[] roleIds) {
groupPersistence.addRoles(groupId, roleIds);
}
/**
*/
@Override
public void addGroupRoles(long groupId, List<Role> roles) {
groupPersistence.addRoles(groupId, roles);
}
/**
*/
@Override
public void clearGroupRoles(long groupId) {
groupPersistence.clearRoles(groupId);
}
/**
*/
@Override
public void deleteGroupRole(long groupId, long roleId) {
groupPersistence.removeRole(groupId, roleId);
}
/**
*/
@Override
public void deleteGroupRole(long groupId, Role role) {
groupPersistence.removeRole(groupId, role);
}
/**
*/
@Override
public void deleteGroupRoles(long groupId, long[] roleIds) {
groupPersistence.removeRoles(groupId, roleIds);
}
/**
*/
@Override
public void deleteGroupRoles(long groupId, List<Role> roles) {
groupPersistence.removeRoles(groupId, roles);
}
/**
* Returns the groupIds of the groups associated with the role.
*
* @param roleId the roleId of the role
* @return long[] the groupIds of groups associated with the role
*/
@Override
public long[] getGroupPrimaryKeys(long roleId) {
return rolePersistence.getGroupPrimaryKeys(roleId);
}
/**
*/
@Override
public List<Role> getGroupRoles(long groupId) {
return groupPersistence.getRoles(groupId);
}
/**
*/
@Override
public List<Role> getGroupRoles(long groupId, int start, int end) {
return groupPersistence.getRoles(groupId, start, end);
}
/**
*/
@Override
public List<Role> getGroupRoles(long groupId, int start, int end,
OrderByComparator<Role> orderByComparator) {
return groupPersistence.getRoles(groupId, start, end, orderByComparator);
}
/**
*/
@Override
public int getGroupRolesCount(long groupId) {
return groupPersistence.getRolesSize(groupId);
}
/**
*/
@Override
public boolean hasGroupRole(long groupId, long roleId) {
return groupPersistence.containsRole(groupId, roleId);
}
/**
*/
@Override
public boolean hasGroupRoles(long groupId) {
return groupPersistence.containsRoles(groupId);
}
/**
*/
@Override
public void setGroupRoles(long groupId, long[] roleIds) {
groupPersistence.setRoles(groupId, roleIds);
}
/**
* @throws PortalException
*/
@Override
public void addUserRole(long userId, long roleId) throws PortalException {
userPersistence.addRole(userId, roleId);
}
/**
* @throws PortalException
*/
@Override
public void addUserRole(long userId, Role role) throws PortalException {
userPersistence.addRole(userId, role);
}
/**
* @throws PortalException
*/
@Override
public void addUserRoles(long userId, long[] roleIds)
throws PortalException {
userPersistence.addRoles(userId, roleIds);
}
/**
* @throws PortalException
*/
@Override
public void addUserRoles(long userId, List<Role> roles)
throws PortalException {
userPersistence.addRoles(userId, roles);
}
/**
* @throws PortalException
*/
@Override
public void clearUserRoles(long userId) throws PortalException {
userPersistence.clearRoles(userId);
}
/**
* @throws PortalException
*/
@Override
public void deleteUserRole(long userId, long roleId)
throws PortalException {
userPersistence.removeRole(userId, roleId);
}
/**
* @throws PortalException
*/
@Override
public void deleteUserRole(long userId, Role role)
throws PortalException {
userPersistence.removeRole(userId, role);
}
/**
* @throws PortalException
*/
@Override
public void deleteUserRoles(long userId, long[] roleIds)
throws PortalException {
userPersistence.removeRoles(userId, roleIds);
}
/**
* @throws PortalException
*/
@Override
public void deleteUserRoles(long userId, List<Role> roles)
throws PortalException {
userPersistence.removeRoles(userId, roles);
}
/**
* Returns the userIds of the users associated with the role.
*
* @param roleId the roleId of the role
* @return long[] the userIds of users associated with the role
*/
@Override
public long[] getUserPrimaryKeys(long roleId) {
return rolePersistence.getUserPrimaryKeys(roleId);
}
/**
*/
@Override
public List<Role> getUserRoles(long userId) {
return userPersistence.getRoles(userId);
}
/**
*/
@Override
public List<Role> getUserRoles(long userId, int start, int end) {
return userPersistence.getRoles(userId, start, end);
}
/**
*/
@Override
public List<Role> getUserRoles(long userId, int start, int end,
OrderByComparator<Role> orderByComparator) {
return userPersistence.getRoles(userId, start, end, orderByComparator);
}
/**
*/
@Override
public int getUserRolesCount(long userId) {
return userPersistence.getRolesSize(userId);
}
/**
*/
@Override
public boolean hasUserRole(long userId, long roleId) {
return userPersistence.containsRole(userId, roleId);
}
/**
*/
@Override
public boolean hasUserRoles(long userId) {
return userPersistence.containsRoles(userId);
}
/**
* @throws PortalException
*/
@Override
public void setUserRoles(long userId, long[] roleIds)
throws PortalException {
userPersistence.setRoles(userId, roleIds);
}
/**
* Returns the role local service.
*
* @return the role local service
*/
public RoleLocalService getRoleLocalService() {
return roleLocalService;
}
/**
* Sets the role local service.
*
* @param roleLocalService the role local service
*/
public void setRoleLocalService(RoleLocalService roleLocalService) {
this.roleLocalService = roleLocalService;
}
/**
* Returns the role persistence.
*
* @return the role persistence
*/
public RolePersistence getRolePersistence() {
return rolePersistence;
}
/**
* Sets the role persistence.
*
* @param rolePersistence the role persistence
*/
public void setRolePersistence(RolePersistence rolePersistence) {
this.rolePersistence = rolePersistence;
}
/**
* Returns the role finder.
*
* @return the role finder
*/
public RoleFinder getRoleFinder() {
return roleFinder;
}
/**
* Sets the role finder.
*
* @param roleFinder the role finder
*/
public void setRoleFinder(RoleFinder roleFinder) {
this.roleFinder = roleFinder;
}
/**
* Returns the counter local service.
*
* @return the counter local service
*/
public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
return counterLocalService;
}
/**
* Sets the counter local service.
*
* @param counterLocalService the counter local service
*/
public void setCounterLocalService(
com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
this.counterLocalService = counterLocalService;
}
/**
* Returns the class name local service.
*
* @return the class name local service
*/
public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() {
return classNameLocalService;
}
/**
* Sets the class name local service.
*
* @param classNameLocalService the class name local service
*/
public void setClassNameLocalService(
com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) {
this.classNameLocalService = classNameLocalService;
}
/**
* Returns the class name persistence.
*
* @return the class name persistence
*/
public ClassNamePersistence getClassNamePersistence() {
return classNamePersistence;
}
/**
* Sets the class name persistence.
*
* @param classNamePersistence the class name persistence
*/
public void setClassNamePersistence(
ClassNamePersistence classNamePersistence) {
this.classNamePersistence = classNamePersistence;
}
/**
* Returns the company local service.
*
* @return the company local service
*/
public com.liferay.portal.kernel.service.CompanyLocalService getCompanyLocalService() {
return companyLocalService;
}
/**
* Sets the company local service.
*
* @param companyLocalService the company local service
*/
public void setCompanyLocalService(
com.liferay.portal.kernel.service.CompanyLocalService companyLocalService) {
this.companyLocalService = companyLocalService;
}
/**
* Returns the company persistence.
*
* @return the company persistence
*/
public CompanyPersistence getCompanyPersistence() {
return companyPersistence;
}
/**
* Sets the company persistence.
*
* @param companyPersistence the company persistence
*/
public void setCompanyPersistence(CompanyPersistence companyPersistence) {
this.companyPersistence = companyPersistence;
}
/**
* Returns the group local service.
*
* @return the group local service
*/
public com.liferay.portal.kernel.service.GroupLocalService getGroupLocalService() {
return groupLocalService;
}
/**
* Sets the group local service.
*
* @param groupLocalService the group local service
*/
public void setGroupLocalService(
com.liferay.portal.kernel.service.GroupLocalService groupLocalService) {
this.groupLocalService = groupLocalService;
}
/**
* Returns the group persistence.
*
* @return the group persistence
*/
public GroupPersistence getGroupPersistence() {
return groupPersistence;
}
/**
* Sets the group persistence.
*
* @param groupPersistence the group persistence
*/
public void setGroupPersistence(GroupPersistence groupPersistence) {
this.groupPersistence = groupPersistence;
}
/**
* Returns the group finder.
*
* @return the group finder
*/
public GroupFinder getGroupFinder() {
return groupFinder;
}
/**
* Sets the group finder.
*
* @param groupFinder the group finder
*/
public void setGroupFinder(GroupFinder groupFinder) {
this.groupFinder = groupFinder;
}
/**
* Returns the layout local service.
*
* @return the layout local service
*/
public com.liferay.portal.kernel.service.LayoutLocalService getLayoutLocalService() {
return layoutLocalService;
}
/**
* Sets the layout local service.
*
* @param layoutLocalService the layout local service
*/
public void setLayoutLocalService(
com.liferay.portal.kernel.service.LayoutLocalService layoutLocalService) {
this.layoutLocalService = layoutLocalService;
}
/**
* Returns the layout persistence.
*
* @return the layout persistence
*/
public LayoutPersistence getLayoutPersistence() {
return layoutPersistence;
}
/**
* Sets the layout persistence.
*
* @param layoutPersistence the layout persistence
*/
public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
this.layoutPersistence = layoutPersistence;
}
/**
* Returns the layout finder.
*
* @return the layout finder
*/
public LayoutFinder getLayoutFinder() {
return layoutFinder;
}
/**
* Sets the layout finder.
*
* @param layoutFinder the layout finder
*/
public void setLayoutFinder(LayoutFinder layoutFinder) {
this.layoutFinder = layoutFinder;
}
/**
* Returns the resource local service.
*
* @return the resource local service
*/
public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() {
return resourceLocalService;
}
/**
* Sets the resource local service.
*
* @param resourceLocalService the resource local service
*/
public void setResourceLocalService(
com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) {
this.resourceLocalService = resourceLocalService;
}
/**
* Returns the resource action local service.
*
* @return the resource action local service
*/
public com.liferay.portal.kernel.service.ResourceActionLocalService getResourceActionLocalService() {
return resourceActionLocalService;
}
/**
* Sets the resource action local service.
*
* @param resourceActionLocalService the resource action local service
*/
public void setResourceActionLocalService(
com.liferay.portal.kernel.service.ResourceActionLocalService resourceActionLocalService) {
this.resourceActionLocalService = resourceActionLocalService;
}
/**
* Returns the resource action persistence.
*
* @return the resource action persistence
*/
public ResourceActionPersistence getResourceActionPersistence() {
return resourceActionPersistence;
}
/**
* Sets the resource action persistence.
*
* @param resourceActionPersistence the resource action persistence
*/
public void setResourceActionPersistence(
ResourceActionPersistence resourceActionPersistence) {
this.resourceActionPersistence = resourceActionPersistence;
}
/**
* Returns the resource block local service.
*
* @return the resource block local service
*/
public com.liferay.portal.kernel.service.ResourceBlockLocalService getResourceBlockLocalService() {
return resourceBlockLocalService;
}
/**
* Sets the resource block local service.
*
* @param resourceBlockLocalService the resource block local service
*/
public void setResourceBlockLocalService(
com.liferay.portal.kernel.service.ResourceBlockLocalService resourceBlockLocalService) {
this.resourceBlockLocalService = resourceBlockLocalService;
}
/**
* Returns the resource block persistence.
*
* @return the resource block persistence
*/
public ResourceBlockPersistence getResourceBlockPersistence() {
return resourceBlockPersistence;
}
/**
* Sets the resource block persistence.
*
* @param resourceBlockPersistence the resource block persistence
*/
public void setResourceBlockPersistence(
ResourceBlockPersistence resourceBlockPersistence) {
this.resourceBlockPersistence = resourceBlockPersistence;
}
/**
* Returns the resource block finder.
*
* @return the resource block finder
*/
public ResourceBlockFinder getResourceBlockFinder() {
return resourceBlockFinder;
}
/**
* Sets the resource block finder.
*
* @param resourceBlockFinder the resource block finder
*/
public void setResourceBlockFinder(ResourceBlockFinder resourceBlockFinder) {
this.resourceBlockFinder = resourceBlockFinder;
}
/**
* Returns the resource block permission local service.
*
* @return the resource block permission local service
*/
public com.liferay.portal.kernel.service.ResourceBlockPermissionLocalService getResourceBlockPermissionLocalService() {
return resourceBlockPermissionLocalService;
}
/**
* Sets the resource block permission local service.
*
* @param resourceBlockPermissionLocalService the resource block permission local service
*/
public void setResourceBlockPermissionLocalService(
com.liferay.portal.kernel.service.ResourceBlockPermissionLocalService resourceBlockPermissionLocalService) {
this.resourceBlockPermissionLocalService = resourceBlockPermissionLocalService;
}
/**
* Returns the resource block permission persistence.
*
* @return the resource block permission persistence
*/
public ResourceBlockPermissionPersistence getResourceBlockPermissionPersistence() {
return resourceBlockPermissionPersistence;
}
/**
* Sets the resource block permission persistence.
*
* @param resourceBlockPermissionPersistence the resource block permission persistence
*/
public void setResourceBlockPermissionPersistence(
ResourceBlockPermissionPersistence resourceBlockPermissionPersistence) {
this.resourceBlockPermissionPersistence = resourceBlockPermissionPersistence;
}
/**
* Returns the resource permission local service.
*
* @return the resource permission local service
*/
public com.liferay.portal.kernel.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
return resourcePermissionLocalService;
}
/**
* Sets the resource permission local service.
*
* @param resourcePermissionLocalService the resource permission local service
*/
public void setResourcePermissionLocalService(
com.liferay.portal.kernel.service.ResourcePermissionLocalService resourcePermissionLocalService) {
this.resourcePermissionLocalService = resourcePermissionLocalService;
}
/**
* Returns the resource permission persistence.
*
* @return the resource permission persistence
*/
public ResourcePermissionPersistence getResourcePermissionPersistence() {
return resourcePermissionPersistence;
}
/**
* Sets the resource permission persistence.
*
* @param resourcePermissionPersistence the resource permission persistence
*/
public void setResourcePermissionPersistence(
ResourcePermissionPersistence resourcePermissionPersistence) {
this.resourcePermissionPersistence = resourcePermissionPersistence;
}
/**
* Returns the resource permission finder.
*
* @return the resource permission finder
*/
public ResourcePermissionFinder getResourcePermissionFinder() {
return resourcePermissionFinder;
}
/**
* Sets the resource permission finder.
*
* @param resourcePermissionFinder the resource permission finder
*/
public void setResourcePermissionFinder(
ResourcePermissionFinder resourcePermissionFinder) {
this.resourcePermissionFinder = resourcePermissionFinder;
}
/**
* Returns the resource type permission local service.
*
* @return the resource type permission local service
*/
public com.liferay.portal.kernel.service.ResourceTypePermissionLocalService getResourceTypePermissionLocalService() {
return resourceTypePermissionLocalService;
}
/**
* Sets the resource type permission local service.
*
* @param resourceTypePermissionLocalService the resource type permission local service
*/
public void setResourceTypePermissionLocalService(
com.liferay.portal.kernel.service.ResourceTypePermissionLocalService resourceTypePermissionLocalService) {
this.resourceTypePermissionLocalService = resourceTypePermissionLocalService;
}
/**
* Returns the resource type permission persistence.
*
* @return the resource type permission persistence
*/
public ResourceTypePermissionPersistence getResourceTypePermissionPersistence() {
return resourceTypePermissionPersistence;
}
/**
* Sets the resource type permission persistence.
*
* @param resourceTypePermissionPersistence the resource type permission persistence
*/
public void setResourceTypePermissionPersistence(
ResourceTypePermissionPersistence resourceTypePermissionPersistence) {
this.resourceTypePermissionPersistence = resourceTypePermissionPersistence;
}
/**
* Returns the resource type permission finder.
*
* @return the resource type permission finder
*/
public ResourceTypePermissionFinder getResourceTypePermissionFinder() {
return resourceTypePermissionFinder;
}
/**
* Sets the resource type permission finder.
*
* @param resourceTypePermissionFinder the resource type permission finder
*/
public void setResourceTypePermissionFinder(
ResourceTypePermissionFinder resourceTypePermissionFinder) {
this.resourceTypePermissionFinder = resourceTypePermissionFinder;
}
/**
* Returns the expando row local service.
*
* @return the expando row local service
*/
public com.liferay.expando.kernel.service.ExpandoRowLocalService getExpandoRowLocalService() {
return expandoRowLocalService;
}
/**
* Sets the expando row local service.
*
* @param expandoRowLocalService the expando row local service
*/
public void setExpandoRowLocalService(
com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService) {
this.expandoRowLocalService = expandoRowLocalService;
}
/**
* Returns the expando row persistence.
*
* @return the expando row persistence
*/
public ExpandoRowPersistence getExpandoRowPersistence() {
return expandoRowPersistence;
}
/**
* Sets the expando row persistence.
*
* @param expandoRowPersistence the expando row persistence
*/
public void setExpandoRowPersistence(
ExpandoRowPersistence expandoRowPersistence) {
this.expandoRowPersistence = expandoRowPersistence;
}
/**
* Returns the team local service.
*
* @return the team local service
*/
public com.liferay.portal.kernel.service.TeamLocalService getTeamLocalService() {
return teamLocalService;
}
/**
* Sets the team local service.
*
* @param teamLocalService the team local service
*/
public void setTeamLocalService(
com.liferay.portal.kernel.service.TeamLocalService teamLocalService) {
this.teamLocalService = teamLocalService;
}
/**
* Returns the team persistence.
*
* @return the team persistence
*/
public TeamPersistence getTeamPersistence() {
return teamPersistence;
}
/**
* Sets the team persistence.
*
* @param teamPersistence the team persistence
*/
public void setTeamPersistence(TeamPersistence teamPersistence) {
this.teamPersistence = teamPersistence;
}
/**
* Returns the team finder.
*
* @return the team finder
*/
public TeamFinder getTeamFinder() {
return teamFinder;
}
/**
* Sets the team finder.
*
* @param teamFinder the team finder
*/
public void setTeamFinder(TeamFinder teamFinder) {
this.teamFinder = teamFinder;
}
/**
* Returns the user local service.
*
* @return the user local service
*/
public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() {
return userLocalService;
}
/**
* Sets the user local service.
*
* @param userLocalService the user local service
*/
public void setUserLocalService(
com.liferay.portal.kernel.service.UserLocalService userLocalService) {
this.userLocalService = userLocalService;
}
/**
* Returns the user persistence.
*
* @return the user persistence
*/
public UserPersistence getUserPersistence() {
return userPersistence;
}
/**
* Sets the user persistence.
*
* @param userPersistence the user persistence
*/
public void setUserPersistence(UserPersistence userPersistence) {
this.userPersistence = userPersistence;
}
/**
* Returns the user finder.
*
* @return the user finder
*/
public UserFinder getUserFinder() {
return userFinder;
}
/**
* Sets the user finder.
*
* @param userFinder the user finder
*/
public void setUserFinder(UserFinder userFinder) {
this.userFinder = userFinder;
}
/**
* Returns the user group group role local service.
*
* @return the user group group role local service
*/
public com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService getUserGroupGroupRoleLocalService() {
return userGroupGroupRoleLocalService;
}
/**
* Sets the user group group role local service.
*
* @param userGroupGroupRoleLocalService the user group group role local service
*/
public void setUserGroupGroupRoleLocalService(
com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService) {
this.userGroupGroupRoleLocalService = userGroupGroupRoleLocalService;
}
/**
* Returns the user group group role persistence.
*
* @return the user group group role persistence
*/
public UserGroupGroupRolePersistence getUserGroupGroupRolePersistence() {
return userGroupGroupRolePersistence;
}
/**
* Sets the user group group role persistence.
*
* @param userGroupGroupRolePersistence the user group group role persistence
*/
public void setUserGroupGroupRolePersistence(
UserGroupGroupRolePersistence userGroupGroupRolePersistence) {
this.userGroupGroupRolePersistence = userGroupGroupRolePersistence;
}
/**
* Returns the user group group role finder.
*
* @return the user group group role finder
*/
public UserGroupGroupRoleFinder getUserGroupGroupRoleFinder() {
return userGroupGroupRoleFinder;
}
/**
* Sets the user group group role finder.
*
* @param userGroupGroupRoleFinder the user group group role finder
*/
public void setUserGroupGroupRoleFinder(
UserGroupGroupRoleFinder userGroupGroupRoleFinder) {
this.userGroupGroupRoleFinder = userGroupGroupRoleFinder;
}
/**
* Returns the user group role local service.
*
* @return the user group role local service
*/
public com.liferay.portal.kernel.service.UserGroupRoleLocalService getUserGroupRoleLocalService() {
return userGroupRoleLocalService;
}
/**
* Sets the user group role local service.
*
* @param userGroupRoleLocalService the user group role local service
*/
public void setUserGroupRoleLocalService(
com.liferay.portal.kernel.service.UserGroupRoleLocalService userGroupRoleLocalService) {
this.userGroupRoleLocalService = userGroupRoleLocalService;
}
/**
* Returns the user group role persistence.
*
* @return the user group role persistence
*/
public UserGroupRolePersistence getUserGroupRolePersistence() {
return userGroupRolePersistence;
}
/**
* Sets the user group role persistence.
*
* @param userGroupRolePersistence the user group role persistence
*/
public void setUserGroupRolePersistence(
UserGroupRolePersistence userGroupRolePersistence) {
this.userGroupRolePersistence = userGroupRolePersistence;
}
/**
* Returns the user group role finder.
*
* @return the user group role finder
*/
public UserGroupRoleFinder getUserGroupRoleFinder() {
return userGroupRoleFinder;
}
/**
* Sets the user group role finder.
*
* @param userGroupRoleFinder the user group role finder
*/
public void setUserGroupRoleFinder(UserGroupRoleFinder userGroupRoleFinder) {
this.userGroupRoleFinder = userGroupRoleFinder;
}
public void afterPropertiesSet() {
persistedModelLocalServiceRegistry.register("com.liferay.portal.kernel.model.Role",
roleLocalService);
}
public void destroy() {
persistedModelLocalServiceRegistry.unregister(
"com.liferay.portal.kernel.model.Role");
}
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
@Override
public String getOSGiServiceIdentifier() {
return RoleLocalService.class.getName();
}
protected Class<?> getModelClass() {
return Role.class;
}
protected String getModelClassName() {
return Role.class.getName();
}
/**
* Performs a SQL query.
*
* @param sql the sql query
*/
protected void runSQL(String sql) {
try {
DataSource dataSource = rolePersistence.getDataSource();
DB db = DBManagerUtil.getDB();
sql = db.buildSQL(sql);
sql = PortalUtil.transformSQL(sql);
SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
sql);
sqlUpdate.update();
}
catch (Exception e) {
throw new SystemException(e);
}
}
@BeanReference(type = RoleLocalService.class)
protected RoleLocalService roleLocalService;
@BeanReference(type = RolePersistence.class)
protected RolePersistence rolePersistence;
@BeanReference(type = RoleFinder.class)
protected RoleFinder roleFinder;
@BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
@BeanReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class)
protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService;
@BeanReference(type = ClassNamePersistence.class)
protected ClassNamePersistence classNamePersistence;
@BeanReference(type = com.liferay.portal.kernel.service.CompanyLocalService.class)
protected com.liferay.portal.kernel.service.CompanyLocalService companyLocalService;
@BeanReference(type = CompanyPersistence.class)
protected CompanyPersistence companyPersistence;
@BeanReference(type = com.liferay.portal.kernel.service.GroupLocalService.class)
protected com.liferay.portal.kernel.service.GroupLocalService groupLocalService;
@BeanReference(type = GroupPersistence.class)
protected GroupPersistence groupPersistence;
@BeanReference(type = GroupFinder.class)
protected GroupFinder groupFinder;
@BeanReference(type = com.liferay.portal.kernel.service.LayoutLocalService.class)
protected com.liferay.portal.kernel.service.LayoutLocalService layoutLocalService;
@BeanReference(type = LayoutPersistence.class)
protected LayoutPersistence layoutPersistence;
@BeanReference(type = LayoutFinder.class)
protected LayoutFinder layoutFinder;
@BeanReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class)
protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService;
@BeanReference(type = com.liferay.portal.kernel.service.ResourceActionLocalService.class)
protected com.liferay.portal.kernel.service.ResourceActionLocalService resourceActionLocalService;
@BeanReference(type = ResourceActionPersistence.class)
protected ResourceActionPersistence resourceActionPersistence;
@BeanReference(type = com.liferay.portal.kernel.service.ResourceBlockLocalService.class)
protected com.liferay.portal.kernel.service.ResourceBlockLocalService resourceBlockLocalService;
@BeanReference(type = ResourceBlockPersistence.class)
protected ResourceBlockPersistence resourceBlockPersistence;
@BeanReference(type = ResourceBlockFinder.class)
protected ResourceBlockFinder resourceBlockFinder;
@BeanReference(type = com.liferay.portal.kernel.service.ResourceBlockPermissionLocalService.class)
protected com.liferay.portal.kernel.service.ResourceBlockPermissionLocalService resourceBlockPermissionLocalService;
@BeanReference(type = ResourceBlockPermissionPersistence.class)
protected ResourceBlockPermissionPersistence resourceBlockPermissionPersistence;
@BeanReference(type = com.liferay.portal.kernel.service.ResourcePermissionLocalService.class)
protected com.liferay.portal.kernel.service.ResourcePermissionLocalService resourcePermissionLocalService;
@BeanReference(type = ResourcePermissionPersistence.class)
protected ResourcePermissionPersistence resourcePermissionPersistence;
@BeanReference(type = ResourcePermissionFinder.class)
protected ResourcePermissionFinder resourcePermissionFinder;
@BeanReference(type = com.liferay.portal.kernel.service.ResourceTypePermissionLocalService.class)
protected com.liferay.portal.kernel.service.ResourceTypePermissionLocalService resourceTypePermissionLocalService;
@BeanReference(type = ResourceTypePermissionPersistence.class)
protected ResourceTypePermissionPersistence resourceTypePermissionPersistence;
@BeanReference(type = ResourceTypePermissionFinder.class)
protected ResourceTypePermissionFinder resourceTypePermissionFinder;
@BeanReference(type = com.liferay.expando.kernel.service.ExpandoRowLocalService.class)
protected com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService;
@BeanReference(type = ExpandoRowPersistence.class)
protected ExpandoRowPersistence expandoRowPersistence;
@BeanReference(type = com.liferay.portal.kernel.service.TeamLocalService.class)
protected com.liferay.portal.kernel.service.TeamLocalService teamLocalService;
@BeanReference(type = TeamPersistence.class)
protected TeamPersistence teamPersistence;
@BeanReference(type = TeamFinder.class)
protected TeamFinder teamFinder;
@BeanReference(type = com.liferay.portal.kernel.service.UserLocalService.class)
protected com.liferay.portal.kernel.service.UserLocalService userLocalService;
@BeanReference(type = UserPersistence.class)
protected UserPersistence userPersistence;
@BeanReference(type = UserFinder.class)
protected UserFinder userFinder;
@BeanReference(type = com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService.class)
protected com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService;
@BeanReference(type = UserGroupGroupRolePersistence.class)
protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
@BeanReference(type = UserGroupGroupRoleFinder.class)
protected UserGroupGroupRoleFinder userGroupGroupRoleFinder;
@BeanReference(type = com.liferay.portal.kernel.service.UserGroupRoleLocalService.class)
protected com.liferay.portal.kernel.service.UserGroupRoleLocalService userGroupRoleLocalService;
@BeanReference(type = UserGroupRolePersistence.class)
protected UserGroupRolePersistence userGroupRolePersistence;
@BeanReference(type = UserGroupRoleFinder.class)
protected UserGroupRoleFinder userGroupRoleFinder;
@BeanReference(type = PersistedModelLocalServiceRegistry.class)
protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
}