|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.persistence.impl.BasePersistenceImpl<Portlet>
com.liferay.portal.service.persistence.impl.PortletPersistenceImpl
@ProviderType public class PortletPersistenceImpl
The persistence implementation for the portlet service.
Caching information and settings can be found in portal.properties
PortletPersistence,
PortletUtil| Field Summary | |
|---|---|
protected CompanyProvider |
companyProvider
|
protected EntityCache |
entityCache
|
static String |
FINDER_CLASS_NAME_ENTITY
|
static String |
FINDER_CLASS_NAME_LIST_WITH_PAGINATION
|
static String |
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
|
static FinderPath |
FINDER_PATH_COUNT_ALL
|
static FinderPath |
FINDER_PATH_COUNT_BY_C_P
|
static FinderPath |
FINDER_PATH_COUNT_BY_COMPANYID
|
static FinderPath |
FINDER_PATH_FETCH_BY_C_P
|
static FinderPath |
FINDER_PATH_WITH_PAGINATION_FIND_ALL
|
static FinderPath |
FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID
|
static FinderPath |
FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
|
static FinderPath |
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID
|
protected FinderCache |
finderCache
|
| Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
|---|
CAST_CLOB_TEXT_OPEN, COUNT_COLUMN_NAME, FINDER_ARGS_EMPTY, listeners, NULL_SAFE_STRING_COMPARATOR, ORDER_BY_ASC, ORDER_BY_ASC_HAS_NEXT, ORDER_BY_CLAUSE, ORDER_BY_DESC, ORDER_BY_DESC_HAS_NEXT, WHERE_AND, WHERE_GREATER_THAN, WHERE_GREATER_THAN_HAS_NEXT, WHERE_LESSER_THAN, WHERE_LESSER_THAN_HAS_NEXT, WHERE_OR |
| Constructor Summary | |
|---|---|
PortletPersistenceImpl()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Initializes the portlet persistence. |
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. |
protected void |
cacheUniqueFindersCache(PortletModelImpl portletModelImpl,
boolean isNew)
|
void |
clearCache()
Clears the cache for all portlets. |
void |
clearCache(List<Portlet> portlets)
Clears the cache for a List instances of this model. |
void |
clearCache(Portlet portlet)
Clears the cache for the portlet. |
protected void |
clearUniqueFindersCache(PortletModelImpl portletModelImpl)
|
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 = ?. |
Portlet |
create(long id)
Creates a new portlet with the primary key. |
void |
destroy()
|
Portlet |
fetchByC_P(long companyId,
String portletId)
Returns the portlet where companyId = ? and portletId = ? or returns null if it could not be found. |
Portlet |
fetchByC_P(long companyId,
String portletId,
boolean retrieveFromCache)
Returns the portlet where companyId = ? and portletId = ? or returns null if it could not be found, optionally using the finder cache. |
Portlet |
fetchByCompanyId_First(long companyId,
OrderByComparator<Portlet> orderByComparator)
Returns the first portlet in the ordered set where companyId = ?. |
Portlet |
fetchByCompanyId_Last(long companyId,
OrderByComparator<Portlet> orderByComparator)
Returns the last portlet in the ordered set where companyId = ?. |
Portlet |
fetchByPrimaryKey(long id)
Returns the portlet with the primary key or returns null if it could not be found. |
Portlet |
fetchByPrimaryKey(Serializable primaryKey)
Returns the portlet with the primary key or returns null if it could not be found. |
Map<Serializable,Portlet> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys)
|
List<Portlet> |
findAll()
Returns all the portlets. |
List<Portlet> |
findAll(int start,
int end)
Returns a range of all the portlets. |
List<Portlet> |
findAll(int start,
int end,
OrderByComparator<Portlet> orderByComparator)
Returns an ordered range of all the portlets. |
List<Portlet> |
findAll(int start,
int end,
OrderByComparator<Portlet> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the portlets. |
Portlet |
findByC_P(long companyId,
String portletId)
Returns the portlet where companyId = ? and portletId = ? or throws a NoSuchPortletException if it could not be found. |
Portlet |
findByCompanyId_First(long companyId,
OrderByComparator<Portlet> orderByComparator)
Returns the first portlet in the ordered set where companyId = ?. |
Portlet |
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 = ?. |
List<Portlet> |
findByCompanyId(long companyId)
Returns all the portlets where companyId = ?. |
List<Portlet> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the portlets where companyId = ?. |
List<Portlet> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Portlet> orderByComparator)
Returns an ordered range of all the portlets where companyId = ?. |
List<Portlet> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Portlet> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the portlets where companyId = ?. |
Portlet |
findByPrimaryKey(long id)
Returns the portlet with the primary key or throws a NoSuchPortletException if it could not be found. |
Portlet |
findByPrimaryKey(Serializable primaryKey)
Returns the portlet with the primary key or throws a NoSuchModelException if it could not be found. |
Set<String> |
getBadColumnNames()
|
protected Portlet |
getByCompanyId_PrevAndNext(Session session,
Portlet portlet,
long companyId,
OrderByComparator<Portlet> orderByComparator,
boolean previous)
|
protected Map<String,Integer> |
getTableColumnsMap()
|
Portlet |
remove(long id)
Removes the portlet with the primary key from the database. |
Portlet |
remove(Serializable primaryKey)
Removes the portlet with the primary key from the database. |
void |
removeAll()
Removes all the portlets from the database. |
Portlet |
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. |
protected Portlet |
removeImpl(Portlet portlet)
Removes the model instance from the database. |
protected Portlet |
toUnwrappedModel(Portlet portlet)
|
Portlet |
updateImpl(Portlet portlet)
Updates the model instance in the database or adds it if it does not yet exist. |
| Methods inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
|---|
appendOrderByComparator, appendOrderByComparator, closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getClassLoader, getColumnName, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openNewSession, openSession, processException, registerListener, remove, removeConjunction, setDataSource, setModelClass, setSessionFactory, unregisterListener, update, update, update, update, updateImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
|---|
closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update, update, update |
| Field Detail |
|---|
public static final String FINDER_CLASS_NAME_ENTITY
public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION
public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_COUNT_ALL
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_COMPANYID
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COMPANYID
public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID
public static final FinderPath FINDER_PATH_FETCH_BY_C_P
public static final FinderPath FINDER_PATH_COUNT_BY_C_P
@BeanReference(type=CompanyProviderWrapper.class) protected CompanyProvider companyProvider
protected EntityCache entityCache
protected FinderCache finderCache
| Constructor Detail |
|---|
public PortletPersistenceImpl()
| Method Detail |
|---|
public List<Portlet> findByCompanyId(long companyId)
findByCompanyId in interface PortletPersistencecompanyId - the company ID
public List<Portlet> findByCompanyId(long companyId,
int start,
int end)
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from PortletModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
findByCompanyId in interface PortletPersistencecompanyId - the company IDstart - the lower bound of the range of portletsend - the upper bound of the range of portlets (not inclusive)
public List<Portlet> findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Portlet> orderByComparator)
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from PortletModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
findByCompanyId in interface PortletPersistencecompanyId - 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 (optionally null)
public List<Portlet> findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Portlet> orderByComparator,
boolean retrieveFromCache)
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from PortletModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
findByCompanyId in interface PortletPersistencecompanyId - 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 (optionally null)retrieveFromCache - whether to retrieve from the finder cache
public Portlet findByCompanyId_First(long companyId,
OrderByComparator<Portlet> orderByComparator)
throws NoSuchPortletException
findByCompanyId_First in interface PortletPersistencecompanyId - the company IDorderByComparator - the comparator to order the set by (optionally null)
NoSuchPortletException - if a matching portlet could not be found
public Portlet fetchByCompanyId_First(long companyId,
OrderByComparator<Portlet> orderByComparator)
fetchByCompanyId_First in interface PortletPersistencecompanyId - the company IDorderByComparator - the comparator to order the set by (optionally null)
null if a matching portlet could not be found
public Portlet findByCompanyId_Last(long companyId,
OrderByComparator<Portlet> orderByComparator)
throws NoSuchPortletException
findByCompanyId_Last in interface PortletPersistencecompanyId - the company IDorderByComparator - the comparator to order the set by (optionally null)
NoSuchPortletException - if a matching portlet could not be found
public Portlet fetchByCompanyId_Last(long companyId,
OrderByComparator<Portlet> orderByComparator)
fetchByCompanyId_Last in interface PortletPersistencecompanyId - the company IDorderByComparator - the comparator to order the set by (optionally null)
null if a matching portlet could not be found
public Portlet[] findByCompanyId_PrevAndNext(long id,
long companyId,
OrderByComparator<Portlet> orderByComparator)
throws NoSuchPortletException
findByCompanyId_PrevAndNext in interface PortletPersistenceid - the primary key of the current portletcompanyId - the company IDorderByComparator - the comparator to order the set by (optionally null)
NoSuchPortletException - if a portlet with the primary key could not be found
protected Portlet getByCompanyId_PrevAndNext(Session session,
Portlet portlet,
long companyId,
OrderByComparator<Portlet> orderByComparator,
boolean previous)
public void removeByCompanyId(long companyId)
removeByCompanyId in interface PortletPersistencecompanyId - the company IDpublic int countByCompanyId(long companyId)
countByCompanyId in interface PortletPersistencecompanyId - the company ID
public Portlet findByC_P(long companyId,
String portletId)
throws NoSuchPortletException
NoSuchPortletException if it could not be found.
findByC_P in interface PortletPersistencecompanyId - the company IDportletId - the portlet ID
NoSuchPortletException - if a matching portlet could not be found
public Portlet fetchByC_P(long companyId,
String portletId)
null if it could not be found. Uses the finder cache.
fetchByC_P in interface PortletPersistencecompanyId - the company IDportletId - the portlet ID
null if a matching portlet could not be found
public Portlet fetchByC_P(long companyId,
String portletId,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
fetchByC_P in interface PortletPersistencecompanyId - the company IDportletId - the portlet IDretrieveFromCache - whether to retrieve from the finder cache
null if a matching portlet could not be found
public Portlet removeByC_P(long companyId,
String portletId)
throws NoSuchPortletException
removeByC_P in interface PortletPersistencecompanyId - the company IDportletId - the portlet ID
NoSuchPortletException
public int countByC_P(long companyId,
String portletId)
countByC_P in interface PortletPersistencecompanyId - the company IDportletId - the portlet ID
public void cacheResult(Portlet portlet)
cacheResult in interface PortletPersistenceportlet - the portletpublic void cacheResult(List<Portlet> portlets)
cacheResult in interface PortletPersistenceportlets - the portletspublic void clearCache()
The EntityCache and FinderCache are both cleared by this method.
clearCache in interface BasePersistence<Portlet>clearCache in class BasePersistenceImpl<Portlet>public void clearCache(Portlet portlet)
The EntityCache and FinderCache are both cleared by this method.
clearCache in interface BasePersistence<Portlet>clearCache in class BasePersistenceImpl<Portlet>portlet - the instance of this model to clear the cache forpublic void clearCache(List<Portlet> portlets)
BasePersistence
The EntityCache and FinderCache are both cleared by this
method.
clearCache in interface BasePersistence<Portlet>clearCache in class BasePersistenceImpl<Portlet>portlets - the List instances of this model to clear the cache for
protected void cacheUniqueFindersCache(PortletModelImpl portletModelImpl,
boolean isNew)
protected void clearUniqueFindersCache(PortletModelImpl portletModelImpl)
public Portlet create(long id)
create in interface PortletPersistenceid - the primary key for the new portlet
public Portlet remove(long id)
throws NoSuchPortletException
remove in interface PortletPersistenceid - the primary key of the portlet
NoSuchPortletException - if a portlet with the primary key could not be found
public Portlet remove(Serializable primaryKey)
throws NoSuchPortletException
remove in interface BasePersistence<Portlet>remove in class BasePersistenceImpl<Portlet>primaryKey - the primary key of the portlet
NoSuchPortletException - if a portlet with the primary key could not be foundprotected Portlet removeImpl(Portlet portlet)
BasePersistenceImplBasePersistenceImpl.update(BaseModel,
boolean) depends on this method to implement the remove operation; it
only notifies the model listeners.
removeImpl in class BasePersistenceImpl<Portlet>portlet - the model instance to remove
public Portlet updateImpl(Portlet portlet)
BasePersistenceImplBasePersistenceImpl.remove(BaseModel) depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl in interface PortletPersistenceupdateImpl in class BasePersistenceImpl<Portlet>portlet - the model instance to update
protected Portlet toUnwrappedModel(Portlet portlet)
public Portlet findByPrimaryKey(Serializable primaryKey)
throws NoSuchPortletException
NoSuchModelException if it could not be found.
findByPrimaryKey in interface BasePersistence<Portlet>findByPrimaryKey in class BasePersistenceImpl<Portlet>primaryKey - the primary key of the portlet
NoSuchPortletException - if a portlet with the primary key could not be found
public Portlet findByPrimaryKey(long id)
throws NoSuchPortletException
NoSuchPortletException if it could not be found.
findByPrimaryKey in interface PortletPersistenceid - the primary key of the portlet
NoSuchPortletException - if a portlet with the primary key could not be foundpublic Portlet fetchByPrimaryKey(Serializable primaryKey)
null if it could not be found.
fetchByPrimaryKey in interface BasePersistence<Portlet>fetchByPrimaryKey in class BasePersistenceImpl<Portlet>primaryKey - the primary key of the portlet
null if a portlet with the primary key could not be foundpublic Portlet fetchByPrimaryKey(long id)
null if it could not be found.
fetchByPrimaryKey in interface PortletPersistenceid - the primary key of the portlet
null if a portlet with the primary key could not be foundpublic Map<Serializable,Portlet> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys in interface BasePersistence<Portlet>fetchByPrimaryKeys in interface PortletPersistencefetchByPrimaryKeys in class BasePersistenceImpl<Portlet>public List<Portlet> findAll()
findAll in interface PortletPersistence
public List<Portlet> findAll(int start,
int end)
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from PortletModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
findAll in interface PortletPersistencestart - the lower bound of the range of portletsend - the upper bound of the range of portlets (not inclusive)
public List<Portlet> findAll(int start,
int end,
OrderByComparator<Portlet> orderByComparator)
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from PortletModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
findAll in interface PortletPersistencestart - 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 (optionally null)
public List<Portlet> findAll(int start,
int end,
OrderByComparator<Portlet> orderByComparator,
boolean retrieveFromCache)
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from PortletModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
findAll in interface PortletPersistencestart - 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 (optionally null)retrieveFromCache - whether to retrieve from the finder cache
public void removeAll()
removeAll in interface PortletPersistencepublic int countAll()
countAll in interface PortletPersistencepublic Set<String> getBadColumnNames()
getBadColumnNames in interface BasePersistence<Portlet>getBadColumnNames in interface PortletPersistencegetBadColumnNames in class BasePersistenceImpl<Portlet>protected Map<String,Integer> getTableColumnsMap()
getTableColumnsMap in class BasePersistenceImpl<Portlet>public void afterPropertiesSet()
public void destroy()
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||