Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Class ResourceTypePermissionUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.ResourceTypePermissionUtil

@ProviderType
public class ResourceTypePermissionUtil
extends Object

The persistence utility for the resource type permission service. This utility wraps ResourceTypePermissionPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
ResourceTypePermissionPersistence, ResourceTypePermissionPersistenceImpl

Constructor Summary
ResourceTypePermissionUtil()
           
 
Method Summary
static void cacheResult(List<ResourceTypePermission> resourceTypePermissions)
          Caches the resource type permissions in the entity cache if it is enabled.
static void cacheResult(ResourceTypePermission resourceTypePermission)
          Caches the resource type permission in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ResourceTypePermission resourceTypePermission)
           
static int countAll()
          Returns the number of resource type permissions.
static 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 = ?.
static int countByC_N_R(long companyId, String name, long roleId)
          Returns the number of resource type permissions where companyId = ? and name = ? and roleId = ?.
static int countByRoleId(long roleId)
          Returns the number of resource type permissions where roleId = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ResourceTypePermission create(long resourceTypePermissionId)
          Creates a new resource type permission with the primary key.
static 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.
static 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.
static 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 = ?.
static 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 = ?.
static ResourceTypePermission fetchByPrimaryKey(long resourceTypePermissionId)
          Returns the resource type permission with the primary key or returns null if it could not be found.
static ResourceTypePermission fetchByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first resource type permission in the ordered set where roleId = ?.
static ResourceTypePermission fetchByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last resource type permission in the ordered set where roleId = ?.
static List<ResourceTypePermission> findAll()
          Returns all the resource type permissions.
static List<ResourceTypePermission> findAll(int start, int end)
          Returns a range of all the resource type permissions.
static List<ResourceTypePermission> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource type permissions.
static 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.
static 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 = ?.
static 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 = ?.
static 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 = ?.
static List<ResourceTypePermission> findByC_N_R(long companyId, String name, long roleId)
          Returns all the resource type permissions where companyId = ? and name = ? and roleId = ?.
static 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 = ?.
static 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 = ?.
static ResourceTypePermission findByPrimaryKey(long resourceTypePermissionId)
          Returns the resource type permission with the primary key or throws a NoSuchResourceTypePermissionException if it could not be found.
static ResourceTypePermission findByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first resource type permission in the ordered set where roleId = ?.
static ResourceTypePermission findByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last resource type permission in the ordered set where roleId = ?.
static 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 = ?.
static List<ResourceTypePermission> findByRoleId(long roleId)
          Returns all the resource type permissions where roleId = ?.
static List<ResourceTypePermission> findByRoleId(long roleId, int start, int end)
          Returns a range of all the resource type permissions where roleId = ?.
static List<ResourceTypePermission> findByRoleId(long roleId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource type permissions where roleId = ?.
static List<ResourceTypePermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ResourceTypePermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ResourceTypePermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ResourceTypePermissionPersistence getPersistence()
           
static ResourceTypePermission remove(long resourceTypePermissionId)
          Removes the resource type permission with the primary key from the database.
static void removeAll()
          Removes all the resource type permissions from the database.
static 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.
static 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.
static void removeByRoleId(long roleId)
          Removes all the resource type permissions where roleId = ? from the database.
 void setPersistence(ResourceTypePermissionPersistence persistence)
          Deprecated. As of 6.2.0
static ResourceTypePermission update(ResourceTypePermission resourceTypePermission)
           
static ResourceTypePermission update(ResourceTypePermission resourceTypePermission, ServiceContext serviceContext)
           
static ResourceTypePermission updateImpl(ResourceTypePermission resourceTypePermission)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceTypePermissionUtil

public ResourceTypePermissionUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(ResourceTypePermission resourceTypePermission)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
                                  throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ResourceTypePermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                         throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ResourceTypePermission> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                                int start,
                                                                int end)
                                                         throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<ResourceTypePermission> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                                int start,
                                                                int end,
                                                                OrderByComparator orderByComparator)
                                                         throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static ResourceTypePermission update(ResourceTypePermission resourceTypePermission)
                                     throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel)

update

public static ResourceTypePermission update(ResourceTypePermission resourceTypePermission,
                                            ServiceContext serviceContext)
                                     throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)

findByRoleId

public static 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

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from ResourceTypePermissionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from ResourceTypePermissionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static 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

public static 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

public static 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

public static 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

public static 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

removeByRoleId

public static 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

countByRoleId

public static 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

findByC_N_R

public static 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

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from ResourceTypePermissionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from ResourceTypePermissionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static 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

public static 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

public static 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

public static 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

public static 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

removeByC_N_R

public static 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

countByC_N_R

public static 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

findByC_G_N_R

public static 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

public static 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

public static 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

removeByC_G_N_R

public static 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

countByC_G_N_R

public static 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

cacheResult

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

Parameters:
resourceTypePermission - the resource type permission

cacheResult

public static 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

public static 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

public static 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

public static ResourceTypePermission updateImpl(ResourceTypePermission resourceTypePermission)
                                         throws SystemException
Throws:
SystemException

findByPrimaryKey

public static 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

public static 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

findAll

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

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

findAll

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from ResourceTypePermissionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from ResourceTypePermissionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

removeAll

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

Throws:
SystemException - if a system exception occurred

countAll

public static 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

getPersistence

public static ResourceTypePermissionPersistence getPersistence()

setPersistence

public void setPersistence(ResourceTypePermissionPersistence persistence)
Deprecated. As of 6.2.0


Liferay 6.2-ce-ga5