Interface PortletPreferencesLocalService
- All Superinterfaces:
BaseLocalService
,CTService<PortletPreferences>
,PersistedModelLocalService
- All Known Implementing Classes:
PortletPreferencesLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddPortletPreferences
(long companyId, long ownerId, int ownerType, long plid, String portletId, Portlet portlet, String defaultPreferences) addPortletPreferences
(PortletPreferences portletPreferences) Adds the portlet preferences to the database.createPersistedModel
(Serializable primaryKeyObj) createPortletPreferences
(long portletPreferencesId) Creates a new portlet preferences with the primary key.deletePersistedModel
(PersistedModel persistedModel) deletePortletPreferences
(long portletPreferencesId) Deletes the portlet preferences with the primary key from the database.void
deletePortletPreferences
(long ownerId, int ownerType, long plid) void
deletePortletPreferences
(long ownerId, int ownerType, long plid, String portletId) deletePortletPreferences
(PortletPreferences portletPreferences) Deletes the portlet preferences from the database.void
deletePortletPreferencesByOwnerId
(long ownerId) void
deletePortletPreferencesByPlid
(long plid) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.long
dynamicQueryCount
(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchPortletPreferences
(long portletPreferencesId) fetchPortletPreferences
(long ownerId, int ownerType, long plid, String portletId) fetchPreferences
(long companyId, long ownerId, int ownerType, long plid, String portletId) fetchPreferences
(PortletPreferencesIds portletPreferencesIds) getDefaultPreferences
(long companyId, String portletId) Returns the OSGi service identifier.getPersistedModel
(Serializable primaryKeyObj) getPortletInstanceSettings
(long companyId, long groupId, String portletId, PortletInstanceSettingsLocator portletInstanceSettingsLocator, Settings portalPreferencesSettings) getPortletPreferences
(int ownerType, long plid, String portletId) getPortletPreferences
(long portletPreferencesId) Returns the portlet preferences with the primary key.getPortletPreferences
(long ownerId, int ownerType, long plid) getPortletPreferences
(long ownerId, int ownerType, long plid, String portletId) getPortletPreferences
(long companyId, long ownerId, int ownerType, String portletId) getPortletPreferences
(long companyId, long groupId, long ownerId, int ownerType, String portletId, boolean privateLayout) getPortletPreferences
(long plid, String portletId) getPortletPreferencesByOwnerId
(long ownerId) getPortletPreferencesByPlid
(long plid) getPortletPreferencesByPortletId
(String portletId) long
getPortletPreferencesCount
(int ownerType, long plid, String portletId) long
getPortletPreferencesCount
(int ownerType, String portletId) long
getPortletPreferencesCount
(long ownerId, int ownerType, long plid, Portlet portlet, boolean excludeDefaultPreferences) long
getPortletPreferencesCount
(long ownerId, int ownerType, String portletId, boolean excludeDefaultPreferences) int
getPortletPreferencesCount
(long companyId, long ownerId, int ownerType, String portletId) getPortletPreferenceses
(int start, int end) Returns a range of all the portlet preferenceses.int
Returns the number of portlet preferenceses.getPreferences
(long companyId, long ownerId, int ownerType, long plid, String portletId) getPreferences
(long companyId, long ownerId, int ownerType, long plid, String portletId, String defaultPreferences) getPreferences
(PortletPreferencesIds portletPreferencesIds) getStrictPreferences
(long companyId, long ownerId, int ownerType, long plid, String portletId) getStrictPreferences
(Layout layout, List<Portlet> portlets) getStrictPreferences
(PortletPreferencesIds portletPreferencesIds) updatePortletPreferences
(PortletPreferences portletPreferences) Updates the portlet preferences in the database or adds it if it does not yet exist.updatePreferences
(long ownerId, int ownerType, long plid, String portletId, String xml) updatePreferences
(long ownerId, int ownerType, long plid, String portletId, PortletPreferences portletPreferences) <R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<PortletPreferences>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addPortletPreferences
PortletPreferences addPortletPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId, Portlet portlet, String defaultPreferences) -
addPortletPreferences
@Indexable(type=REINDEX) PortletPreferences addPortletPreferences(PortletPreferences portletPreferences) Adds the portlet preferences to the database. Also notifies the appropriate model listeners.Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
portletPreferences
- the portlet preferences- Returns:
- the portlet preferences that was added
-
createPersistedModel
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
createPortletPreferences
@Transactional(enabled=false) PortletPreferences createPortletPreferences(long portletPreferencesId) Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database.- Parameters:
portletPreferencesId
- the primary key for the new portlet preferences- Returns:
- the new portlet preferences
-
deletePersistedModel
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
deletePortletPreferences
@Indexable(type=DELETE) PortletPreferences deletePortletPreferences(long portletPreferencesId) throws PortalException Deletes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
portletPreferencesId
- the primary key of the portlet preferences- Returns:
- the portlet preferences that was removed
- Throws:
PortalException
- if a portlet preferences with the primary key could not be found
-
deletePortletPreferences
void deletePortletPreferences(long ownerId, int ownerType, long plid) -
deletePortletPreferences
void deletePortletPreferences(long ownerId, int ownerType, long plid, String portletId) throws PortalException - Throws:
PortalException
-
deletePortletPreferences
@Indexable(type=DELETE) PortletPreferences deletePortletPreferences(PortletPreferences portletPreferences) Deletes the portlet preferences from the database. Also notifies the appropriate model listeners.Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
portletPreferences
- the portlet preferences- Returns:
- the portlet preferences that was removed
-
deletePortletPreferencesByOwnerId
void deletePortletPreferencesByOwnerId(long ownerId) -
deletePortletPreferencesByPlid
void deletePortletPreferencesByPlid(long plid) -
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.portal.model.impl.PortletPreferencesModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.portal.model.impl.PortletPreferencesModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences fetchPortletPreferences(long portletPreferencesId) -
fetchPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences fetchPortletPreferences(long ownerId, int ownerType, long plid, String portletId) -
fetchPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences fetchPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId) -
fetchPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences fetchPreferences(PortletPreferencesIds portletPreferencesIds) -
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getDefaultPreferences
@Transactional(enabled=false) PortletPreferences getDefaultPreferences(long companyId, String portletId) -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
getPortletInstanceSettings
@Transactional(propagation=SUPPORTS, readOnly=true) Settings getPortletInstanceSettings(long companyId, long groupId, String portletId, PortletInstanceSettingsLocator portletInstanceSettingsLocator, Settings portalPreferencesSettings) -
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferences() -
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferences(int ownerType, long plid, String portletId) -
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getPortletPreferences(long portletPreferencesId) throws PortalException Returns the portlet preferences with the primary key.- Parameters:
portletPreferencesId
- the primary key of the portlet preferences- Returns:
- the portlet preferences
- Throws:
PortalException
- if a portlet preferences with the primary key could not be found
-
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferences(long ownerId, int ownerType, long plid) -
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getPortletPreferences(long ownerId, int ownerType, long plid, String portletId) throws PortalException - Throws:
PortalException
-
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferences(long companyId, long ownerId, int ownerType, String portletId) throws PortalException - Throws:
PortalException
-
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferences(long companyId, long groupId, long ownerId, int ownerType, String portletId, boolean privateLayout) -
getPortletPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferences(long plid, String portletId) -
getPortletPreferencesByOwnerId
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferencesByOwnerId(long ownerId) -
getPortletPreferencesByPlid
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferencesByPlid(long plid) -
getPortletPreferencesByPortletId
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferencesByPortletId(String portletId) -
getPortletPreferencesCount
@Transactional(propagation=SUPPORTS, readOnly=true) long getPortletPreferencesCount(int ownerType, long plid, String portletId) -
getPortletPreferencesCount
@Transactional(propagation=SUPPORTS, readOnly=true) long getPortletPreferencesCount(int ownerType, String portletId) -
getPortletPreferencesCount
@Transactional(propagation=SUPPORTS, readOnly=true) long getPortletPreferencesCount(long ownerId, int ownerType, long plid, Portlet portlet, boolean excludeDefaultPreferences) -
getPortletPreferencesCount
@Transactional(propagation=SUPPORTS, readOnly=true) long getPortletPreferencesCount(long ownerId, int ownerType, String portletId, boolean excludeDefaultPreferences) -
getPortletPreferencesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getPortletPreferencesCount(long companyId, long ownerId, int ownerType, String portletId) -
getPortletPreferenceses
@Transactional(propagation=SUPPORTS, readOnly=true) List<PortletPreferences> getPortletPreferenceses(int start, int end) Returns a range of all the portlet preferenceses.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.portal.model.impl.PortletPreferencesModelImpl
.- Parameters:
start
- the lower bound of the range of portlet preferencesesend
- the upper bound of the range of portlet preferenceses (not inclusive)- Returns:
- the range of portlet preferenceses
-
getPortletPreferencesesCount
Returns the number of portlet preferenceses.- Returns:
- the number of portlet preferenceses
-
getPreferences
@Retry(acceptor=SQLStateAcceptor.class, properties=@Property(name="SQLSTATE",value="23")) @Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId) -
getPreferences
@Retry(acceptor=SQLStateAcceptor.class, properties=@Property(name="SQLSTATE",value="23")) @Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId, String defaultPreferences) -
getPreferences
@Retry(acceptor=SQLStateAcceptor.class, properties=@Property(name="SQLSTATE",value="23")) @Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getPreferences(PortletPreferencesIds portletPreferencesIds) -
getStrictPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) Map<String,PortletPreferences> getStrictPreferences(Layout layout, List<Portlet> portlets) -
getStrictPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getStrictPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId) -
getStrictPreferences
@Transactional(propagation=SUPPORTS, readOnly=true) PortletPreferences getStrictPreferences(PortletPreferencesIds portletPreferencesIds) -
updatePortletPreferences
@Indexable(type=REINDEX) PortletPreferences updatePortletPreferences(PortletPreferences portletPreferences) Updates the portlet preferences in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
portletPreferences
- the portlet preferences- Returns:
- the portlet preferences that was updated
-
updatePreferences
PortletPreferences updatePreferences(long ownerId, int ownerType, long plid, String portletId, PortletPreferences portletPreferences) -
updatePreferences
PortletPreferences updatePreferences(long ownerId, int ownerType, long plid, String portletId, String xml) -
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<PortletPreferences>
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<PortletPreferences>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<PortletPreferences>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<PortletPreferences>
- Throws:
E extends Throwable
-