Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Interface ResourceTypePermissionPersistence

All Superinterfaces:
BasePersistence<ResourceTypePermission>
All Known Implementing Classes:
ResourceTypePermissionPersistenceImpl

public interface ResourceTypePermissionPersistence
extends BasePersistence<ResourceTypePermission>

The persistence interface for the resource type permission service.

Caching information and settings can be found in portal.properties

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

Method Summary
 void cacheResult(List<ResourceTypePermission> resourceTypePermissions)
          Caches the resource type permissions in the entity cache if it is enabled.
 void cacheResult(ResourceTypePermission resourceTypePermission)
          Caches the resource type permission in the entity cache if it is enabled.
 int countAll()
          Returns the number of resource type permissions.
 int countByC_G_N_R(long companyId, long groupId, String name, long roleId)
          Returns the number of resource type permissions where companyId = ? and groupId = ? and name = ? and roleId = ?.
 int countByC_N_R(long companyId, String name, long roleId)
          Returns the number of resource type permissions where companyId = ? and name = ? and roleId = ?.
 int countByRoleId(long roleId)
          Returns the number of resource type permissions where roleId = ?.
 ResourceTypePermission create(long resourceTypePermissionId)
          Creates a new resource type permission with the primary key.
 ResourceTypePermission fetchByC_G_N_R(long companyId, long groupId, String name, long roleId)
          Returns the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? or returns null if it could not be found.
 ResourceTypePermission fetchByC_G_N_R(long companyId, long groupId, String name, long roleId, boolean retrieveFromCache)
          Returns the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? or returns null if it could not be found, optionally using the finder cache.
 ResourceTypePermission fetchByC_N_R_First(long companyId, String name, long roleId, OrderByComparator orderByComparator)
          Returns the first resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.
 ResourceTypePermission fetchByC_N_R_Last(long companyId, String name, long roleId, OrderByComparator orderByComparator)
          Returns the last resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.
 ResourceTypePermission fetchByPrimaryKey(long resourceTypePermissionId)
          Returns the resource type permission with the primary key or returns null if it could not be found.
 ResourceTypePermission fetchByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first resource type permission in the ordered set where roleId = ?.
 ResourceTypePermission fetchByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last resource type permission in the ordered set where roleId = ?.
 List<ResourceTypePermission> findAll()
          Returns all the resource type permissions.
 List<ResourceTypePermission> findAll(int start, int end)
          Returns a range of all the resource type permissions.
 List<ResourceTypePermission> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource type permissions.
 ResourceTypePermission findByC_G_N_R(long companyId, long groupId, String name, long roleId)
          Returns the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? or throws a NoSuchResourceTypePermissionException if it could not be found.
 ResourceTypePermission findByC_N_R_First(long companyId, String name, long roleId, OrderByComparator orderByComparator)
          Returns the first resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.
 ResourceTypePermission findByC_N_R_Last(long companyId, String name, long roleId, OrderByComparator orderByComparator)
          Returns the last resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.
 ResourceTypePermission[] findByC_N_R_PrevAndNext(long resourceTypePermissionId, long companyId, String name, long roleId, OrderByComparator orderByComparator)
          Returns the resource type permissions before and after the current resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.
 List<ResourceTypePermission> findByC_N_R(long companyId, String name, long roleId)
          Returns all the resource type permissions where companyId = ? and name = ? and roleId = ?.
 List<ResourceTypePermission> findByC_N_R(long companyId, String name, long roleId, int start, int end)
          Returns a range of all the resource type permissions where companyId = ? and name = ? and roleId = ?.
 List<ResourceTypePermission> findByC_N_R(long companyId, String name, long roleId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource type permissions where companyId = ? and name = ? and roleId = ?.
 ResourceTypePermission findByPrimaryKey(long resourceTypePermissionId)
          Returns the resource type permission with the primary key or throws a NoSuchResourceTypePermissionException if it could not be found.
 ResourceTypePermission findByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first resource type permission in the ordered set where roleId = ?.
 ResourceTypePermission findByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last resource type permission in the ordered set where roleId = ?.
 ResourceTypePermission[] findByRoleId_PrevAndNext(long resourceTypePermissionId, long roleId, OrderByComparator orderByComparator)
          Returns the resource type permissions before and after the current resource type permission in the ordered set where roleId = ?.
 List<ResourceTypePermission> findByRoleId(long roleId)
          Returns all the resource type permissions where roleId = ?.
 List<ResourceTypePermission> findByRoleId(long roleId, int start, int end)
          Returns a range of all the resource type permissions where roleId = ?.
 List<ResourceTypePermission> findByRoleId(long roleId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource type permissions where roleId = ?.
 ResourceTypePermission remove(long resourceTypePermissionId)
          Removes the resource type permission with the primary key from the database.
 void removeAll()
          Removes all the resource type permissions from the database.
 ResourceTypePermission removeByC_G_N_R(long companyId, long groupId, String name, long roleId)
          Removes the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? from the database.
 void removeByC_N_R(long companyId, String name, long roleId)
          Removes all the resource type permissions where companyId = ? and name = ? and roleId = ? from the database.
 void removeByRoleId(long roleId)
          Removes all the resource type permissions where roleId = ? from the database.
 ResourceTypePermission updateImpl(ResourceTypePermission resourceTypePermission, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(ResourceTypePermission resourceTypePermission)
Caches the resource type permission in the entity cache if it is enabled.

Parameters:
resourceTypePermission - the resource type permission

cacheResult

void cacheResult(List<ResourceTypePermission> resourceTypePermissions)
Caches the resource type permissions in the entity cache if it is enabled.

Parameters:
resourceTypePermissions - the resource type permissions

create

ResourceTypePermission create(long resourceTypePermissionId)
Creates a new resource type permission with the primary key. Does not add the resource type permission to the database.

Parameters:
resourceTypePermissionId - the primary key for the new resource type permission
Returns:
the new resource type permission

remove

ResourceTypePermission remove(long resourceTypePermissionId)
                              throws NoSuchResourceTypePermissionException,
                                     SystemException
Removes the resource type permission with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
resourceTypePermissionId - the primary key of the resource type permission
Returns:
the resource type permission that was removed
Throws:
NoSuchResourceTypePermissionException - if a resource type permission with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

ResourceTypePermission updateImpl(ResourceTypePermission resourceTypePermission,
                                  boolean merge)
                                  throws SystemException
Throws:
SystemException

findByPrimaryKey

ResourceTypePermission findByPrimaryKey(long resourceTypePermissionId)
                                        throws NoSuchResourceTypePermissionException,
                                               SystemException
Returns the resource type permission with the primary key or throws a NoSuchResourceTypePermissionException if it could not be found.

Parameters:
resourceTypePermissionId - the primary key of the resource type permission
Returns:
the resource type permission
Throws:
NoSuchResourceTypePermissionException - if a resource type permission with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

ResourceTypePermission fetchByPrimaryKey(long resourceTypePermissionId)
                                         throws SystemException
Returns the resource type permission with the primary key or returns null if it could not be found.

Parameters:
resourceTypePermissionId - the primary key of the resource type permission
Returns:
the resource type permission, or null if a resource type permission with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByRoleId

List<ResourceTypePermission> findByRoleId(long roleId)
                                          throws SystemException
Returns all the resource type permissions where roleId = ?.

Parameters:
roleId - the role ID
Returns:
the matching resource type permissions
Throws:
SystemException - if a system exception occurred

findByRoleId

List<ResourceTypePermission> findByRoleId(long roleId,
                                          int start,
                                          int end)
                                          throws SystemException
Returns a range of all the resource type permissions where roleId = ?.

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.

Parameters:
roleId - the role ID
start - the lower bound of the range of resource type permissions
end - the upper bound of the range of resource type permissions (not inclusive)
Returns:
the range of matching resource type permissions
Throws:
SystemException - if a system exception occurred

findByRoleId

List<ResourceTypePermission> findByRoleId(long roleId,
                                          int start,
                                          int end,
                                          OrderByComparator orderByComparator)
                                          throws SystemException
Returns an ordered range of all the resource type permissions where roleId = ?.

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.

Parameters:
roleId - the role ID
start - the lower bound of the range of resource type permissions
end - the upper bound of the range of resource type permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching resource type permissions
Throws:
SystemException - if a system exception occurred

findByRoleId_First

ResourceTypePermission findByRoleId_First(long roleId,
                                          OrderByComparator orderByComparator)
                                          throws NoSuchResourceTypePermissionException,
                                                 SystemException
Returns the first resource type permission in the ordered set where roleId = ?.

Parameters:
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource type permission
Throws:
NoSuchResourceTypePermissionException - if a matching resource type permission could not be found
SystemException - if a system exception occurred

fetchByRoleId_First

ResourceTypePermission fetchByRoleId_First(long roleId,
                                           OrderByComparator orderByComparator)
                                           throws SystemException
Returns the first resource type permission in the ordered set where roleId = ?.

Parameters:
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource type permission, or null if a matching resource type permission could not be found
Throws:
SystemException - if a system exception occurred

findByRoleId_Last

ResourceTypePermission findByRoleId_Last(long roleId,
                                         OrderByComparator orderByComparator)
                                         throws NoSuchResourceTypePermissionException,
                                                SystemException
Returns the last resource type permission in the ordered set where roleId = ?.

Parameters:
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource type permission
Throws:
NoSuchResourceTypePermissionException - if a matching resource type permission could not be found
SystemException - if a system exception occurred

fetchByRoleId_Last

ResourceTypePermission fetchByRoleId_Last(long roleId,
                                          OrderByComparator orderByComparator)
                                          throws SystemException
Returns the last resource type permission in the ordered set where roleId = ?.

Parameters:
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource type permission, or null if a matching resource type permission could not be found
Throws:
SystemException - if a system exception occurred

findByRoleId_PrevAndNext

ResourceTypePermission[] findByRoleId_PrevAndNext(long resourceTypePermissionId,
                                                  long roleId,
                                                  OrderByComparator orderByComparator)
                                                  throws NoSuchResourceTypePermissionException,
                                                         SystemException
Returns the resource type permissions before and after the current resource type permission in the ordered set where roleId = ?.

Parameters:
resourceTypePermissionId - the primary key of the current resource type permission
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next resource type permission
Throws:
NoSuchResourceTypePermissionException - if a resource type permission with the primary key could not be found
SystemException - if a system exception occurred

findByC_N_R

List<ResourceTypePermission> findByC_N_R(long companyId,
                                         String name,
                                         long roleId)
                                         throws SystemException
Returns all the resource type permissions where companyId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
Returns:
the matching resource type permissions
Throws:
SystemException - if a system exception occurred

findByC_N_R

List<ResourceTypePermission> findByC_N_R(long companyId,
                                         String name,
                                         long roleId,
                                         int start,
                                         int end)
                                         throws SystemException
Returns a range of all the resource type permissions where companyId = ? and name = ? and roleId = ?.

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.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
start - the lower bound of the range of resource type permissions
end - the upper bound of the range of resource type permissions (not inclusive)
Returns:
the range of matching resource type permissions
Throws:
SystemException - if a system exception occurred

findByC_N_R

List<ResourceTypePermission> findByC_N_R(long companyId,
                                         String name,
                                         long roleId,
                                         int start,
                                         int end,
                                         OrderByComparator orderByComparator)
                                         throws SystemException
Returns an ordered range of all the resource type permissions where companyId = ? and name = ? and roleId = ?.

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.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
start - the lower bound of the range of resource type permissions
end - the upper bound of the range of resource type permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching resource type permissions
Throws:
SystemException - if a system exception occurred

findByC_N_R_First

ResourceTypePermission findByC_N_R_First(long companyId,
                                         String name,
                                         long roleId,
                                         OrderByComparator orderByComparator)
                                         throws NoSuchResourceTypePermissionException,
                                                SystemException
Returns the first resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource type permission
Throws:
NoSuchResourceTypePermissionException - if a matching resource type permission could not be found
SystemException - if a system exception occurred

fetchByC_N_R_First

ResourceTypePermission fetchByC_N_R_First(long companyId,
                                          String name,
                                          long roleId,
                                          OrderByComparator orderByComparator)
                                          throws SystemException
Returns the first resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource type permission, or null if a matching resource type permission could not be found
Throws:
SystemException - if a system exception occurred

findByC_N_R_Last

ResourceTypePermission findByC_N_R_Last(long companyId,
                                        String name,
                                        long roleId,
                                        OrderByComparator orderByComparator)
                                        throws NoSuchResourceTypePermissionException,
                                               SystemException
Returns the last resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource type permission
Throws:
NoSuchResourceTypePermissionException - if a matching resource type permission could not be found
SystemException - if a system exception occurred

fetchByC_N_R_Last

ResourceTypePermission fetchByC_N_R_Last(long companyId,
                                         String name,
                                         long roleId,
                                         OrderByComparator orderByComparator)
                                         throws SystemException
Returns the last resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource type permission, or null if a matching resource type permission could not be found
Throws:
SystemException - if a system exception occurred

findByC_N_R_PrevAndNext

ResourceTypePermission[] findByC_N_R_PrevAndNext(long resourceTypePermissionId,
                                                 long companyId,
                                                 String name,
                                                 long roleId,
                                                 OrderByComparator orderByComparator)
                                                 throws NoSuchResourceTypePermissionException,
                                                        SystemException
Returns the resource type permissions before and after the current resource type permission in the ordered set where companyId = ? and name = ? and roleId = ?.

Parameters:
resourceTypePermissionId - the primary key of the current resource type permission
companyId - the company ID
name - the name
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next resource type permission
Throws:
NoSuchResourceTypePermissionException - if a resource type permission with the primary key could not be found
SystemException - if a system exception occurred

findByC_G_N_R

ResourceTypePermission findByC_G_N_R(long companyId,
                                     long groupId,
                                     String name,
                                     long roleId)
                                     throws NoSuchResourceTypePermissionException,
                                            SystemException
Returns the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? or throws a NoSuchResourceTypePermissionException if it could not be found.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
roleId - the role ID
Returns:
the matching resource type permission
Throws:
NoSuchResourceTypePermissionException - if a matching resource type permission could not be found
SystemException - if a system exception occurred

fetchByC_G_N_R

ResourceTypePermission fetchByC_G_N_R(long companyId,
                                      long groupId,
                                      String name,
                                      long roleId)
                                      throws SystemException
Returns the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
roleId - the role ID
Returns:
the matching resource type permission, or null if a matching resource type permission could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_G_N_R

ResourceTypePermission fetchByC_G_N_R(long companyId,
                                      long groupId,
                                      String name,
                                      long roleId,
                                      boolean retrieveFromCache)
                                      throws SystemException
Returns the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
roleId - the role ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching resource type permission, or null if a matching resource type permission could not be found
Throws:
SystemException - if a system exception occurred

findAll

List<ResourceTypePermission> findAll()
                                     throws SystemException
Returns all the resource type permissions.

Returns:
the resource type permissions
Throws:
SystemException - if a system exception occurred

findAll

List<ResourceTypePermission> findAll(int start,
                                     int end)
                                     throws SystemException
Returns a range of all the resource type permissions.

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.

Parameters:
start - the lower bound of the range of resource type permissions
end - the upper bound of the range of resource type permissions (not inclusive)
Returns:
the range of resource type permissions
Throws:
SystemException - if a system exception occurred

findAll

List<ResourceTypePermission> findAll(int start,
                                     int end,
                                     OrderByComparator orderByComparator)
                                     throws SystemException
Returns an ordered range of all the resource type permissions.

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.

Parameters:
start - the lower bound of the range of resource type permissions
end - the upper bound of the range of resource type permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of resource type permissions
Throws:
SystemException - if a system exception occurred

removeByRoleId

void removeByRoleId(long roleId)
                    throws SystemException
Removes all the resource type permissions where roleId = ? from the database.

Parameters:
roleId - the role ID
Throws:
SystemException - if a system exception occurred

removeByC_N_R

void removeByC_N_R(long companyId,
                   String name,
                   long roleId)
                   throws SystemException
Removes all the resource type permissions where companyId = ? and name = ? and roleId = ? from the database.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
Throws:
SystemException - if a system exception occurred

removeByC_G_N_R

ResourceTypePermission removeByC_G_N_R(long companyId,
                                       long groupId,
                                       String name,
                                       long roleId)
                                       throws NoSuchResourceTypePermissionException,
                                              SystemException
Removes the resource type permission where companyId = ? and groupId = ? and name = ? and roleId = ? from the database.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
roleId - the role ID
Returns:
the resource type permission that was removed
Throws:
SystemException - if a system exception occurred
NoSuchResourceTypePermissionException

removeAll

void removeAll()
               throws SystemException
Removes all the resource type permissions from the database.

Throws:
SystemException - if a system exception occurred

countByRoleId

int countByRoleId(long roleId)
                  throws SystemException
Returns the number of resource type permissions where roleId = ?.

Parameters:
roleId - the role ID
Returns:
the number of matching resource type permissions
Throws:
SystemException - if a system exception occurred

countByC_N_R

int countByC_N_R(long companyId,
                 String name,
                 long roleId)
                 throws SystemException
Returns the number of resource type permissions where companyId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
name - the name
roleId - the role ID
Returns:
the number of matching resource type permissions
Throws:
SystemException - if a system exception occurred

countByC_G_N_R

int countByC_G_N_R(long companyId,
                   long groupId,
                   String name,
                   long roleId)
                   throws SystemException
Returns the number of resource type permissions where companyId = ? and groupId = ? and name = ? and roleId = ?.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
roleId - the role ID
Returns:
the number of matching resource type permissions
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Returns the number of resource type permissions.

Returns:
the number of resource type permissions
Throws:
SystemException - if a system exception occurred

Liferay 6.1.2-ce-ga3