Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Class ResourceBlockUtil

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

public class ResourceBlockUtil
extends Object

The persistence utility for the resource block service. This utility wraps ResourceBlockPersistenceImpl 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:
ResourceBlockPersistence, ResourceBlockPersistenceImpl

Constructor Summary
ResourceBlockUtil()
           
 
Method Summary
static void cacheResult(List<ResourceBlock> resourceBlocks)
          Caches the resource blocks in the entity cache if it is enabled.
static void cacheResult(ResourceBlock resourceBlock)
          Caches the resource block in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ResourceBlock resourceBlock)
           
static int countAll()
          Returns the number of resource blocks.
static int countByC_G_N_P(long companyId, long groupId, String name, String permissionsHash)
          Returns the number of resource blocks where companyId = ? and groupId = ? and name = ? and permissionsHash = ?.
static int countByC_G_N(long companyId, long groupId, String name)
          Returns the number of resource blocks where companyId = ? and groupId = ? and name = ?.
static int countByC_N(long companyId, String name)
          Returns the number of resource blocks where companyId = ? and name = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ResourceBlock create(long resourceBlockId)
          Creates a new resource block with the primary key.
static ResourceBlock fetchByC_G_N_First(long companyId, long groupId, String name, OrderByComparator orderByComparator)
          Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
static ResourceBlock fetchByC_G_N_Last(long companyId, long groupId, String name, OrderByComparator orderByComparator)
          Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
static ResourceBlock fetchByC_G_N_P(long companyId, long groupId, String name, String permissionsHash)
          Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or returns null if it could not be found.
static ResourceBlock fetchByC_G_N_P(long companyId, long groupId, String name, String permissionsHash, boolean retrieveFromCache)
          Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or returns null if it could not be found, optionally using the finder cache.
static ResourceBlock fetchByC_N_First(long companyId, String name, OrderByComparator orderByComparator)
          Returns the first resource block in the ordered set where companyId = ? and name = ?.
static ResourceBlock fetchByC_N_Last(long companyId, String name, OrderByComparator orderByComparator)
          Returns the last resource block in the ordered set where companyId = ? and name = ?.
static ResourceBlock fetchByPrimaryKey(long resourceBlockId)
          Returns the resource block with the primary key or returns null if it could not be found.
static List<ResourceBlock> findAll()
          Returns all the resource blocks.
static List<ResourceBlock> findAll(int start, int end)
          Returns a range of all the resource blocks.
static List<ResourceBlock> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource blocks.
static ResourceBlock findByC_G_N_First(long companyId, long groupId, String name, OrderByComparator orderByComparator)
          Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
static ResourceBlock findByC_G_N_Last(long companyId, long groupId, String name, OrderByComparator orderByComparator)
          Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
static ResourceBlock findByC_G_N_P(long companyId, long groupId, String name, String permissionsHash)
          Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or throws a NoSuchResourceBlockException if it could not be found.
static ResourceBlock[] findByC_G_N_PrevAndNext(long resourceBlockId, long companyId, long groupId, String name, OrderByComparator orderByComparator)
          Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and groupId = ? and name = ?.
static List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name)
          Returns all the resource blocks where companyId = ? and groupId = ? and name = ?.
static List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, int start, int end)
          Returns a range of all the resource blocks where companyId = ? and groupId = ? and name = ?.
static List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?.
static ResourceBlock findByC_N_First(long companyId, String name, OrderByComparator orderByComparator)
          Returns the first resource block in the ordered set where companyId = ? and name = ?.
static ResourceBlock findByC_N_Last(long companyId, String name, OrderByComparator orderByComparator)
          Returns the last resource block in the ordered set where companyId = ? and name = ?.
static ResourceBlock[] findByC_N_PrevAndNext(long resourceBlockId, long companyId, String name, OrderByComparator orderByComparator)
          Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and name = ?.
static List<ResourceBlock> findByC_N(long companyId, String name)
          Returns all the resource blocks where companyId = ? and name = ?.
static List<ResourceBlock> findByC_N(long companyId, String name, int start, int end)
          Returns a range of all the resource blocks where companyId = ? and name = ?.
static List<ResourceBlock> findByC_N(long companyId, String name, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource blocks where companyId = ? and name = ?.
static ResourceBlock findByPrimaryKey(long resourceBlockId)
          Returns the resource block with the primary key or throws a NoSuchResourceBlockException if it could not be found.
static List<ResourceBlock> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ResourceBlock> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ResourceBlock> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ResourceBlockPersistence getPersistence()
           
static ResourceBlock remove(long resourceBlockId)
          Removes the resource block with the primary key from the database.
static void removeAll()
          Removes all the resource blocks from the database.
static ResourceBlock removeByC_G_N_P(long companyId, long groupId, String name, String permissionsHash)
          Removes the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? from the database.
static void removeByC_G_N(long companyId, long groupId, String name)
          Removes all the resource blocks where companyId = ? and groupId = ? and name = ? from the database.
static void removeByC_N(long companyId, String name)
          Removes all the resource blocks where companyId = ? and name = ? from the database.
 void setPersistence(ResourceBlockPersistence persistence)
          Deprecated.  
static ResourceBlock update(ResourceBlock resourceBlock, boolean merge)
           
static ResourceBlock update(ResourceBlock resourceBlock, boolean merge, ServiceContext serviceContext)
           
static ResourceBlock updateImpl(ResourceBlock resourceBlock, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBlockUtil

public ResourceBlockUtil()
Method Detail

clearCache

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

clearCache

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

countWithDynamicQuery

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

findWithDynamicQuery

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

findWithDynamicQuery

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

findWithDynamicQuery

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

update

public static ResourceBlock update(ResourceBlock resourceBlock,
                                   boolean merge)
                            throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)

update

public static ResourceBlock update(ResourceBlock resourceBlock,
                                   boolean merge,
                                   ServiceContext serviceContext)
                            throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)

cacheResult

public static void cacheResult(ResourceBlock resourceBlock)
Caches the resource block in the entity cache if it is enabled.

Parameters:
resourceBlock - the resource block

cacheResult

public static void cacheResult(List<ResourceBlock> resourceBlocks)
Caches the resource blocks in the entity cache if it is enabled.

Parameters:
resourceBlocks - the resource blocks

create

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

Parameters:
resourceBlockId - the primary key for the new resource block
Returns:
the new resource block

remove

public static ResourceBlock remove(long resourceBlockId)
                            throws NoSuchResourceBlockException,
                                   SystemException
Removes the resource block with the primary key from the database. Also notifies the appropriate model listeners.

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

updateImpl

public static ResourceBlock updateImpl(ResourceBlock resourceBlock,
                                       boolean merge)
                                throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ResourceBlock findByPrimaryKey(long resourceBlockId)
                                      throws NoSuchResourceBlockException,
                                             SystemException
Returns the resource block with the primary key or throws a NoSuchResourceBlockException if it could not be found.

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

fetchByPrimaryKey

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

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

findByC_N

public static List<ResourceBlock> findByC_N(long companyId,
                                            String name)
                                     throws SystemException
Returns all the resource blocks where companyId = ? and name = ?.

Parameters:
companyId - the company ID
name - the name
Returns:
the matching resource blocks
Throws:
SystemException - if a system exception occurred

findByC_N

public static List<ResourceBlock> findByC_N(long companyId,
                                            String name,
                                            int start,
                                            int end)
                                     throws SystemException
Returns a range of all the resource blocks where companyId = ? and name = ?.

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

findByC_N

public static List<ResourceBlock> findByC_N(long companyId,
                                            String name,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns an ordered range of all the resource blocks where companyId = ? and name = ?.

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

findByC_N_First

public static ResourceBlock findByC_N_First(long companyId,
                                            String name,
                                            OrderByComparator orderByComparator)
                                     throws NoSuchResourceBlockException,
                                            SystemException
Returns the first resource block in the ordered set where companyId = ? and name = ?.

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

fetchByC_N_First

public static ResourceBlock fetchByC_N_First(long companyId,
                                             String name,
                                             OrderByComparator orderByComparator)
                                      throws SystemException
Returns the first resource block in the ordered set where companyId = ? and name = ?.

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

findByC_N_Last

public static ResourceBlock findByC_N_Last(long companyId,
                                           String name,
                                           OrderByComparator orderByComparator)
                                    throws NoSuchResourceBlockException,
                                           SystemException
Returns the last resource block in the ordered set where companyId = ? and name = ?.

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

fetchByC_N_Last

public static ResourceBlock fetchByC_N_Last(long companyId,
                                            String name,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns the last resource block in the ordered set where companyId = ? and name = ?.

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

findByC_N_PrevAndNext

public static ResourceBlock[] findByC_N_PrevAndNext(long resourceBlockId,
                                                    long companyId,
                                                    String name,
                                                    OrderByComparator orderByComparator)
                                             throws NoSuchResourceBlockException,
                                                    SystemException
Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and name = ?.

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

findByC_G_N

public static List<ResourceBlock> findByC_G_N(long companyId,
                                              long groupId,
                                              String name)
                                       throws SystemException
Returns all the resource blocks where companyId = ? and groupId = ? and name = ?.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
Returns:
the matching resource blocks
Throws:
SystemException - if a system exception occurred

findByC_G_N

public static List<ResourceBlock> findByC_G_N(long companyId,
                                              long groupId,
                                              String name,
                                              int start,
                                              int end)
                                       throws SystemException
Returns a range of all the resource blocks where companyId = ? and groupId = ? and name = ?.

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
groupId - the group ID
name - the name
start - the lower bound of the range of resource blocks
end - the upper bound of the range of resource blocks (not inclusive)
Returns:
the range of matching resource blocks
Throws:
SystemException - if a system exception occurred

findByC_G_N

public static List<ResourceBlock> findByC_G_N(long companyId,
                                              long groupId,
                                              String name,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns an ordered range of all the resource blocks where companyId = ? and groupId = ? and name = ?.

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

findByC_G_N_First

public static ResourceBlock findByC_G_N_First(long companyId,
                                              long groupId,
                                              String name,
                                              OrderByComparator orderByComparator)
                                       throws NoSuchResourceBlockException,
                                              SystemException
Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching resource block
Throws:
NoSuchResourceBlockException - if a matching resource block could not be found
SystemException - if a system exception occurred

fetchByC_G_N_First

public static ResourceBlock fetchByC_G_N_First(long companyId,
                                               long groupId,
                                               String name,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the first resource block in the ordered set where companyId = ? and groupId = ? and name = ?.

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

findByC_G_N_Last

public static ResourceBlock findByC_G_N_Last(long companyId,
                                             long groupId,
                                             String name,
                                             OrderByComparator orderByComparator)
                                      throws NoSuchResourceBlockException,
                                             SystemException
Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching resource block
Throws:
NoSuchResourceBlockException - if a matching resource block could not be found
SystemException - if a system exception occurred

fetchByC_G_N_Last

public static ResourceBlock fetchByC_G_N_Last(long companyId,
                                              long groupId,
                                              String name,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns the last resource block in the ordered set where companyId = ? and groupId = ? and name = ?.

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

findByC_G_N_PrevAndNext

public static ResourceBlock[] findByC_G_N_PrevAndNext(long resourceBlockId,
                                                      long companyId,
                                                      long groupId,
                                                      String name,
                                                      OrderByComparator orderByComparator)
                                               throws NoSuchResourceBlockException,
                                                      SystemException
Returns the resource blocks before and after the current resource block in the ordered set where companyId = ? and groupId = ? and name = ?.

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

findByC_G_N_P

public static ResourceBlock findByC_G_N_P(long companyId,
                                          long groupId,
                                          String name,
                                          String permissionsHash)
                                   throws NoSuchResourceBlockException,
                                          SystemException
Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? or throws a NoSuchResourceBlockException if it could not be found.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
permissionsHash - the permissions hash
Returns:
the matching resource block
Throws:
NoSuchResourceBlockException - if a matching resource block could not be found
SystemException - if a system exception occurred

fetchByC_G_N_P

public static ResourceBlock fetchByC_G_N_P(long companyId,
                                           long groupId,
                                           String name,
                                           String permissionsHash)
                                    throws SystemException
Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? 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
permissionsHash - the permissions hash
Returns:
the matching resource block, or null if a matching resource block could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_G_N_P

public static ResourceBlock fetchByC_G_N_P(long companyId,
                                           long groupId,
                                           String name,
                                           String permissionsHash,
                                           boolean retrieveFromCache)
                                    throws SystemException
Returns the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? 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
permissionsHash - the permissions hash
retrieveFromCache - whether to use the finder cache
Returns:
the matching resource block, or null if a matching resource block could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceBlock> findAll()
                                   throws SystemException
Returns all the resource blocks.

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

findAll

public static List<ResourceBlock> findAll(int start,
                                          int end)
                                   throws SystemException
Returns a range of all the resource blocks.

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 blocks
end - the upper bound of the range of resource blocks (not inclusive)
Returns:
the range of resource blocks
Throws:
SystemException - if a system exception occurred

findAll

public static List<ResourceBlock> findAll(int start,
                                          int end,
                                          OrderByComparator orderByComparator)
                                   throws SystemException
Returns an ordered range of all the resource blocks.

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 blocks
end - the upper bound of the range of resource blocks (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of resource blocks
Throws:
SystemException - if a system exception occurred

removeByC_N

public static void removeByC_N(long companyId,
                               String name)
                        throws SystemException
Removes all the resource blocks where companyId = ? and name = ? from the database.

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

removeByC_G_N

public static void removeByC_G_N(long companyId,
                                 long groupId,
                                 String name)
                          throws SystemException
Removes all the resource blocks where companyId = ? and groupId = ? and name = ? from the database.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
Throws:
SystemException - if a system exception occurred

removeByC_G_N_P

public static ResourceBlock removeByC_G_N_P(long companyId,
                                            long groupId,
                                            String name,
                                            String permissionsHash)
                                     throws NoSuchResourceBlockException,
                                            SystemException
Removes the resource block where companyId = ? and groupId = ? and name = ? and permissionsHash = ? from the database.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
permissionsHash - the permissions hash
Returns:
the resource block that was removed
Throws:
SystemException - if a system exception occurred
NoSuchResourceBlockException

removeAll

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

Throws:
SystemException - if a system exception occurred

countByC_N

public static int countByC_N(long companyId,
                             String name)
                      throws SystemException
Returns the number of resource blocks where companyId = ? and name = ?.

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

countByC_G_N

public static int countByC_G_N(long companyId,
                               long groupId,
                               String name)
                        throws SystemException
Returns the number of resource blocks where companyId = ? and groupId = ? and name = ?.

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

countByC_G_N_P

public static int countByC_G_N_P(long companyId,
                                 long groupId,
                                 String name,
                                 String permissionsHash)
                          throws SystemException
Returns the number of resource blocks where companyId = ? and groupId = ? and name = ? and permissionsHash = ?.

Parameters:
companyId - the company ID
groupId - the group ID
name - the name
permissionsHash - the permissions hash
Returns:
the number of matching resource blocks
Throws:
SystemException - if a system exception occurred

countAll

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

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

getPersistence

public static ResourceBlockPersistence getPersistence()

setPersistence

public void setPersistence(ResourceBlockPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3