Interface PortletPersistence
- All Superinterfaces:
BasePersistence<Portlet>
Caching information and settings can be found in portal.properties
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cacheResult
(Portlet portlet) Caches the portlet in the entity cache if it is enabled.void
cacheResult
(List<Portlet> portlets) Caches the portlets in the entity cache if it is enabled.int
countAll()
Returns the number of portlets.int
countByC_P
(long companyId, String portletId) Returns the number of portlets where companyId = ? and portletId = ?.int
countByCompanyId
(long companyId) Returns the number of portlets where companyId = ?.create
(long id) Creates a new portlet with the primary key.fetchByC_P
(long companyId, String portletId) Returns the portlet where companyId = ? and portletId = ? or returnsnull
if it could not be found.fetchByC_P
(long companyId, String portletId, boolean useFinderCache) Returns the portlet where companyId = ? and portletId = ? or returnsnull
if it could not be found, optionally using the finder cache.fetchByCompanyId_First
(long companyId, OrderByComparator<Portlet> orderByComparator) Returns the first portlet in the ordered set where companyId = ?.fetchByCompanyId_Last
(long companyId, OrderByComparator<Portlet> orderByComparator) Returns the last portlet in the ordered set where companyId = ?.fetchByPrimaryKey
(long id) Returns the portlet with the primary key or returnsnull
if it could not be found.findAll()
Returns all the portlets.findAll
(int start, int end) Returns a range of all the portlets.findAll
(int start, int end, OrderByComparator<Portlet> orderByComparator) Returns an ordered range of all the portlets.findAll
(int start, int end, OrderByComparator<Portlet> orderByComparator, boolean useFinderCache) Returns an ordered range of all the portlets.Returns the portlet where companyId = ? and portletId = ? or throws aNoSuchPortletException
if it could not be found.findByCompanyId
(long companyId) Returns all the portlets where companyId = ?.findByCompanyId
(long companyId, int start, int end) Returns a range of all the portlets where companyId = ?.findByCompanyId
(long companyId, int start, int end, OrderByComparator<Portlet> orderByComparator) Returns an ordered range of all the portlets where companyId = ?.findByCompanyId
(long companyId, int start, int end, OrderByComparator<Portlet> orderByComparator, boolean useFinderCache) Returns an ordered range of all the portlets where companyId = ?.findByCompanyId_First
(long companyId, OrderByComparator<Portlet> orderByComparator) Returns the first portlet in the ordered set where companyId = ?.findByCompanyId_Last
(long companyId, OrderByComparator<Portlet> orderByComparator) Returns the last portlet in the ordered set where companyId = ?.Portlet[]
findByCompanyId_PrevAndNext
(long id, long companyId, OrderByComparator<Portlet> orderByComparator) Returns the portlets before and after the current portlet in the ordered set where companyId = ?.findByPrimaryKey
(long id) Returns the portlet with the primary key or throws aNoSuchPortletException
if it could not be found.remove
(long id) Removes the portlet with the primary key from the database.void
Removes all the portlets from the database.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.updateImpl
(Portlet portlet) Methods inherited from interface com.liferay.portal.kernel.service.persistence.BasePersistence
clearCache, clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, dslQuery, dslQueryCount, fetchByPrimaryKey, fetchByPrimaryKeys, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, removeByFunction, setDataSource, unregisterListener, update, update
-
Method Details
-
findByCompanyId
Returns all the portlets where companyId = ?.- Parameters:
companyId
- the company ID- Returns:
- the matching portlets
-
findByCompanyId
Returns a range of all the portlets where companyId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromPortletModelImpl
.- Parameters:
companyId
- the company IDstart
- the lower bound of the range of portletsend
- the upper bound of the range of portlets (not inclusive)- Returns:
- the range of matching portlets
-
findByCompanyId
List<Portlet> findByCompanyId(long companyId, int start, int end, OrderByComparator<Portlet> orderByComparator) Returns an ordered range of all the portlets where companyId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromPortletModelImpl
.- Parameters:
companyId
- the company IDstart
- the lower bound of the range of portletsend
- the upper bound of the range of portlets (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching portlets
-
findByCompanyId
List<Portlet> findByCompanyId(long companyId, int start, int end, OrderByComparator<Portlet> orderByComparator, boolean useFinderCache) Returns an ordered range of all the portlets where companyId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromPortletModelImpl
.- Parameters:
companyId
- the company IDstart
- the lower bound of the range of portletsend
- the upper bound of the range of portlets (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching portlets
-
findByCompanyId_First
Portlet findByCompanyId_First(long companyId, OrderByComparator<Portlet> orderByComparator) throws NoSuchPortletException Returns the first portlet in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching portlet
- Throws:
NoSuchPortletException
- if a matching portlet could not be found
-
fetchByCompanyId_First
Returns the first portlet in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching portlet, or
null
if a matching portlet could not be found
-
findByCompanyId_Last
Portlet findByCompanyId_Last(long companyId, OrderByComparator<Portlet> orderByComparator) throws NoSuchPortletException Returns the last portlet in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching portlet
- Throws:
NoSuchPortletException
- if a matching portlet could not be found
-
fetchByCompanyId_Last
Returns the last portlet in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching portlet, or
null
if a matching portlet could not be found
-
findByCompanyId_PrevAndNext
Portlet[] findByCompanyId_PrevAndNext(long id, long companyId, OrderByComparator<Portlet> orderByComparator) throws NoSuchPortletException Returns the portlets before and after the current portlet in the ordered set where companyId = ?.- Parameters:
id
- the primary key of the current portletcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next portlet
- Throws:
NoSuchPortletException
- if a portlet with the primary key could not be found
-
removeByCompanyId
void removeByCompanyId(long companyId) Removes all the portlets where companyId = ? from the database.- Parameters:
companyId
- the company ID
-
countByCompanyId
int countByCompanyId(long companyId) Returns the number of portlets where companyId = ?.- Parameters:
companyId
- the company ID- Returns:
- the number of matching portlets
-
findByC_P
Returns the portlet where companyId = ? and portletId = ? or throws aNoSuchPortletException
if it could not be found.- Parameters:
companyId
- the company IDportletId
- the portlet ID- Returns:
- the matching portlet
- Throws:
NoSuchPortletException
- if a matching portlet could not be found
-
fetchByC_P
Returns the portlet where companyId = ? and portletId = ? or returnsnull
if it could not be found. Uses the finder cache.- Parameters:
companyId
- the company IDportletId
- the portlet ID- Returns:
- the matching portlet, or
null
if a matching portlet could not be found
-
fetchByC_P
Returns the portlet where companyId = ? and portletId = ? or returnsnull
if it could not be found, optionally using the finder cache.- Parameters:
companyId
- the company IDportletId
- the portlet IDuseFinderCache
- whether to use the finder cache- Returns:
- the matching portlet, or
null
if a matching portlet could not be found
-
removeByC_P
Removes the portlet where companyId = ? and portletId = ? from the database.- Parameters:
companyId
- the company IDportletId
- the portlet ID- Returns:
- the portlet that was removed
- Throws:
NoSuchPortletException
-
countByC_P
Returns the number of portlets where companyId = ? and portletId = ?.- Parameters:
companyId
- the company IDportletId
- the portlet ID- Returns:
- the number of matching portlets
-
cacheResult
Caches the portlet in the entity cache if it is enabled.- Parameters:
portlet
- the portlet
-
cacheResult
Caches the portlets in the entity cache if it is enabled.- Parameters:
portlets
- the portlets
-
create
Creates a new portlet with the primary key. Does not add the portlet to the database.- Parameters:
id
- the primary key for the new portlet- Returns:
- the new portlet
-
remove
Removes the portlet with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
id
- the primary key of the portlet- Returns:
- the portlet that was removed
- Throws:
NoSuchPortletException
- if a portlet with the primary key could not be found
-
updateImpl
-
findByPrimaryKey
Returns the portlet with the primary key or throws aNoSuchPortletException
if it could not be found.- Parameters:
id
- the primary key of the portlet- Returns:
- the portlet
- Throws:
NoSuchPortletException
- if a portlet with the primary key could not be found
-
fetchByPrimaryKey
Returns the portlet with the primary key or returnsnull
if it could not be found.- Parameters:
id
- the primary key of the portlet- Returns:
- the portlet, or
null
if a portlet with the primary key could not be found
-
findAll
Returns all the portlets.- Returns:
- the portlets
-
findAll
Returns a range of all the portlets.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromPortletModelImpl
.- Parameters:
start
- the lower bound of the range of portletsend
- the upper bound of the range of portlets (not inclusive)- Returns:
- the range of portlets
-
findAll
Returns an ordered range of all the portlets.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromPortletModelImpl
.- Parameters:
start
- the lower bound of the range of portletsend
- the upper bound of the range of portlets (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of portlets
-
findAll
List<Portlet> findAll(int start, int end, OrderByComparator<Portlet> orderByComparator, boolean useFinderCache) Returns an ordered range of all the portlets.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromPortletModelImpl
.- Parameters:
start
- the lower bound of the range of portletsend
- the upper bound of the range of portlets (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of portlets
-
removeAll
void removeAll()Removes all the portlets from the database. -
countAll
int countAll()Returns the number of portlets.- Returns:
- the number of portlets
-