Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Class ResourceBlockPermissionUtil

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

@ProviderType
public class ResourceBlockPermissionUtil
extends Object

The persistence utility for the resource block permission service. This utility wraps ResourceBlockPermissionPersistenceImpl 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:
ResourceBlockPermissionPersistence, ResourceBlockPermissionPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
ResourceBlockPermissionUtil()
           
 
Method Summary
static void cacheResult(List<ResourceBlockPermission> resourceBlockPermissions)
          Caches the resource block permissions in the entity cache if it is enabled.
static void cacheResult(ResourceBlockPermission resourceBlockPermission)
          Caches the resource block permission in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ResourceBlockPermission resourceBlockPermission)
           
static int countAll()
          Returns the number of resource block permissions.
static int countByR_R(long resourceBlockId, long roleId)
          Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?.
static int countByResourceBlockId(long resourceBlockId)
          Returns the number of resource block permissions where resourceBlockId = ?.
static int countByRoleId(long roleId)
          Returns the number of resource block permissions where roleId = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ResourceBlockPermission create(long resourceBlockPermissionId)
          Creates a new resource block permission with the primary key.
static ResourceBlockPermission fetchByPrimaryKey(long resourceBlockPermissionId)
          Returns the resource block permission with the primary key or returns null if it could not be found.
static ResourceBlockPermission fetchByR_R(long resourceBlockId, long roleId)
          Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns null if it could not be found.
static ResourceBlockPermission fetchByR_R(long resourceBlockId, long roleId, boolean retrieveFromCache)
          Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns null if it could not be found, optionally using the finder cache.
static ResourceBlockPermission fetchByResourceBlockId_First(long resourceBlockId, OrderByComparator orderByComparator)
          Returns the first resource block permission in the ordered set where resourceBlockId = ?.
static ResourceBlockPermission fetchByResourceBlockId_Last(long resourceBlockId, OrderByComparator orderByComparator)
          Returns the last resource block permission in the ordered set where resourceBlockId = ?.
static ResourceBlockPermission fetchByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first resource block permission in the ordered set where roleId = ?.
static ResourceBlockPermission fetchByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last resource block permission in the ordered set where roleId = ?.
static List<ResourceBlockPermission> findAll()
          Returns all the resource block permissions.
static List<ResourceBlockPermission> findAll(int start, int end)
          Returns a range of all the resource block permissions.
static List<ResourceBlockPermission> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource block permissions.
static ResourceBlockPermission findByPrimaryKey(long resourceBlockPermissionId)
          Returns the resource block permission with the primary key or throws a NoSuchResourceBlockPermissionException if it could not be found.
static ResourceBlockPermission findByR_R(long resourceBlockId, long roleId)
          Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a NoSuchResourceBlockPermissionException if it could not be found.
static ResourceBlockPermission findByResourceBlockId_First(long resourceBlockId, OrderByComparator orderByComparator)
          Returns the first resource block permission in the ordered set where resourceBlockId = ?.
static ResourceBlockPermission findByResourceBlockId_Last(long resourceBlockId, OrderByComparator orderByComparator)
          Returns the last resource block permission in the ordered set where resourceBlockId = ?.
static ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(long resourceBlockPermissionId, long resourceBlockId, OrderByComparator orderByComparator)
          Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = ?.
static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId)
          Returns all the resource block permissions where resourceBlockId = ?.
static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId, int start, int end)
          Returns a range of all the resource block permissions where resourceBlockId = ?.
static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource block permissions where resourceBlockId = ?.
static ResourceBlockPermission findByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first resource block permission in the ordered set where roleId = ?.
static ResourceBlockPermission findByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last resource block permission in the ordered set where roleId = ?.
static ResourceBlockPermission[] findByRoleId_PrevAndNext(long resourceBlockPermissionId, long roleId, OrderByComparator orderByComparator)
          Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = ?.
static List<ResourceBlockPermission> findByRoleId(long roleId)
          Returns all the resource block permissions where roleId = ?.
static List<ResourceBlockPermission> findByRoleId(long roleId, int start, int end)
          Returns a range of all the resource block permissions where roleId = ?.
static List<ResourceBlockPermission> findByRoleId(long roleId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource block permissions where roleId = ?.
static List<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ResourceBlockPermissionPersistence getPersistence()
           
static ResourceBlockPermission remove(long resourceBlockPermissionId)
          Removes the resource block permission with the primary key from the database.
static void removeAll()
          Removes all the resource block permissions from the database.
static ResourceBlockPermission removeByR_R(long resourceBlockId, long roleId)
          Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database.
static void removeByResourceBlockId(long resourceBlockId)
          Removes all the resource block permissions where resourceBlockId = ? from the database.
static void removeByRoleId(long roleId)
          Removes all the resource block permissions where roleId = ? from the database.
 void setPersistence(ResourceBlockPermissionPersistence persistence)
          Deprecated. As of 6.2.0
static ResourceBlockPermission update(ResourceBlockPermission resourceBlockPermission)
           
static ResourceBlockPermission update(ResourceBlockPermission resourceBlockPermission, ServiceContext serviceContext)
           
static ResourceBlockPermission updateImpl(ResourceBlockPermission resourceBlockPermission)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBlockPermissionUtil

public ResourceBlockPermissionUtil()
Method Detail

clearCache

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

clearCache

public static void clearCache(ResourceBlockPermission resourceBlockPermission)
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<ResourceBlockPermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                          throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

findByResourceBlockId

public static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId)
                                                           throws SystemException
Returns all the resource block permissions where resourceBlockId = ?.

Parameters:
resourceBlockId - the resource block ID
Returns:
the matching resource block permissions
Throws:
SystemException - if a system exception occurred

findByResourceBlockId

public static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId,
                                                                  int start,
                                                                  int end)
                                                           throws SystemException
Returns a range of all the resource block permissions where resourceBlockId = ?.

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 ResourceBlockPermissionModelImpl. 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:
resourceBlockId - the resource block ID
start - the lower bound of the range of resource block permissions
end - the upper bound of the range of resource block permissions (not inclusive)
Returns:
the range of matching resource block permissions
Throws:
SystemException - if a system exception occurred

findByResourceBlockId

public static List<ResourceBlockPermission> findByResourceBlockId(long resourceBlockId,
                                                                  int start,
                                                                  int end,
                                                                  OrderByComparator orderByComparator)
                                                           throws SystemException
Returns an ordered range of all the resource block permissions where resourceBlockId = ?.

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 ResourceBlockPermissionModelImpl. 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:
resourceBlockId - the resource block ID
start - the lower bound of the range of resource block permissions
end - the upper bound of the range of resource block permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching resource block permissions
Throws:
SystemException - if a system exception occurred

findByResourceBlockId_First

public static ResourceBlockPermission findByResourceBlockId_First(long resourceBlockId,
                                                                  OrderByComparator orderByComparator)
                                                           throws NoSuchResourceBlockPermissionException,
                                                                  SystemException
Returns the first resource block permission in the ordered set where resourceBlockId = ?.

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

fetchByResourceBlockId_First

public static ResourceBlockPermission fetchByResourceBlockId_First(long resourceBlockId,
                                                                   OrderByComparator orderByComparator)
                                                            throws SystemException
Returns the first resource block permission in the ordered set where resourceBlockId = ?.

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

findByResourceBlockId_Last

public static ResourceBlockPermission findByResourceBlockId_Last(long resourceBlockId,
                                                                 OrderByComparator orderByComparator)
                                                          throws NoSuchResourceBlockPermissionException,
                                                                 SystemException
Returns the last resource block permission in the ordered set where resourceBlockId = ?.

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

fetchByResourceBlockId_Last

public static ResourceBlockPermission fetchByResourceBlockId_Last(long resourceBlockId,
                                                                  OrderByComparator orderByComparator)
                                                           throws SystemException
Returns the last resource block permission in the ordered set where resourceBlockId = ?.

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

findByResourceBlockId_PrevAndNext

public static ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(long resourceBlockPermissionId,
                                                                          long resourceBlockId,
                                                                          OrderByComparator orderByComparator)
                                                                   throws NoSuchResourceBlockPermissionException,
                                                                          SystemException
Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = ?.

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

removeByResourceBlockId

public static void removeByResourceBlockId(long resourceBlockId)
                                    throws SystemException
Removes all the resource block permissions where resourceBlockId = ? from the database.

Parameters:
resourceBlockId - the resource block ID
Throws:
SystemException - if a system exception occurred

countByResourceBlockId

public static int countByResourceBlockId(long resourceBlockId)
                                  throws SystemException
Returns the number of resource block permissions where resourceBlockId = ?.

Parameters:
resourceBlockId - the resource block ID
Returns:
the number of matching resource block permissions
Throws:
SystemException - if a system exception occurred

findByRoleId

public static List<ResourceBlockPermission> findByRoleId(long roleId)
                                                  throws SystemException
Returns all the resource block permissions where roleId = ?.

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

findByRoleId

public static List<ResourceBlockPermission> findByRoleId(long roleId,
                                                         int start,
                                                         int end)
                                                  throws SystemException
Returns a range of all the resource block 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 ResourceBlockPermissionModelImpl. 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 block permissions
end - the upper bound of the range of resource block permissions (not inclusive)
Returns:
the range of matching resource block permissions
Throws:
SystemException - if a system exception occurred

findByRoleId

public static List<ResourceBlockPermission> findByRoleId(long roleId,
                                                         int start,
                                                         int end,
                                                         OrderByComparator orderByComparator)
                                                  throws SystemException
Returns an ordered range of all the resource block 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 ResourceBlockPermissionModelImpl. 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 block permissions
end - the upper bound of the range of resource block permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching resource block permissions
Throws:
SystemException - if a system exception occurred

findByRoleId_First

public static ResourceBlockPermission findByRoleId_First(long roleId,
                                                         OrderByComparator orderByComparator)
                                                  throws NoSuchResourceBlockPermissionException,
                                                         SystemException
Returns the first resource block 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 block permission
Throws:
NoSuchResourceBlockPermissionException - if a matching resource block permission could not be found
SystemException - if a system exception occurred

fetchByRoleId_First

public static ResourceBlockPermission fetchByRoleId_First(long roleId,
                                                          OrderByComparator orderByComparator)
                                                   throws SystemException
Returns the first resource block 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 block permission, or null if a matching resource block permission could not be found
Throws:
SystemException - if a system exception occurred

findByRoleId_Last

public static ResourceBlockPermission findByRoleId_Last(long roleId,
                                                        OrderByComparator orderByComparator)
                                                 throws NoSuchResourceBlockPermissionException,
                                                        SystemException
Returns the last resource block 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 block permission
Throws:
NoSuchResourceBlockPermissionException - if a matching resource block permission could not be found
SystemException - if a system exception occurred

fetchByRoleId_Last

public static ResourceBlockPermission fetchByRoleId_Last(long roleId,
                                                         OrderByComparator orderByComparator)
                                                  throws SystemException
Returns the last resource block 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 block permission, or null if a matching resource block permission could not be found
Throws:
SystemException - if a system exception occurred

findByRoleId_PrevAndNext

public static ResourceBlockPermission[] findByRoleId_PrevAndNext(long resourceBlockPermissionId,
                                                                 long roleId,
                                                                 OrderByComparator orderByComparator)
                                                          throws NoSuchResourceBlockPermissionException,
                                                                 SystemException
Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = ?.

Parameters:
resourceBlockPermissionId - the primary key of the current resource block permission
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next resource block permission
Throws:
NoSuchResourceBlockPermissionException - if a resource block 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 block 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 block permissions where roleId = ?.

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

findByR_R

public static ResourceBlockPermission findByR_R(long resourceBlockId,
                                                long roleId)
                                         throws NoSuchResourceBlockPermissionException,
                                                SystemException
Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a NoSuchResourceBlockPermissionException if it could not be found.

Parameters:
resourceBlockId - the resource block ID
roleId - the role ID
Returns:
the matching resource block permission
Throws:
NoSuchResourceBlockPermissionException - if a matching resource block permission could not be found
SystemException - if a system exception occurred

fetchByR_R

public static ResourceBlockPermission fetchByR_R(long resourceBlockId,
                                                 long roleId)
                                          throws SystemException
Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
resourceBlockId - the resource block ID
roleId - the role ID
Returns:
the matching resource block permission, or null if a matching resource block permission could not be found
Throws:
SystemException - if a system exception occurred

fetchByR_R

public static ResourceBlockPermission fetchByR_R(long resourceBlockId,
                                                 long roleId,
                                                 boolean retrieveFromCache)
                                          throws SystemException
Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
resourceBlockId - the resource block ID
roleId - the role ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching resource block permission, or null if a matching resource block permission could not be found
Throws:
SystemException - if a system exception occurred

removeByR_R

public static ResourceBlockPermission removeByR_R(long resourceBlockId,
                                                  long roleId)
                                           throws NoSuchResourceBlockPermissionException,
                                                  SystemException
Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database.

Parameters:
resourceBlockId - the resource block ID
roleId - the role ID
Returns:
the resource block permission that was removed
Throws:
SystemException - if a system exception occurred
NoSuchResourceBlockPermissionException

countByR_R

public static int countByR_R(long resourceBlockId,
                             long roleId)
                      throws SystemException
Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?.

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

cacheResult

public static void cacheResult(ResourceBlockPermission resourceBlockPermission)
Caches the resource block permission in the entity cache if it is enabled.

Parameters:
resourceBlockPermission - the resource block permission

cacheResult

public static void cacheResult(List<ResourceBlockPermission> resourceBlockPermissions)
Caches the resource block permissions in the entity cache if it is enabled.

Parameters:
resourceBlockPermissions - the resource block permissions

create

public static ResourceBlockPermission create(long resourceBlockPermissionId)
Creates a new resource block permission with the primary key. Does not add the resource block permission to the database.

Parameters:
resourceBlockPermissionId - the primary key for the new resource block permission
Returns:
the new resource block permission

remove

public static ResourceBlockPermission remove(long resourceBlockPermissionId)
                                      throws NoSuchResourceBlockPermissionException,
                                             SystemException
Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners.

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

updateImpl

public static ResourceBlockPermission updateImpl(ResourceBlockPermission resourceBlockPermission)
                                          throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ResourceBlockPermission findByPrimaryKey(long resourceBlockPermissionId)
                                                throws NoSuchResourceBlockPermissionException,
                                                       SystemException
Returns the resource block permission with the primary key or throws a NoSuchResourceBlockPermissionException if it could not be found.

Parameters:
resourceBlockPermissionId - the primary key of the resource block permission
Returns:
the resource block permission
Throws:
NoSuchResourceBlockPermissionException - if a resource block permission with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ResourceBlockPermission fetchByPrimaryKey(long resourceBlockPermissionId)
                                                 throws SystemException
Returns the resource block permission with the primary key or returns null if it could not be found.

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

findAll

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

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

findAll

public static List<ResourceBlockPermission> findAll(int start,
                                                    int end)
                                             throws SystemException
Returns a range of all the resource block 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 ResourceBlockPermissionModelImpl. 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 block permissions
end - the upper bound of the range of resource block permissions (not inclusive)
Returns:
the range of resource block permissions
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceBlockPermission> findAll(int start,
                                                    int end,
                                                    OrderByComparator orderByComparator)
                                             throws SystemException
Returns an ordered range of all the resource block 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 ResourceBlockPermissionModelImpl. 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 block permissions
end - the upper bound of the range of resource block permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of resource block permissions
Throws:
SystemException - if a system exception occurred

removeAll

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

Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of resource block permissions.

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

getPersistence

public static ResourceBlockPermissionPersistence getPersistence()

setPersistence

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


Liferay 6.2-ce-ga5