/** * 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 com.liferay.portal.kernel.model.Role getRole(long roleId) throws com.liferay.portal.kernel.exception.PortalException { return _roleLocalService.getRole(roleId); }
/** * Returns the role with the name in the company. * * <p> * The method searches the system roles map first for default roles. If a * role with the name is not found, then the method will query the database. * </p> * * @param companyId the primary key of the company * @param name the role's name * @return the role with the name */ @Override public com.liferay.portal.kernel.model.Role getRole(long companyId, String name) throws com.liferay.portal.kernel.exception.PortalException { return _roleLocalService.getRole(companyId, name); }
/** * 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 */ public static com.liferay.portal.kernel.model.Role getRole(long roleId) throws com.liferay.portal.kernel.exception.PortalException { return getService().getRole(roleId); }
/** * Returns the role with the name in the company. * * <p> * The method searches the system roles map first for default roles. If a * role with the name is not found, then the method will query the database. * </p> * * @param companyId the primary key of the company * @param name the role's name * @return the role with the name */ public static com.liferay.portal.kernel.model.Role getRole(long companyId, String name) throws com.liferay.portal.kernel.exception.PortalException { return getService().getRole(companyId, name); }
Role adminRole = null; try { adminRole = _roleLocalService.getRole(companyId, "Administrator");
Role adminRole = null; try { adminRole = _roleLocalService.getRole(companyId, "Administrator");
Role adminRole = null; try { adminRole = _roleLocalService.getRole(companyId, "Administrator");