|
Liferay 6.0-ee | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletPersistence
The persistence interface for the portlet service.
Never modify or reference this interface directly. Always use PortletUtil
to access the portlet persistence. Modify service.xml
and rerun ServiceBuilder to regenerate this interface.
Caching information and settings can be found in portal.properties
PortletPersistenceImpl
,
PortletUtil
Method Summary | |
---|---|
void |
cacheResult(List<Portlet> portlets)
Caches the portlets in the entity cache if it is enabled. |
void |
cacheResult(Portlet portlet)
Caches the portlet in the entity cache if it is enabled. |
int |
countAll()
Counts all the portlets. |
int |
countByC_P(long companyId,
String portletId)
Counts all the portlets where companyId = ? and portletId = ?. |
int |
countByCompanyId(long companyId)
Counts all the portlets where companyId = ?. |
Portlet |
create(long id)
Creates a new portlet with the primary key. |
Portlet |
fetchByC_P(long companyId,
String portletId)
Finds the portlet where companyId = ? and portletId = ? or returns null if it could not be found. |
Portlet |
fetchByC_P(long companyId,
String portletId,
boolean retrieveFromCache)
Finds the portlet where companyId = ? and portletId = ? or returns null if it could not be found, optionally using the finder cache. |
Portlet |
fetchByPrimaryKey(long id)
Finds the portlet with the primary key or returns null if it could not be found. |
List<Portlet> |
findAll()
Finds all the portlets. |
List<Portlet> |
findAll(int start,
int end)
Finds a range of all the portlets. |
List<Portlet> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the portlets. |
Portlet |
findByC_P(long companyId,
String portletId)
Finds the portlet where companyId = ? and portletId = ? or throws a NoSuchPortletException if it could not be found. |
Portlet |
findByCompanyId_First(long companyId,
OrderByComparator orderByComparator)
Finds the first portlet in the ordered set where companyId = ?. |
Portlet |
findByCompanyId_Last(long companyId,
OrderByComparator orderByComparator)
Finds the last portlet in the ordered set where companyId = ?. |
Portlet[] |
findByCompanyId_PrevAndNext(long id,
long companyId,
OrderByComparator orderByComparator)
Finds the portlets before and after the current portlet in the ordered set where companyId = ?. |
List<Portlet> |
findByCompanyId(long companyId)
Finds all the portlets where companyId = ?. |
List<Portlet> |
findByCompanyId(long companyId,
int start,
int end)
Finds a range of all the portlets where companyId = ?. |
List<Portlet> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the portlets where companyId = ?. |
Portlet |
findByPrimaryKey(long id)
Finds the portlet with the primary key or throws a NoSuchPortletException if it could not be found. |
Portlet |
remove(long id)
Removes the portlet with the primary key from the database. |
void |
removeAll()
Removes all the portlets from the database. |
void |
removeByC_P(long companyId,
String portletId)
Removes the portlet where companyId = ? and portletId = ? from the database. |
void |
removeByCompanyId(long companyId)
Removes all the portlets where companyId = ? from the database. |
Portlet |
updateImpl(Portlet portlet,
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 |
---|
void cacheResult(Portlet portlet)
portlet
- the portlet to cachevoid cacheResult(List<Portlet> portlets)
portlets
- the portlets to cachePortlet create(long id)
id
- the primary key for the new portlet
Portlet remove(long id) throws NoSuchPortletException, SystemException
id
- the primary key of the portlet to remove
NoSuchPortletException
- if a portlet with the primary key could not be found
SystemException
- if a system exception occurredPortlet updateImpl(Portlet portlet, boolean merge) throws SystemException
SystemException
Portlet findByPrimaryKey(long id) throws NoSuchPortletException, SystemException
NoSuchPortletException
if it could not be found.
id
- the primary key of the portlet to find
NoSuchPortletException
- if a portlet with the primary key could not be found
SystemException
- if a system exception occurredPortlet fetchByPrimaryKey(long id) throws SystemException
null
if it could not be found.
id
- the primary key of the portlet to find
null
if a portlet with the primary key could not be found
SystemException
- if a system exception occurredList<Portlet> findByCompanyId(long companyId) throws SystemException
companyId
- the company id to search with
SystemException
- if a system exception occurredList<Portlet> findByCompanyId(long companyId, 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.
companyId
- the company id to search withstart
- the lower bound of the range of portlets to returnend
- the upper bound of the range of portlets to return (not inclusive)
SystemException
- if a system exception occurredList<Portlet> findByCompanyId(long companyId, 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.
companyId
- the company id to search withstart
- the lower bound of the range of portlets to returnend
- the upper bound of the range of portlets to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredPortlet findByCompanyId_First(long companyId, OrderByComparator orderByComparator) throws NoSuchPortletException, 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.
companyId
- the company id to search withorderByComparator
- the comparator to order the set by
NoSuchPortletException
- if a matching portlet could not be found
SystemException
- if a system exception occurredPortlet findByCompanyId_Last(long companyId, OrderByComparator orderByComparator) throws NoSuchPortletException, 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.
companyId
- the company id to search withorderByComparator
- the comparator to order the set by
NoSuchPortletException
- if a matching portlet could not be found
SystemException
- if a system exception occurredPortlet[] findByCompanyId_PrevAndNext(long id, long companyId, OrderByComparator orderByComparator) throws NoSuchPortletException, 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.
id
- the primary key of the current portletcompanyId
- the company id to search withorderByComparator
- the comparator to order the set by
NoSuchPortletException
- if a portlet with the primary key could not be found
SystemException
- if a system exception occurredPortlet findByC_P(long companyId, String portletId) throws NoSuchPortletException, SystemException
NoSuchPortletException
if it could not be found.
companyId
- the company id to search withportletId
- the portlet id to search with
NoSuchPortletException
- if a matching portlet could not be found
SystemException
- if a system exception occurredPortlet fetchByC_P(long companyId, String portletId) throws SystemException
null
if it could not be found. Uses the finder cache.
companyId
- the company id to search withportletId
- the portlet id to search with
null
if a matching portlet could not be found
SystemException
- if a system exception occurredPortlet fetchByC_P(long companyId, String portletId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
companyId
- the company id to search withportletId
- the portlet id to search with
null
if a matching portlet could not be found
SystemException
- if a system exception occurredList<Portlet> findAll() throws SystemException
SystemException
- if a system exception occurredList<Portlet> 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 portlets to returnend
- the upper bound of the range of portlets to return (not inclusive)
SystemException
- if a system exception occurredList<Portlet> 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 portlets to returnend
- the upper bound of the range of portlets to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredvoid removeByCompanyId(long companyId) throws SystemException
companyId
- the company id to search with
SystemException
- if a system exception occurredvoid removeByC_P(long companyId, String portletId) throws NoSuchPortletException, SystemException
companyId
- the company id to search withportletId
- the portlet id to search with
SystemException
- if a system exception occurred
NoSuchPortletException
void removeAll() throws SystemException
SystemException
- if a system exception occurredint countByCompanyId(long companyId) throws SystemException
companyId
- the company id to search with
SystemException
- if a system exception occurredint countByC_P(long companyId, String portletId) throws SystemException
companyId
- the company id to search withportletId
- the portlet id to search with
SystemException
- if a system exception occurredint countAll() throws SystemException
SystemException
- if a system exception occurred
|
Liferay 6.0-ee | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |