@ProviderType
public class PushNotificationsDeviceUtil
extends java.lang.Object
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
PushNotificationsDevicePersistence
,
com.liferay.push.notifications.service.persistence.impl.PushNotificationsDevicePersistenceImpl
Constructor and Description |
---|
PushNotificationsDeviceUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(java.util.List<PushNotificationsDevice> pushNotificationsDevices)
Caches the push notifications devices in the entity cache if it is enabled.
|
static void |
cacheResult(PushNotificationsDevice pushNotificationsDevice)
Caches the push notifications device in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(PushNotificationsDevice pushNotificationsDevice) |
static int |
countAll()
Returns the number of push notifications devices.
|
static int |
countByToken(java.lang.String token)
Returns the number of push notifications devices where token = ?.
|
static int |
countByU_P(long[] userIds,
java.lang.String platform)
Returns the number of push notifications devices where userId = any ? and platform = ?.
|
static int |
countByU_P(long userId,
java.lang.String platform)
Returns the number of push notifications devices where userId = ? and platform = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static PushNotificationsDevice |
create(long pushNotificationsDeviceId)
Creates a new push notifications device with the primary key.
|
static PushNotificationsDevice |
fetchByPrimaryKey(long pushNotificationsDeviceId)
Returns the push notifications device with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,PushNotificationsDevice> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static PushNotificationsDevice |
fetchByToken(java.lang.String token)
Returns the push notifications device where token = ? or returns
null if it could not be found. |
static PushNotificationsDevice |
fetchByToken(java.lang.String token,
boolean retrieveFromCache)
Returns the push notifications device where token = ? or returns
null if it could not be found, optionally using the finder cache. |
static PushNotificationsDevice |
fetchByU_P_First(long userId,
java.lang.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 PushNotificationsDevice |
fetchByU_P_Last(long userId,
java.lang.String platform,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
Returns the last push notifications device in the ordered set where userId = ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findAll()
Returns all the push notifications devices.
|
static java.util.List<PushNotificationsDevice> |
findAll(int start,
int end)
Returns a range of all the push notifications devices.
|
static java.util.List<PushNotificationsDevice> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
Returns an ordered range of all the push notifications devices.
|
static java.util.List<PushNotificationsDevice> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the push notifications devices.
|
static PushNotificationsDevice |
findByPrimaryKey(long pushNotificationsDeviceId)
Returns the push notifications device with the primary key or throws a
NoSuchDeviceException if it could not be found. |
static PushNotificationsDevice |
findByToken(java.lang.String token)
Returns the push notifications device where token = ? or throws a
NoSuchDeviceException if it could not be found. |
static PushNotificationsDevice |
findByU_P_First(long userId,
java.lang.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 PushNotificationsDevice |
findByU_P_Last(long userId,
java.lang.String platform,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
Returns the last push notifications device in the ordered set where userId = ? and platform = ?.
|
static PushNotificationsDevice[] |
findByU_P_PrevAndNext(long pushNotificationsDeviceId,
long userId,
java.lang.String platform,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
Returns the push notifications devices before and after the current push notifications device in the ordered set where userId = ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findByU_P(long[] userIds,
java.lang.String platform)
Returns all the push notifications devices where userId = any ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findByU_P(long[] userIds,
java.lang.String platform,
int start,
int end)
Returns a range of all the push notifications devices where userId = any ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findByU_P(long[] userIds,
java.lang.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 java.util.List<PushNotificationsDevice> |
findByU_P(long[] userIds,
java.lang.String platform,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the push notifications devices where userId = ? and platform = ?, optionally using the finder cache.
|
static java.util.List<PushNotificationsDevice> |
findByU_P(long userId,
java.lang.String platform)
Returns all the push notifications devices where userId = ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findByU_P(long userId,
java.lang.String platform,
int start,
int end)
Returns a range of all the push notifications devices where userId = ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findByU_P(long userId,
java.lang.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 java.util.List<PushNotificationsDevice> |
findByU_P(long userId,
java.lang.String platform,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the push notifications devices where userId = ? and platform = ?.
|
static java.util.List<PushNotificationsDevice> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<PushNotificationsDevice> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<PushNotificationsDevice> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) |
static PushNotificationsDevicePersistence |
getPersistence() |
static PushNotificationsDevice |
remove(long pushNotificationsDeviceId)
Removes the push notifications device with the primary key from the database.
|
static void |
removeAll()
Removes all the push notifications devices from the database.
|
static PushNotificationsDevice |
removeByToken(java.lang.String token)
Removes the push notifications device where token = ? from the database.
|
static void |
removeByU_P(long userId,
java.lang.String platform)
Removes all the push notifications devices where userId = ? and platform = ? from the database.
|
static PushNotificationsDevice |
update(PushNotificationsDevice pushNotificationsDevice) |
static PushNotificationsDevice |
update(PushNotificationsDevice pushNotificationsDevice,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static PushNotificationsDevice |
updateImpl(PushNotificationsDevice pushNotificationsDevice) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(PushNotificationsDevice pushNotificationsDevice)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<PushNotificationsDevice> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static PushNotificationsDevice update(PushNotificationsDevice pushNotificationsDevice)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static PushNotificationsDevice update(PushNotificationsDevice pushNotificationsDevice, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static PushNotificationsDevice findByToken(java.lang.String token) throws NoSuchDeviceException
NoSuchDeviceException
if it could not be found.token
- the tokenNoSuchDeviceException
- if a matching push notifications device could not be foundpublic static PushNotificationsDevice fetchByToken(java.lang.String token)
null
if it could not be found. Uses the finder cache.token
- the tokennull
if a matching push notifications device could not be foundpublic static PushNotificationsDevice fetchByToken(java.lang.String token, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.token
- the tokenretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching push notifications device could not be foundpublic static PushNotificationsDevice removeByToken(java.lang.String token) throws NoSuchDeviceException
token
- the tokenNoSuchDeviceException
public static int countByToken(java.lang.String token)
token
- the tokenpublic static java.util.List<PushNotificationsDevice> findByU_P(long userId, java.lang.String platform)
userId
- the user IDplatform
- the platformpublic static java.util.List<PushNotificationsDevice> findByU_P(long userId, java.lang.String platform, 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 PushNotificationsDeviceModelImpl
. 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.
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)public static java.util.List<PushNotificationsDevice> findByU_P(long userId, java.lang.String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
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 (optionally null
)public static java.util.List<PushNotificationsDevice> findByU_P(long userId, java.lang.String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
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 (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static PushNotificationsDevice findByU_P_First(long userId, java.lang.String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) throws NoSuchDeviceException
userId
- the user IDplatform
- the platformorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDeviceException
- if a matching push notifications device could not be foundpublic static PushNotificationsDevice fetchByU_P_First(long userId, java.lang.String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
userId
- the user IDplatform
- the platformorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching push notifications device could not be foundpublic static PushNotificationsDevice findByU_P_Last(long userId, java.lang.String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) throws NoSuchDeviceException
userId
- the user IDplatform
- the platformorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDeviceException
- if a matching push notifications device could not be foundpublic static PushNotificationsDevice fetchByU_P_Last(long userId, java.lang.String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator)
userId
- the user IDplatform
- the platformorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching push notifications device could not be foundpublic static PushNotificationsDevice[] findByU_P_PrevAndNext(long pushNotificationsDeviceId, long userId, java.lang.String platform, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> orderByComparator) throws NoSuchDeviceException
pushNotificationsDeviceId
- the primary key of the current push notifications deviceuserId
- the user IDplatform
- the platformorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDeviceException
- if a push notifications device with the primary key could not be foundpublic static java.util.List<PushNotificationsDevice> findByU_P(long[] userIds, java.lang.String platform)
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 PushNotificationsDeviceModelImpl
. 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.
userIds
- the user IDsplatform
- the platformpublic static java.util.List<PushNotificationsDevice> findByU_P(long[] userIds, java.lang.String platform, 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 PushNotificationsDeviceModelImpl
. 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.
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)public static java.util.List<PushNotificationsDevice> findByU_P(long[] userIds, java.lang.String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
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 (optionally null
)public static java.util.List<PushNotificationsDevice> findByU_P(long[] userIds, java.lang.String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
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 (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static void removeByU_P(long userId, java.lang.String platform)
userId
- the user IDplatform
- the platformpublic static int countByU_P(long userId, java.lang.String platform)
userId
- the user IDplatform
- the platformpublic static int countByU_P(long[] userIds, java.lang.String platform)
userIds
- the user IDsplatform
- the platformpublic static void cacheResult(PushNotificationsDevice pushNotificationsDevice)
pushNotificationsDevice
- the push notifications devicepublic static void cacheResult(java.util.List<PushNotificationsDevice> pushNotificationsDevices)
pushNotificationsDevices
- the push notifications devicespublic static PushNotificationsDevice create(long pushNotificationsDeviceId)
pushNotificationsDeviceId
- the primary key for the new push notifications devicepublic static PushNotificationsDevice remove(long pushNotificationsDeviceId) throws NoSuchDeviceException
pushNotificationsDeviceId
- the primary key of the push notifications deviceNoSuchDeviceException
- if a push notifications device with the primary key could not be foundpublic static PushNotificationsDevice updateImpl(PushNotificationsDevice pushNotificationsDevice)
public static PushNotificationsDevice findByPrimaryKey(long pushNotificationsDeviceId) throws NoSuchDeviceException
NoSuchDeviceException
if it could not be found.pushNotificationsDeviceId
- the primary key of the push notifications deviceNoSuchDeviceException
- if a push notifications device with the primary key could not be foundpublic static PushNotificationsDevice fetchByPrimaryKey(long pushNotificationsDeviceId)
null
if it could not be found.pushNotificationsDeviceId
- the primary key of the push notifications devicenull
if a push notifications device with the primary key could not be foundpublic static java.util.Map<java.io.Serializable,PushNotificationsDevice> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
public static java.util.List<PushNotificationsDevice> findAll()
public static java.util.List<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
start
- the lower bound of the range of push notifications devicesend
- the upper bound of the range of push notifications devices (not inclusive)public static java.util.List<PushNotificationsDevice> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
start
- 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 (optionally null
)public static java.util.List<PushNotificationsDevice> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<PushNotificationsDevice> 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 PushNotificationsDeviceModelImpl
. 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.
start
- 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 (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static void removeAll()
public static int countAll()
public static PushNotificationsDevicePersistence getPersistence()