Liferay 6.0-ee

com.liferay.portal.service
Class RoleLocalServiceWrapper

java.lang.Object
  extended by com.liferay.portal.service.RoleLocalServiceWrapper
All Implemented Interfaces:
RoleLocalService

public class RoleLocalServiceWrapper
extends Object
implements RoleLocalService

This class is a wrapper for RoleLocalService.

See Also:
RoleLocalService
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
RoleLocalServiceWrapper(RoleLocalService roleLocalService)
           
 
Method Summary
 Role addRole(long userId, long companyId, String name, Map<Locale,String> titleMap, String description, int type)
           
 Role addRole(long userId, long companyId, String name, Map<Locale,String> titleMap, String description, int type, String className, long classPK)
           
 Role addRole(Role role)
          Adds the role to the database.
 void addUserRoles(long userId, long[] roleIds)
           
 void checkSystemRoles(long companyId)
           
 Role createRole(long roleId)
          Creates a new role with the primary key.
 void deleteRole(long roleId)
          Deletes the role with the primary key from the database.
 void deleteRole(Role role)
          Deletes the role from the database.
 List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Counts the number of rows that match the dynamic query.
 Role getDefaultGroupRole(long groupId)
           
 List<Role> getGroupRoles(long groupId)
           
 Map<String,List<String>> getResourceRoles(long companyId, String name, int scope, String primKey)
           
 Role getRole(long roleId)
          Gets the role with the primary key.
 Role getRole(long companyId, String name)
           
 List<Role> getRoles(int start, int end)
          Gets a range of all the roles.
 List<Role> getRoles(int type, String subtype)
           
 List<Role> getRoles(long companyId)
           
 List<Role> getRoles(long[] roleIds)
           
 int getRolesCount()
          Gets the number of roles.
 List<Role> getSubtypeRoles(String subtype)
           
 int getSubtypeRolesCount(String subtype)
           
 Role getTeamRole(long companyId, long teamId)
           
 List<Role> getUserGroupGroupRoles(long userId, long groupId)
           
 List<Role> getUserGroupRoles(long userId, long groupId)
           
 List<Role> getUserRelatedRoles(long userId, List<Group> groups)
           
 List<Role> getUserRelatedRoles(long userId, long groupId)
           
 List<Role> getUserRelatedRoles(long userId, long[] groupIds)
           
 List<Role> getUserRoles(long userId)
           
 RoleLocalService getWrappedRoleLocalService()
           
 boolean hasUserRole(long userId, long roleId)
           
 boolean hasUserRole(long userId, long companyId, String name, boolean inherited)
          Returns true if the user has the regular role.
 boolean hasUserRoles(long userId, long companyId, String[] names, boolean inherited)
          Returns true if the user has any one of the specified regular roles.
 List<Role> search(long companyId, String name, String description, Integer[] types, int start, int end, OrderByComparator obc)
           
 List<Role> search(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc)
           
 int searchCount(long companyId, String name, String description, Integer[] types)
           
 int searchCount(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params)
           
 void setUserRoles(long userId, long[] roleIds)
           
 void unsetUserRoles(long userId, long[] roleIds)
           
 Role updateRole(long roleId, String name, Map<Locale,String> titleMap, String description, String subtype)
           
 Role updateRole(Role role)
          Updates the role in the database.
 Role updateRole(Role role, boolean merge)
          Updates the role in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleLocalServiceWrapper

public RoleLocalServiceWrapper(RoleLocalService roleLocalService)
Method Detail

addRole

public Role addRole(Role role)
             throws SystemException
Adds the role to the database. Also notifies the appropriate model listeners.

Specified by:
addRole in interface RoleLocalService
Parameters:
role - the role to add
Returns:
the role that was added
Throws:
SystemException - if a system exception occurred

createRole

public Role createRole(long roleId)
Creates a new role with the primary key. Does not add the role to the database.

Specified by:
createRole in interface RoleLocalService
Parameters:
roleId - the primary key for the new role
Returns:
the new role

deleteRole

public void deleteRole(long roleId)
                throws PortalException,
                       SystemException
Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.

Specified by:
deleteRole in interface RoleLocalService
Parameters:
roleId - the primary key of the role to delete
Throws:
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred

deleteRole

public void deleteRole(Role role)
                throws SystemException
Deletes the role from the database. Also notifies the appropriate model listeners.

Specified by:
deleteRole in interface RoleLocalService
Parameters:
role - the role to delete
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery)
                  throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Specified by:
dynamicQuery in interface RoleLocalService
Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end)
                  throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Specified by:
dynamicQuery in interface RoleLocalService
Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end,
                         OrderByComparator orderByComparator)
                  throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Specified by:
dynamicQuery in interface RoleLocalService
Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public long dynamicQueryCount(DynamicQuery dynamicQuery)
                       throws SystemException
Counts the number of rows that match the dynamic query.

Specified by:
dynamicQueryCount in interface RoleLocalService
Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

getRole

public Role getRole(long roleId)
             throws PortalException,
                    SystemException
Gets the role with the primary key.

Specified by:
getRole in interface RoleLocalService
Parameters:
roleId - the primary key of the role to get
Returns:
the role
Throws:
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred

getRoles

public List<Role> getRoles(int start,
                           int end)
                    throws SystemException
Gets a range of all the roles.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Specified by:
getRoles in interface RoleLocalService
Parameters:
start - the lower bound of the range of roles to return
end - the upper bound of the range of roles to return (not inclusive)
Returns:
the range of roles
Throws:
SystemException - if a system exception occurred

getRolesCount

public int getRolesCount()
                  throws SystemException
Gets the number of roles.

Specified by:
getRolesCount in interface RoleLocalService
Returns:
the number of roles
Throws:
SystemException - if a system exception occurred

updateRole

public Role updateRole(Role role)
                throws SystemException
Updates the role in the database. Also notifies the appropriate model listeners.

Specified by:
updateRole in interface RoleLocalService
Parameters:
role - the role to update
Returns:
the role that was updated
Throws:
SystemException - if a system exception occurred

updateRole

public Role updateRole(Role role,
                       boolean merge)
                throws SystemException
Updates the role in the database. Also notifies the appropriate model listeners.

Specified by:
updateRole in interface RoleLocalService
Parameters:
role - the role to update
merge - whether to merge the role with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
Returns:
the role that was updated
Throws:
SystemException - if a system exception occurred

addRole

public Role addRole(long userId,
                    long companyId,
                    String name,
                    Map<Locale,String> titleMap,
                    String description,
                    int type)
             throws PortalException,
                    SystemException
Specified by:
addRole in interface RoleLocalService
Throws:
PortalException
SystemException

addRole

public Role addRole(long userId,
                    long companyId,
                    String name,
                    Map<Locale,String> titleMap,
                    String description,
                    int type,
                    String className,
                    long classPK)
             throws PortalException,
                    SystemException
Specified by:
addRole in interface RoleLocalService
Throws:
PortalException
SystemException

addUserRoles

public void addUserRoles(long userId,
                         long[] roleIds)
                  throws PortalException,
                         SystemException
Specified by:
addUserRoles in interface RoleLocalService
Throws:
PortalException
SystemException

checkSystemRoles

public void checkSystemRoles(long companyId)
                      throws PortalException,
                             SystemException
Specified by:
checkSystemRoles in interface RoleLocalService
Throws:
PortalException
SystemException

getDefaultGroupRole

public Role getDefaultGroupRole(long groupId)
                         throws PortalException,
                                SystemException
Specified by:
getDefaultGroupRole in interface RoleLocalService
Throws:
PortalException
SystemException

getGroupRoles

public List<Role> getGroupRoles(long groupId)
                         throws SystemException
Specified by:
getGroupRoles in interface RoleLocalService
Throws:
SystemException

getResourceRoles

public Map<String,List<String>> getResourceRoles(long companyId,
                                                 String name,
                                                 int scope,
                                                 String primKey)
                                          throws SystemException
Specified by:
getResourceRoles in interface RoleLocalService
Throws:
SystemException

getRole

public Role getRole(long companyId,
                    String name)
             throws PortalException,
                    SystemException
Specified by:
getRole in interface RoleLocalService
Throws:
PortalException
SystemException

getRoles

public List<Role> getRoles(long companyId)
                    throws SystemException
Specified by:
getRoles in interface RoleLocalService
Throws:
SystemException

getRoles

public List<Role> getRoles(long[] roleIds)
                    throws PortalException,
                           SystemException
Specified by:
getRoles in interface RoleLocalService
Throws:
PortalException
SystemException

getRoles

public List<Role> getRoles(int type,
                           String subtype)
                    throws SystemException
Specified by:
getRoles in interface RoleLocalService
Throws:
SystemException

getSubtypeRoles

public List<Role> getSubtypeRoles(String subtype)
                           throws SystemException
Specified by:
getSubtypeRoles in interface RoleLocalService
Throws:
SystemException

getSubtypeRolesCount

public int getSubtypeRolesCount(String subtype)
                         throws SystemException
Specified by:
getSubtypeRolesCount in interface RoleLocalService
Throws:
SystemException

getTeamRole

public Role getTeamRole(long companyId,
                        long teamId)
                 throws PortalException,
                        SystemException
Specified by:
getTeamRole in interface RoleLocalService
Throws:
PortalException
SystemException

getUserGroupGroupRoles

public List<Role> getUserGroupGroupRoles(long userId,
                                         long groupId)
                                  throws SystemException
Specified by:
getUserGroupGroupRoles in interface RoleLocalService
Throws:
SystemException

getUserGroupRoles

public List<Role> getUserGroupRoles(long userId,
                                    long groupId)
                             throws SystemException
Specified by:
getUserGroupRoles in interface RoleLocalService
Throws:
SystemException

getUserRelatedRoles

public List<Role> getUserRelatedRoles(long userId,
                                      long groupId)
                               throws SystemException
Specified by:
getUserRelatedRoles in interface RoleLocalService
Throws:
SystemException

getUserRelatedRoles

public List<Role> getUserRelatedRoles(long userId,
                                      long[] groupIds)
                               throws SystemException
Specified by:
getUserRelatedRoles in interface RoleLocalService
Throws:
SystemException

getUserRelatedRoles

public List<Role> getUserRelatedRoles(long userId,
                                      List<Group> groups)
                               throws SystemException
Specified by:
getUserRelatedRoles in interface RoleLocalService
Throws:
SystemException

getUserRoles

public List<Role> getUserRoles(long userId)
                        throws SystemException
Specified by:
getUserRoles in interface RoleLocalService
Throws:
SystemException

hasUserRole

public boolean hasUserRole(long userId,
                           long roleId)
                    throws SystemException
Specified by:
hasUserRole in interface RoleLocalService
Throws:
SystemException

hasUserRole

public boolean hasUserRole(long userId,
                           long companyId,
                           String name,
                           boolean inherited)
                    throws PortalException,
                           SystemException
Returns true if the user has the regular role.

Specified by:
hasUserRole in interface RoleLocalService
Returns:
true if the user has the regular role
Throws:
PortalException
SystemException

hasUserRoles

public boolean hasUserRoles(long userId,
                            long companyId,
                            String[] names,
                            boolean inherited)
                     throws PortalException,
                            SystemException
Returns true if the user has any one of the specified regular roles.

Specified by:
hasUserRoles in interface RoleLocalService
Returns:
true if the user has the regular role
Throws:
PortalException
SystemException

search

public List<Role> search(long companyId,
                         String name,
                         String description,
                         Integer[] types,
                         int start,
                         int end,
                         OrderByComparator obc)
                  throws SystemException
Specified by:
search in interface RoleLocalService
Throws:
SystemException

search

public List<Role> search(long companyId,
                         String name,
                         String description,
                         Integer[] types,
                         LinkedHashMap<String,Object> params,
                         int start,
                         int end,
                         OrderByComparator obc)
                  throws SystemException
Specified by:
search in interface RoleLocalService
Throws:
SystemException

searchCount

public int searchCount(long companyId,
                       String name,
                       String description,
                       Integer[] types)
                throws SystemException
Specified by:
searchCount in interface RoleLocalService
Throws:
SystemException

searchCount

public int searchCount(long companyId,
                       String name,
                       String description,
                       Integer[] types,
                       LinkedHashMap<String,Object> params)
                throws SystemException
Specified by:
searchCount in interface RoleLocalService
Throws:
SystemException

setUserRoles

public void setUserRoles(long userId,
                         long[] roleIds)
                  throws PortalException,
                         SystemException
Specified by:
setUserRoles in interface RoleLocalService
Throws:
PortalException
SystemException

unsetUserRoles

public void unsetUserRoles(long userId,
                           long[] roleIds)
                    throws PortalException,
                           SystemException
Specified by:
unsetUserRoles in interface RoleLocalService
Throws:
PortalException
SystemException

updateRole

public Role updateRole(long roleId,
                       String name,
                       Map<Locale,String> titleMap,
                       String description,
                       String subtype)
                throws PortalException,
                       SystemException
Specified by:
updateRole in interface RoleLocalService
Throws:
PortalException
SystemException

getWrappedRoleLocalService

public RoleLocalService getWrappedRoleLocalService()

Liferay 6.0-ee