Liferay 6.0.5

com.liferay.portal.service.persistence
Interface ResourceCodePersistence

All Superinterfaces:
BasePersistence<ResourceCode>
All Known Implementing Classes:
ResourceCodePersistenceImpl

public interface ResourceCodePersistence
extends BasePersistence<ResourceCode>

The persistence interface for the resource code service.

Never modify or reference this interface directly. Always use ResourceCodeUtil to access the resource code persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface.

Caching information and settings can be found in portal.properties

See Also:
ResourceCodePersistenceImpl, ResourceCodeUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Method Summary
 void cacheResult(List<ResourceCode> resourceCodes)
          Caches the resource codes in the entity cache if it is enabled.
 void cacheResult(ResourceCode resourceCode)
          Caches the resource code in the entity cache if it is enabled.
 int countAll()
          Counts all the resource codes.
 int countByC_N_S(long companyId, String name, int scope)
          Counts all the resource codes where companyId = ? and name = ? and scope = ?.
 int countByCompanyId(long companyId)
          Counts all the resource codes where companyId = ?.
 int countByName(String name)
          Counts all the resource codes where name = ?.
 ResourceCode create(long codeId)
          Creates a new resource code with the primary key.
 ResourceCode fetchByC_N_S(long companyId, String name, int scope)
          Finds the resource code where companyId = ? and name = ? and scope = ? or returns null if it could not be found.
 ResourceCode fetchByC_N_S(long companyId, String name, int scope, boolean retrieveFromCache)
          Finds the resource code where companyId = ? and name = ? and scope = ? or returns null if it could not be found, optionally using the finder cache.
 ResourceCode fetchByPrimaryKey(long codeId)
          Finds the resource code with the primary key or returns null if it could not be found.
 List<ResourceCode> findAll()
          Finds all the resource codes.
 List<ResourceCode> findAll(int start, int end)
          Finds a range of all the resource codes.
 List<ResourceCode> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the resource codes.
 ResourceCode findByC_N_S(long companyId, String name, int scope)
          Finds the resource code where companyId = ? and name = ? and scope = ? or throws a NoSuchResourceCodeException if it could not be found.
 ResourceCode findByCompanyId_First(long companyId, OrderByComparator orderByComparator)
          Finds the first resource code in the ordered set where companyId = ?.
 ResourceCode findByCompanyId_Last(long companyId, OrderByComparator orderByComparator)
          Finds the last resource code in the ordered set where companyId = ?.
 ResourceCode[] findByCompanyId_PrevAndNext(long codeId, long companyId, OrderByComparator orderByComparator)
          Finds the resource codes before and after the current resource code in the ordered set where companyId = ?.
 List<ResourceCode> findByCompanyId(long companyId)
          Finds all the resource codes where companyId = ?.
 List<ResourceCode> findByCompanyId(long companyId, int start, int end)
          Finds a range of all the resource codes where companyId = ?.
 List<ResourceCode> findByCompanyId(long companyId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the resource codes where companyId = ?.
 ResourceCode findByName_First(String name, OrderByComparator orderByComparator)
          Finds the first resource code in the ordered set where name = ?.
 ResourceCode findByName_Last(String name, OrderByComparator orderByComparator)
          Finds the last resource code in the ordered set where name = ?.
 ResourceCode[] findByName_PrevAndNext(long codeId, String name, OrderByComparator orderByComparator)
          Finds the resource codes before and after the current resource code in the ordered set where name = ?.
 List<ResourceCode> findByName(String name)
          Finds all the resource codes where name = ?.
 List<ResourceCode> findByName(String name, int start, int end)
          Finds a range of all the resource codes where name = ?.
 List<ResourceCode> findByName(String name, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the resource codes where name = ?.
 ResourceCode findByPrimaryKey(long codeId)
          Finds the resource code with the primary key or throws a NoSuchResourceCodeException if it could not be found.
 ResourceCode remove(long codeId)
          Removes the resource code with the primary key from the database.
 void removeAll()
          Removes all the resource codes from the database.
 void removeByC_N_S(long companyId, String name, int scope)
          Removes the resource code where companyId = ? and name = ? and scope = ? from the database.
 void removeByCompanyId(long companyId)
          Removes all the resource codes where companyId = ? from the database.
 void removeByName(String name)
          Removes all the resource codes where name = ? from the database.
 ResourceCode updateImpl(ResourceCode resourceCode, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(ResourceCode resourceCode)
Caches the resource code in the entity cache if it is enabled.

Parameters:
resourceCode - the resource code to cache

cacheResult

void cacheResult(List<ResourceCode> resourceCodes)
Caches the resource codes in the entity cache if it is enabled.

Parameters:
resourceCodes - the resource codes to cache

create

ResourceCode create(long codeId)
Creates a new resource code with the primary key. Does not add the resource code to the database.

Parameters:
codeId - the primary key for the new resource code
Returns:
the new resource code

remove

ResourceCode remove(long codeId)
                    throws NoSuchResourceCodeException,
                           SystemException
Removes the resource code with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
codeId - the primary key of the resource code to remove
Returns:
the resource code that was removed
Throws:
NoSuchResourceCodeException - if a resource code with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

ResourceCode updateImpl(ResourceCode resourceCode,
                        boolean merge)
                        throws SystemException
Throws:
SystemException

findByPrimaryKey

ResourceCode findByPrimaryKey(long codeId)
                              throws NoSuchResourceCodeException,
                                     SystemException
Finds the resource code with the primary key or throws a NoSuchResourceCodeException if it could not be found.

Parameters:
codeId - the primary key of the resource code to find
Returns:
the resource code
Throws:
NoSuchResourceCodeException - if a resource code with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

ResourceCode fetchByPrimaryKey(long codeId)
                               throws SystemException
Finds the resource code with the primary key or returns null if it could not be found.

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

findByCompanyId

List<ResourceCode> findByCompanyId(long companyId)
                                   throws SystemException
Finds all the resource codes where companyId = ?.

Parameters:
companyId - the company id to search with
Returns:
the matching resource codes
Throws:
SystemException - if a system exception occurred

findByCompanyId

List<ResourceCode> findByCompanyId(long companyId,
                                   int start,
                                   int end)
                                   throws SystemException
Finds a range of all the resource codes where companyId = ?.

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

findByCompanyId

List<ResourceCode> findByCompanyId(long companyId,
                                   int start,
                                   int end,
                                   OrderByComparator orderByComparator)
                                   throws SystemException
Finds an ordered range of all the resource codes where companyId = ?.

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

findByCompanyId_First

ResourceCode findByCompanyId_First(long companyId,
                                   OrderByComparator orderByComparator)
                                   throws NoSuchResourceCodeException,
                                          SystemException
Finds the first resource code in the ordered set where companyId = ?.

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 to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching resource code
Throws:
NoSuchResourceCodeException - if a matching resource code could not be found
SystemException - if a system exception occurred

findByCompanyId_Last

ResourceCode findByCompanyId_Last(long companyId,
                                  OrderByComparator orderByComparator)
                                  throws NoSuchResourceCodeException,
                                         SystemException
Finds the last resource code in the ordered set where companyId = ?.

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 to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching resource code
Throws:
NoSuchResourceCodeException - if a matching resource code could not be found
SystemException - if a system exception occurred

findByCompanyId_PrevAndNext

ResourceCode[] findByCompanyId_PrevAndNext(long codeId,
                                           long companyId,
                                           OrderByComparator orderByComparator)
                                           throws NoSuchResourceCodeException,
                                                  SystemException
Finds the resource codes before and after the current resource code in the ordered set where companyId = ?.

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:
codeId - the primary key of the current resource code
companyId - the company id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next resource code
Throws:
NoSuchResourceCodeException - if a resource code with the primary key could not be found
SystemException - if a system exception occurred

findByName

List<ResourceCode> findByName(String name)
                              throws SystemException
Finds all the resource codes where name = ?.

Parameters:
name - the name to search with
Returns:
the matching resource codes
Throws:
SystemException - if a system exception occurred

findByName

List<ResourceCode> findByName(String name,
                              int start,
                              int end)
                              throws SystemException
Finds a range of all the resource codes where 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:
name - the name to search with
start - the lower bound of the range of resource codes to return
end - the upper bound of the range of resource codes to return (not inclusive)
Returns:
the range of matching resource codes
Throws:
SystemException - if a system exception occurred

findByName

List<ResourceCode> findByName(String name,
                              int start,
                              int end,
                              OrderByComparator orderByComparator)
                              throws SystemException
Finds an ordered range of all the resource codes where 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:
name - the name to search with
start - the lower bound of the range of resource codes to return
end - the upper bound of the range of resource codes to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching resource codes
Throws:
SystemException - if a system exception occurred

findByName_First

ResourceCode findByName_First(String name,
                              OrderByComparator orderByComparator)
                              throws NoSuchResourceCodeException,
                                     SystemException
Finds the first resource code in the ordered set where 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:
name - the name to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching resource code
Throws:
NoSuchResourceCodeException - if a matching resource code could not be found
SystemException - if a system exception occurred

findByName_Last

ResourceCode findByName_Last(String name,
                             OrderByComparator orderByComparator)
                             throws NoSuchResourceCodeException,
                                    SystemException
Finds the last resource code in the ordered set where 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:
name - the name to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching resource code
Throws:
NoSuchResourceCodeException - if a matching resource code could not be found
SystemException - if a system exception occurred

findByName_PrevAndNext

ResourceCode[] findByName_PrevAndNext(long codeId,
                                      String name,
                                      OrderByComparator orderByComparator)
                                      throws NoSuchResourceCodeException,
                                             SystemException
Finds the resource codes before and after the current resource code in the ordered set where 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:
codeId - the primary key of the current resource code
name - the name to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next resource code
Throws:
NoSuchResourceCodeException - if a resource code with the primary key could not be found
SystemException - if a system exception occurred

findByC_N_S

ResourceCode findByC_N_S(long companyId,
                         String name,
                         int scope)
                         throws NoSuchResourceCodeException,
                                SystemException
Finds the resource code where companyId = ? and name = ? and scope = ? or throws a NoSuchResourceCodeException if it could not be found.

Parameters:
companyId - the company id to search with
name - the name to search with
scope - the scope to search with
Returns:
the matching resource code
Throws:
NoSuchResourceCodeException - if a matching resource code could not be found
SystemException - if a system exception occurred

fetchByC_N_S

ResourceCode fetchByC_N_S(long companyId,
                          String name,
                          int scope)
                          throws SystemException
Finds the resource code where companyId = ? and name = ? and scope = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
name - the name to search with
scope - the scope to search with
Returns:
the matching resource code, or null if a matching resource code could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_N_S

ResourceCode fetchByC_N_S(long companyId,
                          String name,
                          int scope,
                          boolean retrieveFromCache)
                          throws SystemException
Finds the resource code where companyId = ? and name = ? and scope = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
name - the name to search with
scope - the scope to search with
Returns:
the matching resource code, or null if a matching resource code could not be found
Throws:
SystemException - if a system exception occurred

findAll

List<ResourceCode> findAll()
                           throws SystemException
Finds all the resource codes.

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

findAll

List<ResourceCode> findAll(int start,
                           int end)
                           throws SystemException
Finds a range of all the resource codes.

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

findAll

List<ResourceCode> findAll(int start,
                           int end,
                           OrderByComparator orderByComparator)
                           throws SystemException
Finds an ordered range of all the resource codes.

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

removeByCompanyId

void removeByCompanyId(long companyId)
                       throws SystemException
Removes all the resource codes where companyId = ? from the database.

Parameters:
companyId - the company id to search with
Throws:
SystemException - if a system exception occurred

removeByName

void removeByName(String name)
                  throws SystemException
Removes all the resource codes where name = ? from the database.

Parameters:
name - the name to search with
Throws:
SystemException - if a system exception occurred

removeByC_N_S

void removeByC_N_S(long companyId,
                   String name,
                   int scope)
                   throws NoSuchResourceCodeException,
                          SystemException
Removes the resource code where companyId = ? and name = ? and scope = ? from the database.

Parameters:
companyId - the company id to search with
name - the name to search with
scope - the scope to search with
Throws:
SystemException - if a system exception occurred
NoSuchResourceCodeException

removeAll

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

Throws:
SystemException - if a system exception occurred

countByCompanyId

int countByCompanyId(long companyId)
                     throws SystemException
Counts all the resource codes where companyId = ?.

Parameters:
companyId - the company id to search with
Returns:
the number of matching resource codes
Throws:
SystemException - if a system exception occurred

countByName

int countByName(String name)
                throws SystemException
Counts all the resource codes where name = ?.

Parameters:
name - the name to search with
Returns:
the number of matching resource codes
Throws:
SystemException - if a system exception occurred

countByC_N_S

int countByC_N_S(long companyId,
                 String name,
                 int scope)
                 throws SystemException
Counts all the resource codes where companyId = ? and name = ? and scope = ?.

Parameters:
companyId - the company id to search with
name - the name to search with
scope - the scope to search with
Returns:
the number of matching resource codes
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Counts all the resource codes.

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

Liferay 6.0.5