com.liferay.portal.service.persistence
Class PermissionUtil
java.lang.Object
com.liferay.portal.service.persistence.PermissionUtil
public class PermissionUtil
- extends java.lang.Object
View Source
- Author:
- Brian Wing Shun Chan
Method Summary |
static void |
addGroup(long pk,
Group group)
|
static void |
addGroup(long pk,
long groupPK)
|
static void |
addGroups(long pk,
java.util.List<Group> groups)
|
static void |
addGroups(long pk,
long[] groupPKs)
|
static void |
addRole(long pk,
long rolePK)
|
static void |
addRole(long pk,
Role role)
|
static void |
addRoles(long pk,
java.util.List<Role> roles)
|
static void |
addRoles(long pk,
long[] rolePKs)
|
static void |
addUser(long pk,
long userPK)
|
static void |
addUser(long pk,
User user)
|
static void |
addUsers(long pk,
java.util.List<User> users)
|
static void |
addUsers(long pk,
long[] userPKs)
|
static void |
clearGroups(long pk)
|
static void |
clearRoles(long pk)
|
static void |
clearUsers(long pk)
|
static boolean |
containsGroup(long pk,
long groupPK)
|
static boolean |
containsGroups(long pk)
|
static boolean |
containsRole(long pk,
long rolePK)
|
static boolean |
containsRoles(long pk)
|
static boolean |
containsUser(long pk,
long userPK)
|
static boolean |
containsUsers(long pk)
|
static int |
countAll()
|
static int |
countByA_R(java.lang.String actionId,
long resourceId)
|
static int |
countByResourceId(long resourceId)
|
static Permission |
create(long permissionId)
|
static Permission |
fetchByA_R(java.lang.String actionId,
long resourceId)
|
static Permission |
fetchByPrimaryKey(long permissionId)
|
static java.util.List<Permission> |
findAll()
|
static java.util.List<Permission> |
findAll(int start,
int end)
|
static java.util.List<Permission> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static Permission |
findByA_R(java.lang.String actionId,
long resourceId)
|
static Permission |
findByPrimaryKey(long permissionId)
|
static Permission |
findByResourceId_First(long resourceId,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static Permission |
findByResourceId_Last(long resourceId,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static Permission[] |
findByResourceId_PrevAndNext(long permissionId,
long resourceId,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static java.util.List<Permission> |
findByResourceId(long resourceId)
|
static java.util.List<Permission> |
findByResourceId(long resourceId,
int start,
int end)
|
static java.util.List<Permission> |
findByResourceId(long resourceId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static java.util.List<java.lang.Object> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
|
static java.util.List<java.lang.Object> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
|
static java.util.List<Group> |
getGroups(long pk)
|
static java.util.List<Group> |
getGroups(long pk,
int start,
int end)
|
static java.util.List<Group> |
getGroups(long pk,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static int |
getGroupsSize(long pk)
|
static PermissionPersistence |
getPersistence()
|
static java.util.List<Role> |
getRoles(long pk)
|
static java.util.List<Role> |
getRoles(long pk,
int start,
int end)
|
static java.util.List<Role> |
getRoles(long pk,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static int |
getRolesSize(long pk)
|
static java.util.List<User> |
getUsers(long pk)
|
static java.util.List<User> |
getUsers(long pk,
int start,
int end)
|
static java.util.List<User> |
getUsers(long pk,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static int |
getUsersSize(long pk)
|
static Permission |
remove(long permissionId)
|
static Permission |
remove(Permission permission)
|
static void |
removeAll()
|
static void |
removeByA_R(java.lang.String actionId,
long resourceId)
|
static void |
removeByResourceId(long resourceId)
|
static void |
removeGroup(long pk,
Group group)
|
static void |
removeGroup(long pk,
long groupPK)
|
static void |
removeGroups(long pk,
java.util.List<Group> groups)
|
static void |
removeGroups(long pk,
long[] groupPKs)
|
static void |
removeRole(long pk,
long rolePK)
|
static void |
removeRole(long pk,
Role role)
|
static void |
removeRoles(long pk,
java.util.List<Role> roles)
|
static void |
removeRoles(long pk,
long[] rolePKs)
|
static void |
removeUser(long pk,
long userPK)
|
static void |
removeUser(long pk,
User user)
|
static void |
removeUsers(long pk,
java.util.List<User> users)
|
static void |
removeUsers(long pk,
long[] userPKs)
|
static void |
setGroups(long pk,
java.util.List<Group> groups)
|
static void |
setGroups(long pk,
long[] groupPKs)
|
void |
setPersistence(PermissionPersistence persistence)
|
static void |
setRoles(long pk,
java.util.List<Role> roles)
|
static void |
setRoles(long pk,
long[] rolePKs)
|
static void |
setUsers(long pk,
java.util.List<User> users)
|
static void |
setUsers(long pk,
long[] userPKs)
|
static Permission |
update(Permission permission)
Deprecated. Use update(Permission permission, boolean merge) . |
static Permission |
update(Permission permission,
boolean merge)
Add, update, or merge, the entity. |
static Permission |
updateImpl(Permission permission,
boolean merge)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PermissionUtil
public PermissionUtil()
create
public static Permission create(long permissionId)
remove
public static Permission remove(long permissionId)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
remove
public static Permission remove(Permission permission)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
update
public static Permission update(Permission permission)
throws com.liferay.portal.SystemException
- Deprecated. Use
update(Permission permission, boolean merge)
.
- Throws:
com.liferay.portal.SystemException
update
public static Permission update(Permission permission,
boolean merge)
throws com.liferay.portal.SystemException
- Add, update, or merge, the entity. This method also calls the model
listeners to trigger the proper events associated with adding, deleting,
or updating an entity.
- Parameters:
permission
- the entity to add, update, or mergemerge
- boolean value for whether to merge the entity. The
default value is false. Setting merge to true is more
expensive and should only be true when permission is
transient. See LEP-5473 for a detailed discussion of this
method.
- Returns:
- true if the portlet can be displayed via Ajax
- Throws:
com.liferay.portal.SystemException
updateImpl
public static Permission updateImpl(Permission permission,
boolean merge)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByPrimaryKey
public static Permission findByPrimaryKey(long permissionId)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
fetchByPrimaryKey
public static Permission fetchByPrimaryKey(long permissionId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByResourceId
public static java.util.List<Permission> findByResourceId(long resourceId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByResourceId
public static java.util.List<Permission> findByResourceId(long resourceId,
int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByResourceId
public static java.util.List<Permission> findByResourceId(long resourceId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByResourceId_First
public static Permission findByResourceId_First(long resourceId,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
findByResourceId_Last
public static Permission findByResourceId_Last(long resourceId,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
findByResourceId_PrevAndNext
public static Permission[] findByResourceId_PrevAndNext(long permissionId,
long resourceId,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
findByA_R
public static Permission findByA_R(java.lang.String actionId,
long resourceId)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
fetchByA_R
public static Permission fetchByA_R(java.lang.String actionId,
long resourceId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findWithDynamicQuery
public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findWithDynamicQuery
public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findAll
public static java.util.List<Permission> findAll()
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findAll
public static java.util.List<Permission> findAll(int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findAll
public static java.util.List<Permission> findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeByResourceId
public static void removeByResourceId(long resourceId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeByA_R
public static void removeByA_R(java.lang.String actionId,
long resourceId)
throws NoSuchPermissionException,
com.liferay.portal.SystemException
- Throws:
NoSuchPermissionException
com.liferay.portal.SystemException
removeAll
public static void removeAll()
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
countByResourceId
public static int countByResourceId(long resourceId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
countByA_R
public static int countByA_R(java.lang.String actionId,
long resourceId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
countAll
public static int countAll()
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getGroups
public static java.util.List<Group> getGroups(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getGroups
public static java.util.List<Group> getGroups(long pk,
int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getGroups
public static java.util.List<Group> getGroups(long pk,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getGroupsSize
public static int getGroupsSize(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
containsGroup
public static boolean containsGroup(long pk,
long groupPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
containsGroups
public static boolean containsGroups(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addGroup
public static void addGroup(long pk,
long groupPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addGroup
public static void addGroup(long pk,
Group group)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addGroups
public static void addGroups(long pk,
long[] groupPKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addGroups
public static void addGroups(long pk,
java.util.List<Group> groups)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
clearGroups
public static void clearGroups(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeGroup
public static void removeGroup(long pk,
long groupPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeGroup
public static void removeGroup(long pk,
Group group)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeGroups
public static void removeGroups(long pk,
long[] groupPKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeGroups
public static void removeGroups(long pk,
java.util.List<Group> groups)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setGroups
public static void setGroups(long pk,
long[] groupPKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setGroups
public static void setGroups(long pk,
java.util.List<Group> groups)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getRoles
public static java.util.List<Role> getRoles(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getRoles
public static java.util.List<Role> getRoles(long pk,
int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getRoles
public static java.util.List<Role> getRoles(long pk,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getRolesSize
public static int getRolesSize(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
containsRole
public static boolean containsRole(long pk,
long rolePK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
containsRoles
public static boolean containsRoles(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addRole
public static void addRole(long pk,
long rolePK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addRole
public static void addRole(long pk,
Role role)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addRoles
public static void addRoles(long pk,
long[] rolePKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addRoles
public static void addRoles(long pk,
java.util.List<Role> roles)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
clearRoles
public static void clearRoles(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeRole
public static void removeRole(long pk,
long rolePK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeRole
public static void removeRole(long pk,
Role role)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeRoles
public static void removeRoles(long pk,
long[] rolePKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeRoles
public static void removeRoles(long pk,
java.util.List<Role> roles)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setRoles
public static void setRoles(long pk,
long[] rolePKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setRoles
public static void setRoles(long pk,
java.util.List<Role> roles)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUsers
public static java.util.List<User> getUsers(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUsers
public static java.util.List<User> getUsers(long pk,
int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUsers
public static java.util.List<User> getUsers(long pk,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getUsersSize
public static int getUsersSize(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
containsUser
public static boolean containsUser(long pk,
long userPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
containsUsers
public static boolean containsUsers(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addUser
public static void addUser(long pk,
long userPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addUser
public static void addUser(long pk,
User user)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addUsers
public static void addUsers(long pk,
long[] userPKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
addUsers
public static void addUsers(long pk,
java.util.List<User> users)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
clearUsers
public static void clearUsers(long pk)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeUser
public static void removeUser(long pk,
long userPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeUser
public static void removeUser(long pk,
User user)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeUsers
public static void removeUsers(long pk,
long[] userPKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeUsers
public static void removeUsers(long pk,
java.util.List<User> users)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setUsers
public static void setUsers(long pk,
long[] userPKs)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
setUsers
public static void setUsers(long pk,
java.util.List<User> users)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getPersistence
public static PermissionPersistence getPersistence()
setPersistence
public void setPersistence(PermissionPersistence persistence)