Class PushNotificationsDeviceUtil
com.liferay.push.notifications.service.persistence.impl.PushNotificationsDevicePersistenceImpl 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
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(PushNotificationsDevice pushNotificationsDevice) static voidcacheResult(List<PushNotificationsDevice> pushNotificationsDevices) static voidstatic voidclearCache(PushNotificationsDevice pushNotificationsDevice) static intcountByToken(String token) Returns the number of push notifications devices where token = ?.static intcountByU_P(long[] userIds, String platform) Returns the number of push notifications devices where userId = any ? and platform = ?.static intcountByU_P(long userId, String platform) Returns the number of push notifications devices where userId = ? and platform = ?.static longcountWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static PushNotificationsDevicecreate(long pushNotificationsDeviceId) Creates a new push notifications device with the primary key.static PushNotificationsDevicefetchByPrimaryKey(long pushNotificationsDeviceId) Returns the push notifications device with the primary key or returnsnullif it could not be found.static Map<Serializable, PushNotificationsDevice> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static PushNotificationsDevicefetchByToken(String token) Returns the push notifications device where token = ? or returnsnullif it could not be found.static PushNotificationsDevicefetchByToken(String token, boolean useFinderCache) Returns the push notifications device where token = ? or returnsnullif it could not be found, optionally using the finder cache.static PushNotificationsDevicefetchByU_P_First(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns the first push notifications device in the ordered set where userId = ? and platform = ?.static PushNotificationsDevicefindByPrimaryKey(long pushNotificationsDeviceId) Returns the push notifications device with the primary key or throws aNoSuchDeviceExceptionif it could not be found.static PushNotificationsDevicefindByToken(String token) Returns the push notifications device where token = ? or throws aNoSuchDeviceExceptionif it could not be found.static List<PushNotificationsDevice> Returns all the push notifications devices where userId = any ? and platform = ?.static List<PushNotificationsDevice> Returns a range of all the push notifications devices where userId = any ? and platform = ?.static List<PushNotificationsDevice> findByU_P(long[] userIds, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns an ordered range of all the push notifications devices where userId = any ? and platform = ?.static List<PushNotificationsDevice> findByU_P(long[] userIds, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator, boolean useFinderCache) Returns an ordered range of all the push notifications devices where userId = ? and platform = ?, optionally using the finder cache.static List<PushNotificationsDevice> Returns all the push notifications devices where userId = ? and platform = ?.static List<PushNotificationsDevice> Returns a range of all the push notifications devices where userId = ? and platform = ?.static List<PushNotificationsDevice> findByU_P(long userId, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns an ordered range of all the push notifications devices where userId = ? and platform = ?.static List<PushNotificationsDevice> findByU_P(long userId, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator, boolean useFinderCache) Returns an ordered range of all the push notifications devices where userId = ? and platform = ?.static PushNotificationsDevicefindByU_P_First(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns the first push notifications device in the ordered set where userId = ? and platform = ?.static List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) static List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) static PushNotificationsDeviceremove(long pushNotificationsDeviceId) Removes the push notifications device with the primary key from the database.static PushNotificationsDeviceremoveByToken(String token) Removes the push notifications device where token = ? from the database.static voidremoveByU_P(long userId, String platform) Removes all the push notifications devices where userId = ? and platform = ? from the database.static voidsetPersistence(PushNotificationsDevicePersistence persistence) static PushNotificationsDeviceupdate(PushNotificationsDevice pushNotificationsDevice) static PushNotificationsDeviceupdate(PushNotificationsDevice pushNotificationsDevice, com.liferay.portal.kernel.service.ServiceContext serviceContext) static PushNotificationsDeviceupdateImpl(PushNotificationsDevice pushNotificationsDevice)
-
Constructor Details
-
PushNotificationsDeviceUtil
public PushNotificationsDeviceUtil()
-
-
Method Details
-
cacheResult
- See Also:
-
cacheResult
- See Also:
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
fetchByPrimaryKeys
public static Map<Serializable,PushNotificationsDevice> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
public static List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
findWithDynamicQuery
public static List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
findWithDynamicQuery
public static List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) - See Also:
-
update
- See Also:
-
update
public static PushNotificationsDevice update(PushNotificationsDevice pushNotificationsDevice, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
findByToken
Returns the push notifications device where token = ? or throws aNoSuchDeviceExceptionif it could not be found.- Parameters:
token- the token- Returns:
- the matching push notifications device
-
fetchByToken
Returns the push notifications device where token = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
token- the tokenuseFinderCache- whether to use the finder cache- Returns:
- the matching push notifications device, or
nullif a matching push notifications device could not be found
-
removeByToken
Removes the push notifications device where token = ? from the database.- Parameters:
token- the token- Returns:
- the push notifications device that was removed
- Throws:
NoSuchDeviceException
-
countByToken
Returns the number of push notifications devices where token = ?.- Parameters:
token- the token- Returns:
- the number of matching push notifications devices
-
findByU_P
public static List<PushNotificationsDevice> findByU_P(long userId, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator, boolean useFinderCache) Returns an ordered range of all the push notifications devices where userId = ? and platform = ?.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.push.notifications.model.impl.PushNotificationsDeviceModelImpl.- Parameters:
userId- the user IDplatform- the platformstart- the lower bound of the range of push notifications devicesend- the upper bound of the range of push notifications devices (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching push notifications devices
-
findByU_P_First
public static PushNotificationsDevice findByU_P_First(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) throws NoSuchDeviceException Returns the first push notifications device in the ordered set where userId = ? and platform = ?.- Parameters:
userId- the user IDplatform- the platformorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching push notifications device
-
fetchByU_P_First
public static PushNotificationsDevice fetchByU_P_First(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns the first push notifications device in the ordered set where userId = ? and platform = ?.- Parameters:
userId- the user IDplatform- the platformorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching push notifications device, or
nullif a matching push notifications device could not be found
-
findByU_P
public static List<PushNotificationsDevice> findByU_P(long[] userIds, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator, boolean useFinderCache) Returns an ordered range of all the push notifications devices where userId = ? and platform = ?, optionally using the finder cache.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.push.notifications.model.impl.PushNotificationsDeviceModelImpl.- Parameters:
userIds- the user IDsplatform- the platformstart- the lower bound of the range of push notifications devicesend- the upper bound of the range of push notifications devices (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching push notifications devices
-
removeByU_P
Removes all the push notifications devices where userId = ? and platform = ? from the database.- Parameters:
userId- the user IDplatform- the platform
-
countByU_P
Returns the number of push notifications devices where userId = ? and platform = ?.- Parameters:
userId- the user IDplatform- the platform- Returns:
- the number of matching push notifications devices
-
countByU_P
Returns the number of push notifications devices where userId = any ? and platform = ?.- Parameters:
userIds- the user IDsplatform- the platform- Returns:
- the number of matching push notifications devices
-
create
Creates a new push notifications device with the primary key. Does not add the push notifications device to the database.- Parameters:
pushNotificationsDeviceId- the primary key for the new push notifications device- Returns:
- the new push notifications device
-
remove
public static PushNotificationsDevice remove(long pushNotificationsDeviceId) throws NoSuchDeviceException Removes the push notifications device with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
pushNotificationsDeviceId- the primary key of the push notifications device- Returns:
- the push notifications device that was removed
-
updateImpl
-
findByPrimaryKey
public static PushNotificationsDevice findByPrimaryKey(long pushNotificationsDeviceId) throws NoSuchDeviceException Returns the push notifications device with the primary key or throws aNoSuchDeviceExceptionif it could not be found.- Parameters:
pushNotificationsDeviceId- the primary key of the push notifications device- Returns:
- the push notifications device
-
fetchByPrimaryKey
Returns the push notifications device with the primary key or returnsnullif it could not be found.- Parameters:
pushNotificationsDeviceId- the primary key of the push notifications device- Returns:
- the push notifications device, or
nullif a push notifications device with the primary key could not be found
-
fetchByToken
Returns the push notifications device where token = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
token- the token- Returns:
- the matching push notifications device, or
nullif a matching push notifications device could not be found
-
findByU_P
Returns all the push notifications devices where userId = ? and platform = ?.- Parameters:
userId- the user IDplatform- the platform- Returns:
- the matching push notifications devices
-
findByU_P
public static List<PushNotificationsDevice> findByU_P(long userId, String platform, int start, int end) Returns a range of all the push notifications devices where userId = ? and platform = ?.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.push.notifications.model.impl.PushNotificationsDeviceModelImpl.- Parameters:
userId- the user IDplatform- the platformstart- the lower bound of the range of push notifications devicesend- the upper bound of the range of push notifications devices (not inclusive)- Returns:
- the range of matching push notifications devices
-
findByU_P
public static List<PushNotificationsDevice> findByU_P(long userId, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns an ordered range of all the push notifications devices where userId = ? and platform = ?.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.push.notifications.model.impl.PushNotificationsDeviceModelImpl.- Parameters:
userId- the user IDplatform- the platformstart- the lower bound of the range of push notifications devicesend- the upper bound of the range of push notifications devices (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching push notifications devices
-
findByU_P
Returns all the push notifications devices where userId = any ? and platform = ?.- Parameters:
userIds- the user IDsplatform- the platform- Returns:
- the matching push notifications devices
-
findByU_P
public static List<PushNotificationsDevice> findByU_P(long[] userIds, String platform, int start, int end) Returns a range of all the push notifications devices where userId = any ? and platform = ?.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.push.notifications.model.impl.PushNotificationsDeviceModelImpl.- Parameters:
userIds- the user IDsplatform- the platformstart- the lower bound of the range of push notifications devicesend- the upper bound of the range of push notifications devices (not inclusive)- Returns:
- the range of matching push notifications devices
-
findByU_P
public static List<PushNotificationsDevice> findByU_P(long[] userIds, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) Returns an ordered range of all the push notifications devices where userId = any ? and platform = ?.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.push.notifications.model.impl.PushNotificationsDeviceModelImpl.- Parameters:
userIds- the user IDsplatform- the platformstart- the lower bound of the range of push notifications devicesend- the upper bound of the range of push notifications devices (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching push notifications devices
-
getPersistence
-
setPersistence
-