Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Interface ResourceBlockPersistence

All Superinterfaces:
BasePersistence<ResourceBlock>
All Known Implementing Classes:
ResourceBlockPersistenceImpl

public interface ResourceBlockPersistence
extends BasePersistence<ResourceBlock>

The persistence interface for the resource block service.

Caching information and settings can be found in portal.properties

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

Method Summary
 void cacheResult(List<ResourceBlock> resourceBlocks)
          Caches the resource blocks in the entity cache if it is enabled.
 void cacheResult(ResourceBlock resourceBlock)
          Caches the resource block in the entity cache if it is enabled.
 int countAll()
          Returns the number of resource blocks.
 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 = ?.
 int countByC_G_N(long companyId, long groupId, String name)
          Returns the number of resource blocks where companyId = ? and groupId = ? and name = ?.
 int countByC_N(long companyId, String name)
          Returns the number of resource blocks where companyId = ? and name = ?.
 ResourceBlock create(long resourceBlockId)
          Creates a new resource block with the primary key.
 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 = ?.
 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 = ?.
 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.
 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.
 ResourceBlock fetchByC_N_First(long companyId, String name, OrderByComparator orderByComparator)
          Returns the first resource block in the ordered set where companyId = ? and name = ?.
 ResourceBlock fetchByC_N_Last(long companyId, String name, OrderByComparator orderByComparator)
          Returns the last resource block in the ordered set where companyId = ? and name = ?.
 ResourceBlock fetchByPrimaryKey(long resourceBlockId)
          Returns the resource block with the primary key or returns null if it could not be found.
 List<ResourceBlock> findAll()
          Returns all the resource blocks.
 List<ResourceBlock> findAll(int start, int end)
          Returns a range of all the resource blocks.
 List<ResourceBlock> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the resource blocks.
 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 = ?.
 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 = ?.
 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.
 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 = ?.
 List<ResourceBlock> findByC_G_N(long companyId, long groupId, String name)
          Returns all the resource blocks where companyId = ? and groupId = ? and name = ?.
 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 = ?.
 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 = ?.
 ResourceBlock findByC_N_First(long companyId, String name, OrderByComparator orderByComparator)
          Returns the first resource block in the ordered set where companyId = ? and name = ?.
 ResourceBlock findByC_N_Last(long companyId, String name, OrderByComparator orderByComparator)
          Returns the last resource block in the ordered set where companyId = ? and name = ?.
 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 = ?.
 List<ResourceBlock> findByC_N(long companyId, String name)
          Returns all the resource blocks where companyId = ? and name = ?.
 List<ResourceBlock> findByC_N(long companyId, String name, int start, int end)
          Returns a range of all the resource blocks where companyId = ? and name = ?.
 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 = ?.
 ResourceBlock findByPrimaryKey(long resourceBlockId)
          Returns the resource block with the primary key or throws a NoSuchResourceBlockException if it could not be found.
 ResourceBlock remove(long resourceBlockId)
          Removes the resource block with the primary key from the database.
 void removeAll()
          Removes all the resource blocks from the database.
 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.
 void removeByC_G_N(long companyId, long groupId, String name)
          Removes all the resource blocks where companyId = ? and groupId = ? and name = ? from the database.
 void removeByC_N(long companyId, String name)
          Removes all the resource blocks where companyId = ? and name = ? from the database.
 ResourceBlock updateImpl(ResourceBlock resourceBlock, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

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

Parameters:
resourceBlock - the resource block

cacheResult

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

Parameters:
resourceBlocks - the resource blocks

create

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

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

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

findByPrimaryKey

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

findAll

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

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

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

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

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

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

Throws:
SystemException - if a system exception occurred

countByC_N

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

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

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

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

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

Liferay 6.1.2-ce-ga3