|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourcePersistence
The persistence interface for the resource service.
Caching information and settings can be found in portal.properties
ResourcePersistenceImpl
,
ResourceUtil
Method Summary | |
---|---|
void |
cacheResult(List<Resource> resources)
Caches the resources in the entity cache if it is enabled. |
void |
cacheResult(Resource resource)
Caches the resource in the entity cache if it is enabled. |
int |
countAll()
Returns the number of resources. |
int |
countByC_P(long codeId,
String primKey)
Returns the number of resources where codeId = ? and primKey = ?. |
int |
countByCodeId(long codeId)
Returns the number of resources where codeId = ?. |
int |
countByPrimKey(String primKey)
Returns the number of resources where primKey = ?. |
Resource |
create(long resourceId)
Creates a new resource with the primary key. |
Resource |
fetchByC_P(long codeId,
String primKey)
Returns the resource where codeId = ? and primKey = ? or returns null if it could not be found. |
Resource |
fetchByC_P(long codeId,
String primKey,
boolean retrieveFromCache)
Returns the resource where codeId = ? and primKey = ? or returns null if it could not be found, optionally using the finder cache. |
Resource |
fetchByCodeId_First(long codeId,
OrderByComparator orderByComparator)
Returns the first resource in the ordered set where codeId = ?. |
Resource |
fetchByCodeId_Last(long codeId,
OrderByComparator orderByComparator)
Returns the last resource in the ordered set where codeId = ?. |
Resource |
fetchByPrimaryKey(long resourceId)
Returns the resource with the primary key or returns null if it could not be found. |
Resource |
fetchByPrimKey_First(String primKey,
OrderByComparator orderByComparator)
Returns the first resource in the ordered set where primKey = ?. |
Resource |
fetchByPrimKey_Last(String primKey,
OrderByComparator orderByComparator)
Returns the last resource in the ordered set where primKey = ?. |
List<Resource> |
findAll()
Returns all the resources. |
List<Resource> |
findAll(int start,
int end)
Returns a range of all the resources. |
List<Resource> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the resources. |
Resource |
findByC_P(long codeId,
String primKey)
Returns the resource where codeId = ? and primKey = ? or throws a NoSuchResourceException if it could not be found. |
Resource |
findByCodeId_First(long codeId,
OrderByComparator orderByComparator)
Returns the first resource in the ordered set where codeId = ?. |
Resource |
findByCodeId_Last(long codeId,
OrderByComparator orderByComparator)
Returns the last resource in the ordered set where codeId = ?. |
Resource[] |
findByCodeId_PrevAndNext(long resourceId,
long codeId,
OrderByComparator orderByComparator)
Returns the resources before and after the current resource in the ordered set where codeId = ?. |
List<Resource> |
findByCodeId(long codeId)
Returns all the resources where codeId = ?. |
List<Resource> |
findByCodeId(long codeId,
int start,
int end)
Returns a range of all the resources where codeId = ?. |
List<Resource> |
findByCodeId(long codeId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the resources where codeId = ?. |
Resource |
findByPrimaryKey(long resourceId)
Returns the resource with the primary key or throws a NoSuchResourceException if it could not be found. |
Resource |
findByPrimKey_First(String primKey,
OrderByComparator orderByComparator)
Returns the first resource in the ordered set where primKey = ?. |
Resource |
findByPrimKey_Last(String primKey,
OrderByComparator orderByComparator)
Returns the last resource in the ordered set where primKey = ?. |
Resource[] |
findByPrimKey_PrevAndNext(long resourceId,
String primKey,
OrderByComparator orderByComparator)
Returns the resources before and after the current resource in the ordered set where primKey = ?. |
List<Resource> |
findByPrimKey(String primKey)
Returns all the resources where primKey = ?. |
List<Resource> |
findByPrimKey(String primKey,
int start,
int end)
Returns a range of all the resources where primKey = ?. |
List<Resource> |
findByPrimKey(String primKey,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the resources where primKey = ?. |
Resource |
remove(long resourceId)
Removes the resource with the primary key from the database. |
void |
removeAll()
Removes all the resources from the database. |
Resource |
removeByC_P(long codeId,
String primKey)
Removes the resource where codeId = ? and primKey = ? from the database. |
void |
removeByCodeId(long codeId)
Removes all the resources where codeId = ? from the database. |
void |
removeByPrimKey(String primKey)
Removes all the resources where primKey = ? from the database. |
Resource |
updateImpl(Resource resource,
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 |
---|
void cacheResult(Resource resource)
resource
- the resourcevoid cacheResult(List<Resource> resources)
resources
- the resourcesResource create(long resourceId)
resourceId
- the primary key for the new resource
Resource remove(long resourceId) throws NoSuchResourceException, SystemException
resourceId
- the primary key of the resource
NoSuchResourceException
- if a resource with the primary key could not be found
SystemException
- if a system exception occurredResource updateImpl(Resource resource, boolean merge) throws SystemException
SystemException
Resource findByPrimaryKey(long resourceId) throws NoSuchResourceException, SystemException
NoSuchResourceException
if it could not be found.
resourceId
- the primary key of the resource
NoSuchResourceException
- if a resource with the primary key could not be found
SystemException
- if a system exception occurredResource fetchByPrimaryKey(long resourceId) throws SystemException
null
if it could not be found.
resourceId
- the primary key of the resource
null
if a resource with the primary key could not be found
SystemException
- if a system exception occurredList<Resource> findByCodeId(long codeId) throws SystemException
codeId
- the code ID
SystemException
- if a system exception occurredList<Resource> findByCodeId(long codeId, int start, int end) throws SystemException
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.
codeId
- the code IDstart
- the lower bound of the range of resourcesend
- the upper bound of the range of resources (not inclusive)
SystemException
- if a system exception occurredList<Resource> findByCodeId(long codeId, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
codeId
- the code IDstart
- the lower bound of the range of resourcesend
- the upper bound of the range of resources (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredResource findByCodeId_First(long codeId, OrderByComparator orderByComparator) throws NoSuchResourceException, SystemException
codeId
- the code IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceException
- if a matching resource could not be found
SystemException
- if a system exception occurredResource fetchByCodeId_First(long codeId, OrderByComparator orderByComparator) throws SystemException
codeId
- the code IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching resource could not be found
SystemException
- if a system exception occurredResource findByCodeId_Last(long codeId, OrderByComparator orderByComparator) throws NoSuchResourceException, SystemException
codeId
- the code IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceException
- if a matching resource could not be found
SystemException
- if a system exception occurredResource fetchByCodeId_Last(long codeId, OrderByComparator orderByComparator) throws SystemException
codeId
- the code IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching resource could not be found
SystemException
- if a system exception occurredResource[] findByCodeId_PrevAndNext(long resourceId, long codeId, OrderByComparator orderByComparator) throws NoSuchResourceException, SystemException
resourceId
- the primary key of the current resourcecodeId
- the code IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceException
- if a resource with the primary key could not be found
SystemException
- if a system exception occurredList<Resource> findByPrimKey(String primKey) throws SystemException
primKey
- the prim key
SystemException
- if a system exception occurredList<Resource> findByPrimKey(String primKey, int start, int end) throws SystemException
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.
primKey
- the prim keystart
- the lower bound of the range of resourcesend
- the upper bound of the range of resources (not inclusive)
SystemException
- if a system exception occurredList<Resource> findByPrimKey(String primKey, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
primKey
- the prim keystart
- the lower bound of the range of resourcesend
- the upper bound of the range of resources (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredResource findByPrimKey_First(String primKey, OrderByComparator orderByComparator) throws NoSuchResourceException, SystemException
primKey
- the prim keyorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceException
- if a matching resource could not be found
SystemException
- if a system exception occurredResource fetchByPrimKey_First(String primKey, OrderByComparator orderByComparator) throws SystemException
primKey
- the prim keyorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching resource could not be found
SystemException
- if a system exception occurredResource findByPrimKey_Last(String primKey, OrderByComparator orderByComparator) throws NoSuchResourceException, SystemException
primKey
- the prim keyorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceException
- if a matching resource could not be found
SystemException
- if a system exception occurredResource fetchByPrimKey_Last(String primKey, OrderByComparator orderByComparator) throws SystemException
primKey
- the prim keyorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching resource could not be found
SystemException
- if a system exception occurredResource[] findByPrimKey_PrevAndNext(long resourceId, String primKey, OrderByComparator orderByComparator) throws NoSuchResourceException, SystemException
resourceId
- the primary key of the current resourceprimKey
- the prim keyorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchResourceException
- if a resource with the primary key could not be found
SystemException
- if a system exception occurredResource findByC_P(long codeId, String primKey) throws NoSuchResourceException, SystemException
NoSuchResourceException
if it could not be found.
codeId
- the code IDprimKey
- the prim key
NoSuchResourceException
- if a matching resource could not be found
SystemException
- if a system exception occurredResource fetchByC_P(long codeId, String primKey) throws SystemException
null
if it could not be found. Uses the finder cache.
codeId
- the code IDprimKey
- the prim key
null
if a matching resource could not be found
SystemException
- if a system exception occurredResource fetchByC_P(long codeId, String primKey, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
codeId
- the code IDprimKey
- the prim keyretrieveFromCache
- whether to use the finder cache
null
if a matching resource could not be found
SystemException
- if a system exception occurredList<Resource> findAll() throws SystemException
SystemException
- if a system exception occurredList<Resource> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of resourcesend
- the upper bound of the range of resources (not inclusive)
SystemException
- if a system exception occurredList<Resource> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
start
- the lower bound of the range of resourcesend
- the upper bound of the range of resources (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredvoid removeByCodeId(long codeId) throws SystemException
codeId
- the code ID
SystemException
- if a system exception occurredvoid removeByPrimKey(String primKey) throws SystemException
primKey
- the prim key
SystemException
- if a system exception occurredResource removeByC_P(long codeId, String primKey) throws NoSuchResourceException, SystemException
codeId
- the code IDprimKey
- the prim key
SystemException
- if a system exception occurred
NoSuchResourceException
void removeAll() throws SystemException
SystemException
- if a system exception occurredint countByCodeId(long codeId) throws SystemException
codeId
- the code ID
SystemException
- if a system exception occurredint countByPrimKey(String primKey) throws SystemException
primKey
- the prim key
SystemException
- if a system exception occurredint countByC_P(long codeId, String primKey) throws SystemException
codeId
- the code IDprimKey
- the prim key
SystemException
- if a system exception occurredint countAll() throws SystemException
SystemException
- if a system exception occurred
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |