Class UserNotificationDeliveryUtil
com.liferay.portal.service.persistence.impl.UserNotificationDeliveryPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
Caching information and settings can be found in portal.properties
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(UserNotificationDelivery userNotificationDelivery) Caches the user notification delivery in the entity cache if it is enabled.static voidcacheResult(List<UserNotificationDelivery> userNotificationDeliveries) Caches the user notification deliveries in the entity cache if it is enabled.static voidstatic voidclearCache(UserNotificationDelivery userNotificationDelivery) static intcountAll()Returns the number of user notification deliveries.static intcountByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) Returns the number of user notification deliveries where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ?.static intcountByUserId(long userId) Returns the number of user notification deliveries where userId = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static UserNotificationDeliverycreate(long userNotificationDeliveryId) Creates a new user notification delivery with the primary key.static UserNotificationDeliveryfetchByPrimaryKey(long userNotificationDeliveryId) Returns the user notification delivery with the primary key or returnsnullif it could not be found.static Map<Serializable,UserNotificationDelivery> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static UserNotificationDeliveryfetchByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or returnsnullif it could not be found.static UserNotificationDeliveryfetchByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType, boolean useFinderCache) Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or returnsnullif it could not be found, optionally using the finder cache.static UserNotificationDeliveryfetchByUserId_First(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the first user notification delivery in the ordered set where userId = ?.static UserNotificationDeliveryfetchByUserId_Last(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the last user notification delivery in the ordered set where userId = ?.static List<UserNotificationDelivery>findAll()Returns all the user notification deliveries.static List<UserNotificationDelivery>findAll(int start, int end) Returns a range of all the user notification deliveries.static List<UserNotificationDelivery>findAll(int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns an ordered range of all the user notification deliveries.static List<UserNotificationDelivery>findAll(int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator, boolean useFinderCache) Returns an ordered range of all the user notification deliveries.static UserNotificationDeliveryfindByPrimaryKey(long userNotificationDeliveryId) Returns the user notification delivery with the primary key or throws aNoSuchUserNotificationDeliveryExceptionif it could not be found.static UserNotificationDeliveryfindByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or throws aNoSuchUserNotificationDeliveryExceptionif it could not be found.static List<UserNotificationDelivery>findByUserId(long userId) Returns all the user notification deliveries where userId = ?.static List<UserNotificationDelivery>findByUserId(long userId, int start, int end) Returns a range of all the user notification deliveries where userId = ?.static List<UserNotificationDelivery>findByUserId(long userId, int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns an ordered range of all the user notification deliveries where userId = ?.static List<UserNotificationDelivery>findByUserId(long userId, int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator, boolean useFinderCache) Returns an ordered range of all the user notification deliveries where userId = ?.static UserNotificationDeliveryfindByUserId_First(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the first user notification delivery in the ordered set where userId = ?.static UserNotificationDeliveryfindByUserId_Last(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the last user notification delivery in the ordered set where userId = ?.static UserNotificationDelivery[]findByUserId_PrevAndNext(long userNotificationDeliveryId, long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the user notification deliveries before and after the current user notification delivery in the ordered set where userId = ?.static List<UserNotificationDelivery>findWithDynamicQuery(DynamicQuery dynamicQuery) static List<UserNotificationDelivery>findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) static List<UserNotificationDelivery>findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator) static UserNotificationDeliveryremove(long userNotificationDeliveryId) Removes the user notification delivery with the primary key from the database.static voidRemoves all the user notification deliveries from the database.static UserNotificationDeliveryremoveByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) Removes the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? from the database.static voidremoveByUserId(long userId) Removes all the user notification deliveries where userId = ? from the database.static voidsetPersistence(UserNotificationDeliveryPersistence persistence) static UserNotificationDeliveryupdate(UserNotificationDelivery userNotificationDelivery) static UserNotificationDeliveryupdate(UserNotificationDelivery userNotificationDelivery, ServiceContext serviceContext) static UserNotificationDeliveryupdateImpl(UserNotificationDelivery userNotificationDelivery)
-
Constructor Details
-
UserNotificationDeliveryUtil
public UserNotificationDeliveryUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
-
countWithDynamicQuery
-
fetchByPrimaryKeys
public static Map<Serializable,UserNotificationDelivery> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
-
findWithDynamicQuery
public static List<UserNotificationDelivery> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) -
findWithDynamicQuery
public static List<UserNotificationDelivery> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator) -
update
-
update
public static UserNotificationDelivery update(UserNotificationDelivery userNotificationDelivery, ServiceContext serviceContext) -
findByUserId
Returns all the user notification deliveries where userId = ?.- Parameters:
userId- the user ID- Returns:
- the matching user notification deliveries
-
findByUserId
Returns a range of all the user notification deliveries where userId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromUserNotificationDeliveryModelImpl.- Parameters:
userId- the user IDstart- the lower bound of the range of user notification deliveriesend- the upper bound of the range of user notification deliveries (not inclusive)- Returns:
- the range of matching user notification deliveries
-
findByUserId
public static List<UserNotificationDelivery> findByUserId(long userId, int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns an ordered range of all the user notification deliveries where userId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromUserNotificationDeliveryModelImpl.- Parameters:
userId- the user IDstart- the lower bound of the range of user notification deliveriesend- the upper bound of the range of user notification deliveries (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching user notification deliveries
-
findByUserId
public static List<UserNotificationDelivery> findByUserId(long userId, int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator, boolean useFinderCache) Returns an ordered range of all the user notification deliveries where userId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromUserNotificationDeliveryModelImpl.- Parameters:
userId- the user IDstart- the lower bound of the range of user notification deliveriesend- the upper bound of the range of user notification deliveries (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching user notification deliveries
-
findByUserId_First
public static UserNotificationDelivery findByUserId_First(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) throws NoSuchUserNotificationDeliveryException Returns the first user notification delivery in the ordered set where userId = ?.- Parameters:
userId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching user notification delivery
- Throws:
NoSuchUserNotificationDeliveryException- if a matching user notification delivery could not be foundNoSuchUserNotificationDeliveryException
-
fetchByUserId_First
public static UserNotificationDelivery fetchByUserId_First(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the first user notification delivery in the ordered set where userId = ?.- Parameters:
userId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching user notification delivery, or
nullif a matching user notification delivery could not be found
-
findByUserId_Last
public static UserNotificationDelivery findByUserId_Last(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) throws NoSuchUserNotificationDeliveryException Returns the last user notification delivery in the ordered set where userId = ?.- Parameters:
userId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching user notification delivery
- Throws:
NoSuchUserNotificationDeliveryException- if a matching user notification delivery could not be foundNoSuchUserNotificationDeliveryException
-
fetchByUserId_Last
public static UserNotificationDelivery fetchByUserId_Last(long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns the last user notification delivery in the ordered set where userId = ?.- Parameters:
userId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching user notification delivery, or
nullif a matching user notification delivery could not be found
-
findByUserId_PrevAndNext
public static UserNotificationDelivery[] findByUserId_PrevAndNext(long userNotificationDeliveryId, long userId, OrderByComparator<UserNotificationDelivery> orderByComparator) throws NoSuchUserNotificationDeliveryException Returns the user notification deliveries before and after the current user notification delivery in the ordered set where userId = ?.- Parameters:
userNotificationDeliveryId- the primary key of the current user notification deliveryuserId- the user IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the previous, current, and next user notification delivery
- Throws:
NoSuchUserNotificationDeliveryException- if a user notification delivery with the primary key could not be foundNoSuchUserNotificationDeliveryException
-
removeByUserId
public static void removeByUserId(long userId) Removes all the user notification deliveries where userId = ? from the database.- Parameters:
userId- the user ID
-
countByUserId
public static int countByUserId(long userId) Returns the number of user notification deliveries where userId = ?.- Parameters:
userId- the user ID- Returns:
- the number of matching user notification deliveries
-
findByU_P_C_N_D
public static UserNotificationDelivery findByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) throws NoSuchUserNotificationDeliveryException Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or throws aNoSuchUserNotificationDeliveryExceptionif it could not be found.- Parameters:
userId- the user IDportletId- the portlet IDclassNameId- the class name IDnotificationType- the notification typedeliveryType- the delivery type- Returns:
- the matching user notification delivery
- Throws:
NoSuchUserNotificationDeliveryException- if a matching user notification delivery could not be foundNoSuchUserNotificationDeliveryException
-
fetchByU_P_C_N_D
public static UserNotificationDelivery fetchByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
userId- the user IDportletId- the portlet IDclassNameId- the class name IDnotificationType- the notification typedeliveryType- the delivery type- Returns:
- the matching user notification delivery, or
nullif a matching user notification delivery could not be found
-
fetchByU_P_C_N_D
public static UserNotificationDelivery fetchByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType, boolean useFinderCache) Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
userId- the user IDportletId- the portlet IDclassNameId- the class name IDnotificationType- the notification typedeliveryType- the delivery typeuseFinderCache- whether to use the finder cache- Returns:
- the matching user notification delivery, or
nullif a matching user notification delivery could not be found
-
removeByU_P_C_N_D
public static UserNotificationDelivery removeByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) throws NoSuchUserNotificationDeliveryException Removes the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? from the database.- Parameters:
userId- the user IDportletId- the portlet IDclassNameId- the class name IDnotificationType- the notification typedeliveryType- the delivery type- Returns:
- the user notification delivery that was removed
- Throws:
NoSuchUserNotificationDeliveryException
-
countByU_P_C_N_D
public static int countByU_P_C_N_D(long userId, String portletId, long classNameId, int notificationType, int deliveryType) Returns the number of user notification deliveries where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ?.- Parameters:
userId- the user IDportletId- the portlet IDclassNameId- the class name IDnotificationType- the notification typedeliveryType- the delivery type- Returns:
- the number of matching user notification deliveries
-
cacheResult
Caches the user notification delivery in the entity cache if it is enabled.- Parameters:
userNotificationDelivery- the user notification delivery
-
cacheResult
Caches the user notification deliveries in the entity cache if it is enabled.- Parameters:
userNotificationDeliveries- the user notification deliveries
-
create
Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database.- Parameters:
userNotificationDeliveryId- the primary key for the new user notification delivery- Returns:
- the new user notification delivery
-
remove
public static UserNotificationDelivery remove(long userNotificationDeliveryId) throws NoSuchUserNotificationDeliveryException Removes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
userNotificationDeliveryId- the primary key of the user notification delivery- Returns:
- the user notification delivery that was removed
- Throws:
NoSuchUserNotificationDeliveryException- if a user notification delivery with the primary key could not be foundNoSuchUserNotificationDeliveryException
-
updateImpl
public static UserNotificationDelivery updateImpl(UserNotificationDelivery userNotificationDelivery) -
findByPrimaryKey
public static UserNotificationDelivery findByPrimaryKey(long userNotificationDeliveryId) throws NoSuchUserNotificationDeliveryException Returns the user notification delivery with the primary key or throws aNoSuchUserNotificationDeliveryExceptionif it could not be found.- Parameters:
userNotificationDeliveryId- the primary key of the user notification delivery- Returns:
- the user notification delivery
- Throws:
NoSuchUserNotificationDeliveryException- if a user notification delivery with the primary key could not be foundNoSuchUserNotificationDeliveryException
-
fetchByPrimaryKey
Returns the user notification delivery with the primary key or returnsnullif it could not be found.- Parameters:
userNotificationDeliveryId- the primary key of the user notification delivery- Returns:
- the user notification delivery, or
nullif a user notification delivery with the primary key could not be found
-
findAll
Returns all the user notification deliveries.- Returns:
- the user notification deliveries
-
findAll
Returns a range of all the user notification deliveries.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromUserNotificationDeliveryModelImpl.- Parameters:
start- the lower bound of the range of user notification deliveriesend- the upper bound of the range of user notification deliveries (not inclusive)- Returns:
- the range of user notification deliveries
-
findAll
public static List<UserNotificationDelivery> findAll(int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator) Returns an ordered range of all the user notification deliveries.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromUserNotificationDeliveryModelImpl.- Parameters:
start- the lower bound of the range of user notification deliveriesend- the upper bound of the range of user notification deliveries (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of user notification deliveries
-
findAll
public static List<UserNotificationDelivery> findAll(int start, int end, OrderByComparator<UserNotificationDelivery> orderByComparator, boolean useFinderCache) Returns an ordered range of all the user notification deliveries.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromUserNotificationDeliveryModelImpl.- Parameters:
start- the lower bound of the range of user notification deliveriesend- the upper bound of the range of user notification deliveries (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of user notification deliveries
-
removeAll
public static void removeAll()Removes all the user notification deliveries from the database. -
countAll
public static int countAll()Returns the number of user notification deliveries.- Returns:
- the number of user notification deliveries
-
getPersistence
-
setPersistence
-