|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.persistence.impl.BasePersistenceImpl<Permission> com.liferay.portal.service.persistence.PermissionPersistenceImpl
public class PermissionPersistenceImpl
The persistence implementation for the permission service.
Caching information and settings can be found in portal.properties
PermissionPersistence
,
PermissionUtil
Nested Class Summary | |
---|---|
protected class |
PermissionPersistenceImpl.AddGroup
|
protected class |
PermissionPersistenceImpl.AddRole
|
protected class |
PermissionPersistenceImpl.AddUser
|
protected class |
PermissionPersistenceImpl.ClearGroups
|
protected class |
PermissionPersistenceImpl.ClearRoles
|
protected class |
PermissionPersistenceImpl.ClearUsers
|
protected class |
PermissionPersistenceImpl.ContainsGroup
|
protected class |
PermissionPersistenceImpl.ContainsRole
|
protected class |
PermissionPersistenceImpl.ContainsUser
|
protected class |
PermissionPersistenceImpl.RemoveGroup
|
protected class |
PermissionPersistenceImpl.RemoveRole
|
protected class |
PermissionPersistenceImpl.RemoveUser
|
Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
---|
COUNT_COLUMN_NAME, FINDER_ARGS_EMPTY, listeners, ORDER_BY_ASC, ORDER_BY_ASC_HAS_NEXT, ORDER_BY_CLAUSE, ORDER_BY_DESC, ORDER_BY_DESC_HAS_NEXT, WHERE_AND, WHERE_GREATER_THAN, WHERE_GREATER_THAN_HAS_NEXT, WHERE_LESSER_THAN, WHERE_LESSER_THAN_HAS_NEXT, WHERE_OR |
Constructor Summary | |
---|---|
PermissionPersistenceImpl()
|
Method Summary | |
---|---|
void |
addGroup(long pk,
Group group)
Adds an association between the permission and the group. |
void |
addGroup(long pk,
long groupPK)
Adds an association between the permission and the group. |
void |
addGroups(long pk,
List<Group> groups)
Adds an association between the permission and the groups. |
void |
addGroups(long pk,
long[] groupPKs)
Adds an association between the permission and the groups. |
void |
addRole(long pk,
long rolePK)
Adds an association between the permission and the role. |
void |
addRole(long pk,
Role role)
Adds an association between the permission and the role. |
void |
addRoles(long pk,
List<Role> roles)
Adds an association between the permission and the roles. |
void |
addRoles(long pk,
long[] rolePKs)
Adds an association between the permission and the roles. |
void |
addUser(long pk,
long userPK)
Adds an association between the permission and the user. |
void |
addUser(long pk,
User user)
Adds an association between the permission and the user. |
void |
addUsers(long pk,
List<User> users)
Adds an association between the permission and the users. |
void |
addUsers(long pk,
long[] userPKs)
Adds an association between the permission and the users. |
void |
afterPropertiesSet()
Initializes the permission persistence. |
void |
cacheResult(List<Permission> permissions)
Caches the permissions in the entity cache if it is enabled. |
void |
cacheResult(Permission permission)
Caches the permission in the entity cache if it is enabled. |
protected void |
cacheUniqueFindersCache(Permission permission)
|
void |
clearCache()
Clears the cache for all permissions. |
void |
clearCache(List<Permission> permissions)
Clears the cache for a List instances of this model. |
void |
clearCache(Permission permission)
Clears the cache for the permission. |
void |
clearGroups(long pk)
Clears all associations between the permission and its groups. |
void |
clearRoles(long pk)
Clears all associations between the permission and its roles. |
protected void |
clearUniqueFindersCache(Permission permission)
|
void |
clearUsers(long pk)
Clears all associations between the permission and its users. |
boolean |
containsGroup(long pk,
long groupPK)
Returns true if the group is associated with the permission. |
boolean |
containsGroups(long pk)
Returns true if the permission has any groups associated with it. |
boolean |
containsRole(long pk,
long rolePK)
Returns true if the role is associated with the permission. |
boolean |
containsRoles(long pk)
Returns true if the permission has any roles associated with it. |
boolean |
containsUser(long pk,
long userPK)
Returns true if the user is associated with the permission. |
boolean |
containsUsers(long pk)
Returns true if the permission has any users associated with it. |
int |
countAll()
Returns the number of permissions. |
int |
countByA_R(String actionId,
long resourceId)
Returns the number of permissions where actionId = ? and resourceId = ?. |
int |
countByResourceId(long resourceId)
Returns the number of permissions where resourceId = ?. |
Permission |
create(long permissionId)
Creates a new permission with the primary key. |
void |
destroy()
|
Permission |
fetchByA_R(String actionId,
long resourceId)
Returns the permission where actionId = ? and resourceId = ? or returns null if it could not be found. |
Permission |
fetchByA_R(String actionId,
long resourceId,
boolean retrieveFromCache)
Returns the permission where actionId = ? and resourceId = ? or returns null if it could not be found, optionally using the finder cache. |
Permission |
fetchByPrimaryKey(long permissionId)
Returns the permission with the primary key or returns null if it could not be found. |
Permission |
fetchByPrimaryKey(Serializable primaryKey)
Returns the permission with the primary key or returns null if it could not be found. |
Permission |
fetchByResourceId_First(long resourceId,
OrderByComparator orderByComparator)
Returns the first permission in the ordered set where resourceId = ?. |
Permission |
fetchByResourceId_Last(long resourceId,
OrderByComparator orderByComparator)
Returns the last permission in the ordered set where resourceId = ?. |
List<Permission> |
findAll()
Returns all the permissions. |
List<Permission> |
findAll(int start,
int end)
Returns a range of all the permissions. |
List<Permission> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the permissions. |
Permission |
findByA_R(String actionId,
long resourceId)
Returns the permission where actionId = ? and resourceId = ? or throws a NoSuchPermissionException if it could not be found. |
Permission |
findByPrimaryKey(long permissionId)
Returns the permission with the primary key or throws a NoSuchPermissionException if it could not be found. |
Permission |
findByPrimaryKey(Serializable primaryKey)
Returns the permission with the primary key or throws a NoSuchModelException if it could not be found. |
Permission |
findByResourceId_First(long resourceId,
OrderByComparator orderByComparator)
Returns the first permission in the ordered set where resourceId = ?. |
Permission |
findByResourceId_Last(long resourceId,
OrderByComparator orderByComparator)
Returns the last permission in the ordered set where resourceId = ?. |
Permission[] |
findByResourceId_PrevAndNext(long permissionId,
long resourceId,
OrderByComparator orderByComparator)
Returns the permissions before and after the current permission in the ordered set where resourceId = ?. |
List<Permission> |
findByResourceId(long resourceId)
Returns all the permissions where resourceId = ?. |
List<Permission> |
findByResourceId(long resourceId,
int start,
int end)
Returns a range of all the permissions where resourceId = ?. |
List<Permission> |
findByResourceId(long resourceId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the permissions where resourceId = ?. |
protected Permission |
getByResourceId_PrevAndNext(Session session,
Permission permission,
long resourceId,
OrderByComparator orderByComparator,
boolean previous)
|
List<Group> |
getGroups(long pk)
Returns all the groups associated with the permission. |
List<Group> |
getGroups(long pk,
int start,
int end)
Returns a range of all the groups associated with the permission. |
List<Group> |
getGroups(long pk,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the groups associated with the permission. |
int |
getGroupsSize(long pk)
Returns the number of groups associated with the permission. |
List<Role> |
getRoles(long pk)
Returns all the roles associated with the permission. |
List<Role> |
getRoles(long pk,
int start,
int end)
Returns a range of all the roles associated with the permission. |
List<Role> |
getRoles(long pk,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the roles associated with the permission. |
int |
getRolesSize(long pk)
Returns the number of roles associated with the permission. |
List<User> |
getUsers(long pk)
Returns all the users associated with the permission. |
List<User> |
getUsers(long pk,
int start,
int end)
Returns a range of all the users associated with the permission. |
List<User> |
getUsers(long pk,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the users associated with the permission. |
int |
getUsersSize(long pk)
Returns the number of users associated with the permission. |
Permission |
remove(long permissionId)
Removes the permission with the primary key from the database. |
Permission |
remove(Serializable primaryKey)
Removes the permission with the primary key from the database. |
void |
removeAll()
Removes all the permissions from the database. |
Permission |
removeByA_R(String actionId,
long resourceId)
Removes the permission where actionId = ? and resourceId = ? from the database. |
void |
removeByResourceId(long resourceId)
Removes all the permissions where resourceId = ? from the database. |
void |
removeGroup(long pk,
Group group)
Removes the association between the permission and the group. |
void |
removeGroup(long pk,
long groupPK)
Removes the association between the permission and the group. |
void |
removeGroups(long pk,
List<Group> groups)
Removes the association between the permission and the groups. |
void |
removeGroups(long pk,
long[] groupPKs)
Removes the association between the permission and the groups. |
protected Permission |
removeImpl(Permission permission)
Removes the model instance from the database. |
void |
removeRole(long pk,
long rolePK)
Removes the association between the permission and the role. |
void |
removeRole(long pk,
Role role)
Removes the association between the permission and the role. |
void |
removeRoles(long pk,
List<Role> roles)
Removes the association between the permission and the roles. |
void |
removeRoles(long pk,
long[] rolePKs)
Removes the association between the permission and the roles. |
void |
removeUser(long pk,
long userPK)
Removes the association between the permission and the user. |
void |
removeUser(long pk,
User user)
Removes the association between the permission and the user. |
void |
removeUsers(long pk,
List<User> users)
Removes the association between the permission and the users. |
void |
removeUsers(long pk,
long[] userPKs)
Removes the association between the permission and the users. |
void |
setGroups(long pk,
List<Group> groups)
Sets the groups associated with the permission, removing and adding associations as necessary. |
void |
setGroups(long pk,
long[] groupPKs)
Sets the groups associated with the permission, removing and adding associations as necessary. |
void |
setRoles(long pk,
List<Role> roles)
Sets the roles associated with the permission, removing and adding associations as necessary. |
void |
setRoles(long pk,
long[] rolePKs)
Sets the roles associated with the permission, removing and adding associations as necessary. |
void |
setUsers(long pk,
List<User> users)
Sets the users associated with the permission, removing and adding associations as necessary. |
void |
setUsers(long pk,
long[] userPKs)
Sets the users associated with the permission, removing and adding associations as necessary. |
protected Permission |
toUnwrappedModel(Permission permission)
|
Permission |
updateImpl(Permission permission,
boolean merge)
Updates the model instance in the database or adds it if it does not yet exist. |
Methods inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
---|
appendOrderByComparator, closeSession, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getClassLoader, getDataSource, getDB, getDialect, getListeners, openNewSession, openSession, processException, registerListener, remove, setDataSource, setSessionFactory, unregisterListener, update, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
---|
closeSession, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update |
Field Detail |
---|
public static final String FINDER_CLASS_NAME_ENTITY
public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION
public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_RESOURCEID
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_RESOURCEID
public static final FinderPath FINDER_PATH_COUNT_BY_RESOURCEID
public static final FinderPath FINDER_PATH_FETCH_BY_A_R
public static final FinderPath FINDER_PATH_COUNT_BY_A_R
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_COUNT_ALL
public static final FinderPath FINDER_PATH_GET_GROUPS
public static final FinderPath FINDER_PATH_GET_GROUPS_SIZE
public static final FinderPath FINDER_PATH_CONTAINS_GROUP
public static final FinderPath FINDER_PATH_GET_ROLES
public static final FinderPath FINDER_PATH_GET_ROLES_SIZE
public static final FinderPath FINDER_PATH_CONTAINS_ROLE
public static final FinderPath FINDER_PATH_GET_USERS
public static final FinderPath FINDER_PATH_GET_USERS_SIZE
public static final FinderPath FINDER_PATH_CONTAINS_USER
@BeanReference(type=AccountPersistence.class) protected AccountPersistence accountPersistence
@BeanReference(type=AddressPersistence.class) protected AddressPersistence addressPersistence
@BeanReference(type=BrowserTrackerPersistence.class) protected BrowserTrackerPersistence browserTrackerPersistence
@BeanReference(type=ClassNamePersistence.class) protected ClassNamePersistence classNamePersistence
@BeanReference(type=ClusterGroupPersistence.class) protected ClusterGroupPersistence clusterGroupPersistence
@BeanReference(type=CompanyPersistence.class) protected CompanyPersistence companyPersistence
@BeanReference(type=ContactPersistence.class) protected ContactPersistence contactPersistence
@BeanReference(type=CountryPersistence.class) protected CountryPersistence countryPersistence
@BeanReference(type=EmailAddressPersistence.class) protected EmailAddressPersistence emailAddressPersistence
@BeanReference(type=GroupPersistence.class) protected GroupPersistence groupPersistence
@BeanReference(type=ImagePersistence.class) protected ImagePersistence imagePersistence
@BeanReference(type=LayoutPersistence.class) protected LayoutPersistence layoutPersistence
@BeanReference(type=LayoutBranchPersistence.class) protected LayoutBranchPersistence layoutBranchPersistence
@BeanReference(type=LayoutPrototypePersistence.class) protected LayoutPrototypePersistence layoutPrototypePersistence
@BeanReference(type=LayoutRevisionPersistence.class) protected LayoutRevisionPersistence layoutRevisionPersistence
@BeanReference(type=LayoutSetPersistence.class) protected LayoutSetPersistence layoutSetPersistence
@BeanReference(type=LayoutSetBranchPersistence.class) protected LayoutSetBranchPersistence layoutSetBranchPersistence
@BeanReference(type=LayoutSetPrototypePersistence.class) protected LayoutSetPrototypePersistence layoutSetPrototypePersistence
@BeanReference(type=ListTypePersistence.class) protected ListTypePersistence listTypePersistence
@BeanReference(type=LockPersistence.class) protected LockPersistence lockPersistence
@BeanReference(type=MembershipRequestPersistence.class) protected MembershipRequestPersistence membershipRequestPersistence
@BeanReference(type=OrganizationPersistence.class) protected OrganizationPersistence organizationPersistence
@BeanReference(type=OrgGroupPermissionPersistence.class) protected OrgGroupPermissionPersistence orgGroupPermissionPersistence
@BeanReference(type=OrgGroupRolePersistence.class) protected OrgGroupRolePersistence orgGroupRolePersistence
@BeanReference(type=OrgLaborPersistence.class) protected OrgLaborPersistence orgLaborPersistence
@BeanReference(type=PasswordPolicyPersistence.class) protected PasswordPolicyPersistence passwordPolicyPersistence
@BeanReference(type=PasswordPolicyRelPersistence.class) protected PasswordPolicyRelPersistence passwordPolicyRelPersistence
@BeanReference(type=PasswordTrackerPersistence.class) protected PasswordTrackerPersistence passwordTrackerPersistence
@BeanReference(type=PermissionPersistence.class) protected PermissionPersistence permissionPersistence
@BeanReference(type=PhonePersistence.class) protected PhonePersistence phonePersistence
@BeanReference(type=PluginSettingPersistence.class) protected PluginSettingPersistence pluginSettingPersistence
@BeanReference(type=PortalPreferencesPersistence.class) protected PortalPreferencesPersistence portalPreferencesPersistence
@BeanReference(type=PortletPersistence.class) protected PortletPersistence portletPersistence
@BeanReference(type=PortletItemPersistence.class) protected PortletItemPersistence portletItemPersistence
@BeanReference(type=PortletPreferencesPersistence.class) protected PortletPreferencesPersistence portletPreferencesPersistence
@BeanReference(type=RegionPersistence.class) protected RegionPersistence regionPersistence
@BeanReference(type=ReleasePersistence.class) protected ReleasePersistence releasePersistence
@BeanReference(type=RepositoryPersistence.class) protected RepositoryPersistence repositoryPersistence
@BeanReference(type=RepositoryEntryPersistence.class) protected RepositoryEntryPersistence repositoryEntryPersistence
@BeanReference(type=ResourcePersistence.class) protected ResourcePersistence resourcePersistence
@BeanReference(type=ResourceActionPersistence.class) protected ResourceActionPersistence resourceActionPersistence
@BeanReference(type=ResourceBlockPersistence.class) protected ResourceBlockPersistence resourceBlockPersistence
@BeanReference(type=ResourceBlockPermissionPersistence.class) protected ResourceBlockPermissionPersistence resourceBlockPermissionPersistence
@BeanReference(type=ResourceCodePersistence.class) protected ResourceCodePersistence resourceCodePersistence
@BeanReference(type=ResourcePermissionPersistence.class) protected ResourcePermissionPersistence resourcePermissionPersistence
@BeanReference(type=ResourceTypePermissionPersistence.class) protected ResourceTypePermissionPersistence resourceTypePermissionPersistence
@BeanReference(type=RolePersistence.class) protected RolePersistence rolePersistence
@BeanReference(type=ServiceComponentPersistence.class) protected ServiceComponentPersistence serviceComponentPersistence
@BeanReference(type=ShardPersistence.class) protected ShardPersistence shardPersistence
@BeanReference(type=SubscriptionPersistence.class) protected SubscriptionPersistence subscriptionPersistence
@BeanReference(type=TeamPersistence.class) protected TeamPersistence teamPersistence
@BeanReference(type=TicketPersistence.class) protected TicketPersistence ticketPersistence
@BeanReference(type=UserPersistence.class) protected UserPersistence userPersistence
@BeanReference(type=UserGroupPersistence.class) protected UserGroupPersistence userGroupPersistence
@BeanReference(type=UserGroupGroupRolePersistence.class) protected UserGroupGroupRolePersistence userGroupGroupRolePersistence
@BeanReference(type=UserGroupRolePersistence.class) protected UserGroupRolePersistence userGroupRolePersistence
@BeanReference(type=UserIdMapperPersistence.class) protected UserIdMapperPersistence userIdMapperPersistence
@BeanReference(type=UserNotificationEventPersistence.class) protected UserNotificationEventPersistence userNotificationEventPersistence
@BeanReference(type=UserTrackerPersistence.class) protected UserTrackerPersistence userTrackerPersistence
@BeanReference(type=UserTrackerPathPersistence.class) protected UserTrackerPathPersistence userTrackerPathPersistence
@BeanReference(type=VirtualHostPersistence.class) protected VirtualHostPersistence virtualHostPersistence
@BeanReference(type=WebDAVPropsPersistence.class) protected WebDAVPropsPersistence webDAVPropsPersistence
@BeanReference(type=WebsitePersistence.class) protected WebsitePersistence websitePersistence
@BeanReference(type=WorkflowDefinitionLinkPersistence.class) protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence
@BeanReference(type=WorkflowInstanceLinkPersistence.class) protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence
protected PermissionPersistenceImpl.ContainsGroup containsGroup
protected PermissionPersistenceImpl.AddGroup addGroup
protected PermissionPersistenceImpl.ClearGroups clearGroups
protected PermissionPersistenceImpl.RemoveGroup removeGroup
protected PermissionPersistenceImpl.ContainsRole containsRole
protected PermissionPersistenceImpl.AddRole addRole
protected PermissionPersistenceImpl.ClearRoles clearRoles
protected PermissionPersistenceImpl.RemoveRole removeRole
protected PermissionPersistenceImpl.ContainsUser containsUser
protected PermissionPersistenceImpl.AddUser addUser
protected PermissionPersistenceImpl.ClearUsers clearUsers
protected PermissionPersistenceImpl.RemoveUser removeUser
Constructor Detail |
---|
public PermissionPersistenceImpl()
Method Detail |
---|
public void cacheResult(Permission permission)
cacheResult
in interface PermissionPersistence
permission
- the permissionpublic void cacheResult(List<Permission> permissions)
cacheResult
in interface PermissionPersistence
permissions
- the permissionspublic void clearCache()
The EntityCache
and FinderCache
are both cleared by this method.
clearCache
in interface BasePersistence<Permission>
clearCache
in class BasePersistenceImpl<Permission>
public void clearCache(Permission permission)
The EntityCache
and FinderCache
are both cleared by this method.
clearCache
in interface BasePersistence<Permission>
clearCache
in class BasePersistenceImpl<Permission>
permission
- the instance of this model to clear the cache forpublic void clearCache(List<Permission> permissions)
BasePersistence
The EntityCache
and FinderCache
are both cleared by this
method.
clearCache
in interface BasePersistence<Permission>
clearCache
in class BasePersistenceImpl<Permission>
permissions
- the List instances of this model to clear the cache forprotected void cacheUniqueFindersCache(Permission permission)
protected void clearUniqueFindersCache(Permission permission)
public Permission create(long permissionId)
create
in interface PermissionPersistence
permissionId
- the primary key for the new permission
public Permission remove(long permissionId) throws NoSuchPermissionException, SystemException
remove
in interface PermissionPersistence
permissionId
- the primary key of the permission
NoSuchPermissionException
- if a permission with the primary key could not be found
SystemException
- if a system exception occurredpublic Permission remove(Serializable primaryKey) throws NoSuchPermissionException, SystemException
remove
in interface BasePersistence<Permission>
remove
in class BasePersistenceImpl<Permission>
primaryKey
- the primary key of the permission
NoSuchPermissionException
- if a permission with the primary key could not be found
SystemException
- if a system exception occurredprotected Permission removeImpl(Permission permission) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.update(BaseModel,
boolean)
depends on this method to implement the remove operation; it
only notifies the model listeners.
removeImpl
in class BasePersistenceImpl<Permission>
permission
- the model instance to remove
SystemException
- if a system exception occurredpublic Permission updateImpl(Permission permission, boolean merge) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.remove(BaseModel)
depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl
in interface PermissionPersistence
updateImpl
in class BasePersistenceImpl<Permission>
permission
- the model instance to updatemerge
- whether to merge the model instance with the current
session. See BatchSession.update(
com.liferay.portal.kernel.dao.orm.Session, BaseModel, boolean)
for an explanation.
SystemException
- if a system exception occurredprotected Permission toUnwrappedModel(Permission permission)
public Permission findByPrimaryKey(Serializable primaryKey) throws NoSuchModelException, SystemException
NoSuchModelException
if it could not be found.
findByPrimaryKey
in interface BasePersistence<Permission>
findByPrimaryKey
in class BasePersistenceImpl<Permission>
primaryKey
- the primary key of the permission
NoSuchModelException
- if a permission with the primary key could not be found
SystemException
- if a system exception occurredpublic Permission findByPrimaryKey(long permissionId) throws NoSuchPermissionException, SystemException
NoSuchPermissionException
if it could not be found.
findByPrimaryKey
in interface PermissionPersistence
permissionId
- the primary key of the permission
NoSuchPermissionException
- if a permission with the primary key could not be found
SystemException
- if a system exception occurredpublic Permission fetchByPrimaryKey(Serializable primaryKey) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface BasePersistence<Permission>
fetchByPrimaryKey
in class BasePersistenceImpl<Permission>
primaryKey
- the primary key of the permission
null
if a permission with the primary key could not be found
SystemException
- if a system exception occurredpublic Permission fetchByPrimaryKey(long permissionId) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface PermissionPersistence
permissionId
- the primary key of the permission
null
if a permission with the primary key could not be found
SystemException
- if a system exception occurredpublic List<Permission> findByResourceId(long resourceId) throws SystemException
findByResourceId
in interface PermissionPersistence
resourceId
- the resource ID
SystemException
- if a system exception occurredpublic List<Permission> findByResourceId(long resourceId, int start, int end) throws SystemException
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.
findByResourceId
in interface PermissionPersistence
resourceId
- the resource IDstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)
SystemException
- if a system exception occurredpublic List<Permission> findByResourceId(long resourceId, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
findByResourceId
in interface PermissionPersistence
resourceId
- the resource IDstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic Permission findByResourceId_First(long resourceId, OrderByComparator orderByComparator) throws NoSuchPermissionException, SystemException
findByResourceId_First
in interface PermissionPersistence
resourceId
- the resource IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchPermissionException
- if a matching permission could not be found
SystemException
- if a system exception occurredpublic Permission fetchByResourceId_First(long resourceId, OrderByComparator orderByComparator) throws SystemException
fetchByResourceId_First
in interface PermissionPersistence
resourceId
- the resource IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching permission could not be found
SystemException
- if a system exception occurredpublic Permission findByResourceId_Last(long resourceId, OrderByComparator orderByComparator) throws NoSuchPermissionException, SystemException
findByResourceId_Last
in interface PermissionPersistence
resourceId
- the resource IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchPermissionException
- if a matching permission could not be found
SystemException
- if a system exception occurredpublic Permission fetchByResourceId_Last(long resourceId, OrderByComparator orderByComparator) throws SystemException
fetchByResourceId_Last
in interface PermissionPersistence
resourceId
- the resource IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching permission could not be found
SystemException
- if a system exception occurredpublic Permission[] findByResourceId_PrevAndNext(long permissionId, long resourceId, OrderByComparator orderByComparator) throws NoSuchPermissionException, SystemException
findByResourceId_PrevAndNext
in interface PermissionPersistence
permissionId
- the primary key of the current permissionresourceId
- the resource IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchPermissionException
- if a permission with the primary key could not be found
SystemException
- if a system exception occurredprotected Permission getByResourceId_PrevAndNext(Session session, Permission permission, long resourceId, OrderByComparator orderByComparator, boolean previous)
public Permission findByA_R(String actionId, long resourceId) throws NoSuchPermissionException, SystemException
NoSuchPermissionException
if it could not be found.
findByA_R
in interface PermissionPersistence
actionId
- the action IDresourceId
- the resource ID
NoSuchPermissionException
- if a matching permission could not be found
SystemException
- if a system exception occurredpublic Permission fetchByA_R(String actionId, long resourceId) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByA_R
in interface PermissionPersistence
actionId
- the action IDresourceId
- the resource ID
null
if a matching permission could not be found
SystemException
- if a system exception occurredpublic Permission fetchByA_R(String actionId, long resourceId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByA_R
in interface PermissionPersistence
actionId
- the action IDresourceId
- the resource IDretrieveFromCache
- whether to use the finder cache
null
if a matching permission could not be found
SystemException
- if a system exception occurredpublic List<Permission> findAll() throws SystemException
findAll
in interface PermissionPersistence
SystemException
- if a system exception occurredpublic List<Permission> findAll(int start, int end) throws SystemException
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.
findAll
in interface PermissionPersistence
start
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)
SystemException
- if a system exception occurredpublic List<Permission> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
findAll
in interface PermissionPersistence
start
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic void removeByResourceId(long resourceId) throws SystemException
removeByResourceId
in interface PermissionPersistence
resourceId
- the resource ID
SystemException
- if a system exception occurredpublic Permission removeByA_R(String actionId, long resourceId) throws NoSuchPermissionException, SystemException
removeByA_R
in interface PermissionPersistence
actionId
- the action IDresourceId
- the resource ID
SystemException
- if a system exception occurred
NoSuchPermissionException
public void removeAll() throws SystemException
removeAll
in interface PermissionPersistence
SystemException
- if a system exception occurredpublic int countByResourceId(long resourceId) throws SystemException
countByResourceId
in interface PermissionPersistence
resourceId
- the resource ID
SystemException
- if a system exception occurredpublic int countByA_R(String actionId, long resourceId) throws SystemException
countByA_R
in interface PermissionPersistence
actionId
- the action IDresourceId
- the resource ID
SystemException
- if a system exception occurredpublic int countAll() throws SystemException
countAll
in interface PermissionPersistence
SystemException
- if a system exception occurredpublic List<Group> getGroups(long pk) throws SystemException
getGroups
in interface PermissionPersistence
pk
- the primary key of the permission
SystemException
- if a system exception occurredpublic List<Group> getGroups(long pk, int start, int end) throws SystemException
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.
getGroups
in interface PermissionPersistence
pk
- the primary key of the permissionstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)
SystemException
- if a system exception occurredpublic List<Group> getGroups(long pk, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
getGroups
in interface PermissionPersistence
pk
- the primary key of the permissionstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic int getGroupsSize(long pk) throws SystemException
getGroupsSize
in interface PermissionPersistence
pk
- the primary key of the permission
SystemException
- if a system exception occurredpublic boolean containsGroup(long pk, long groupPK) throws SystemException
true
if the group is associated with the permission.
containsGroup
in interface PermissionPersistence
pk
- the primary key of the permissiongroupPK
- the primary key of the group
true
if the group is associated with the permission; false
otherwise
SystemException
- if a system exception occurredpublic boolean containsGroups(long pk) throws SystemException
true
if the permission has any groups associated with it.
containsGroups
in interface PermissionPersistence
pk
- the primary key of the permission to check for associations with groups
true
if the permission has any groups associated with it; false
otherwise
SystemException
- if a system exception occurredpublic void addGroup(long pk, long groupPK) throws SystemException
addGroup
in interface PermissionPersistence
pk
- the primary key of the permissiongroupPK
- the primary key of the group
SystemException
- if a system exception occurredpublic void addGroup(long pk, Group group) throws SystemException
addGroup
in interface PermissionPersistence
pk
- the primary key of the permissiongroup
- the group
SystemException
- if a system exception occurredpublic void addGroups(long pk, long[] groupPKs) throws SystemException
addGroups
in interface PermissionPersistence
pk
- the primary key of the permissiongroupPKs
- the primary keys of the groups
SystemException
- if a system exception occurredpublic void addGroups(long pk, List<Group> groups) throws SystemException
addGroups
in interface PermissionPersistence
pk
- the primary key of the permissiongroups
- the groups
SystemException
- if a system exception occurredpublic void clearGroups(long pk) throws SystemException
clearGroups
in interface PermissionPersistence
pk
- the primary key of the permission to clear the associated groups from
SystemException
- if a system exception occurredpublic void removeGroup(long pk, long groupPK) throws SystemException
removeGroup
in interface PermissionPersistence
pk
- the primary key of the permissiongroupPK
- the primary key of the group
SystemException
- if a system exception occurredpublic void removeGroup(long pk, Group group) throws SystemException
removeGroup
in interface PermissionPersistence
pk
- the primary key of the permissiongroup
- the group
SystemException
- if a system exception occurredpublic void removeGroups(long pk, long[] groupPKs) throws SystemException
removeGroups
in interface PermissionPersistence
pk
- the primary key of the permissiongroupPKs
- the primary keys of the groups
SystemException
- if a system exception occurredpublic void removeGroups(long pk, List<Group> groups) throws SystemException
removeGroups
in interface PermissionPersistence
pk
- the primary key of the permissiongroups
- the groups
SystemException
- if a system exception occurredpublic void setGroups(long pk, long[] groupPKs) throws SystemException
setGroups
in interface PermissionPersistence
pk
- the primary key of the permissiongroupPKs
- the primary keys of the groups to be associated with the permission
SystemException
- if a system exception occurredpublic void setGroups(long pk, List<Group> groups) throws SystemException
setGroups
in interface PermissionPersistence
pk
- the primary key of the permissiongroups
- the groups to be associated with the permission
SystemException
- if a system exception occurredpublic List<Role> getRoles(long pk) throws SystemException
getRoles
in interface PermissionPersistence
pk
- the primary key of the permission
SystemException
- if a system exception occurredpublic List<Role> getRoles(long pk, int start, int end) throws SystemException
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.
getRoles
in interface PermissionPersistence
pk
- the primary key of the permissionstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)
SystemException
- if a system exception occurredpublic List<Role> getRoles(long pk, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
getRoles
in interface PermissionPersistence
pk
- the primary key of the permissionstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic int getRolesSize(long pk) throws SystemException
getRolesSize
in interface PermissionPersistence
pk
- the primary key of the permission
SystemException
- if a system exception occurredpublic boolean containsRole(long pk, long rolePK) throws SystemException
true
if the role is associated with the permission.
containsRole
in interface PermissionPersistence
pk
- the primary key of the permissionrolePK
- the primary key of the role
true
if the role is associated with the permission; false
otherwise
SystemException
- if a system exception occurredpublic boolean containsRoles(long pk) throws SystemException
true
if the permission has any roles associated with it.
containsRoles
in interface PermissionPersistence
pk
- the primary key of the permission to check for associations with roles
true
if the permission has any roles associated with it; false
otherwise
SystemException
- if a system exception occurredpublic void addRole(long pk, long rolePK) throws SystemException
addRole
in interface PermissionPersistence
pk
- the primary key of the permissionrolePK
- the primary key of the role
SystemException
- if a system exception occurredpublic void addRole(long pk, Role role) throws SystemException
addRole
in interface PermissionPersistence
pk
- the primary key of the permissionrole
- the role
SystemException
- if a system exception occurredpublic void addRoles(long pk, long[] rolePKs) throws SystemException
addRoles
in interface PermissionPersistence
pk
- the primary key of the permissionrolePKs
- the primary keys of the roles
SystemException
- if a system exception occurredpublic void addRoles(long pk, List<Role> roles) throws SystemException
addRoles
in interface PermissionPersistence
pk
- the primary key of the permissionroles
- the roles
SystemException
- if a system exception occurredpublic void clearRoles(long pk) throws SystemException
clearRoles
in interface PermissionPersistence
pk
- the primary key of the permission to clear the associated roles from
SystemException
- if a system exception occurredpublic void removeRole(long pk, long rolePK) throws SystemException
removeRole
in interface PermissionPersistence
pk
- the primary key of the permissionrolePK
- the primary key of the role
SystemException
- if a system exception occurredpublic void removeRole(long pk, Role role) throws SystemException
removeRole
in interface PermissionPersistence
pk
- the primary key of the permissionrole
- the role
SystemException
- if a system exception occurredpublic void removeRoles(long pk, long[] rolePKs) throws SystemException
removeRoles
in interface PermissionPersistence
pk
- the primary key of the permissionrolePKs
- the primary keys of the roles
SystemException
- if a system exception occurredpublic void removeRoles(long pk, List<Role> roles) throws SystemException
removeRoles
in interface PermissionPersistence
pk
- the primary key of the permissionroles
- the roles
SystemException
- if a system exception occurredpublic void setRoles(long pk, long[] rolePKs) throws SystemException
setRoles
in interface PermissionPersistence
pk
- the primary key of the permissionrolePKs
- the primary keys of the roles to be associated with the permission
SystemException
- if a system exception occurredpublic void setRoles(long pk, List<Role> roles) throws SystemException
setRoles
in interface PermissionPersistence
pk
- the primary key of the permissionroles
- the roles to be associated with the permission
SystemException
- if a system exception occurredpublic List<User> getUsers(long pk) throws SystemException
getUsers
in interface PermissionPersistence
pk
- the primary key of the permission
SystemException
- if a system exception occurredpublic List<User> getUsers(long pk, int start, int end) throws SystemException
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.
getUsers
in interface PermissionPersistence
pk
- the primary key of the permissionstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)
SystemException
- if a system exception occurredpublic List<User> getUsers(long pk, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
getUsers
in interface PermissionPersistence
pk
- the primary key of the permissionstart
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic int getUsersSize(long pk) throws SystemException
getUsersSize
in interface PermissionPersistence
pk
- the primary key of the permission
SystemException
- if a system exception occurredpublic boolean containsUser(long pk, long userPK) throws SystemException
true
if the user is associated with the permission.
containsUser
in interface PermissionPersistence
pk
- the primary key of the permissionuserPK
- the primary key of the user
true
if the user is associated with the permission; false
otherwise
SystemException
- if a system exception occurredpublic boolean containsUsers(long pk) throws SystemException
true
if the permission has any users associated with it.
containsUsers
in interface PermissionPersistence
pk
- the primary key of the permission to check for associations with users
true
if the permission has any users associated with it; false
otherwise
SystemException
- if a system exception occurredpublic void addUser(long pk, long userPK) throws SystemException
addUser
in interface PermissionPersistence
pk
- the primary key of the permissionuserPK
- the primary key of the user
SystemException
- if a system exception occurredpublic void addUser(long pk, User user) throws SystemException
addUser
in interface PermissionPersistence
pk
- the primary key of the permissionuser
- the user
SystemException
- if a system exception occurredpublic void addUsers(long pk, long[] userPKs) throws SystemException
addUsers
in interface PermissionPersistence
pk
- the primary key of the permissionuserPKs
- the primary keys of the users
SystemException
- if a system exception occurredpublic void addUsers(long pk, List<User> users) throws SystemException
addUsers
in interface PermissionPersistence
pk
- the primary key of the permissionusers
- the users
SystemException
- if a system exception occurredpublic void clearUsers(long pk) throws SystemException
clearUsers
in interface PermissionPersistence
pk
- the primary key of the permission to clear the associated users from
SystemException
- if a system exception occurredpublic void removeUser(long pk, long userPK) throws SystemException
removeUser
in interface PermissionPersistence
pk
- the primary key of the permissionuserPK
- the primary key of the user
SystemException
- if a system exception occurredpublic void removeUser(long pk, User user) throws SystemException
removeUser
in interface PermissionPersistence
pk
- the primary key of the permissionuser
- the user
SystemException
- if a system exception occurredpublic void removeUsers(long pk, long[] userPKs) throws SystemException
removeUsers
in interface PermissionPersistence
pk
- the primary key of the permissionuserPKs
- the primary keys of the users
SystemException
- if a system exception occurredpublic void removeUsers(long pk, List<User> users) throws SystemException
removeUsers
in interface PermissionPersistence
pk
- the primary key of the permissionusers
- the users
SystemException
- if a system exception occurredpublic void setUsers(long pk, long[] userPKs) throws SystemException
setUsers
in interface PermissionPersistence
pk
- the primary key of the permissionuserPKs
- the primary keys of the users to be associated with the permission
SystemException
- if a system exception occurredpublic void setUsers(long pk, List<User> users) throws SystemException
setUsers
in interface PermissionPersistence
pk
- the primary key of the permissionusers
- the users to be associated with the permission
SystemException
- if a system exception occurredpublic void afterPropertiesSet()
public void destroy()
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |