All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.push.notifications.service.persistence.PushNotificationsDevicePersistence Maven / Gradle / Ivy

There is a newer version: 7.4.3.112-ga112
Show newest version
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.liferay.push.notifications.service.persistence;

import aQute.bnd.annotation.ProviderType;

import com.liferay.portal.kernel.service.persistence.BasePersistence;

import com.liferay.push.notifications.exception.NoSuchDeviceException;
import com.liferay.push.notifications.model.PushNotificationsDevice;

/**
 * The persistence interface for the push notifications device service.
 *
 * 

* Caching information and settings can be found in portal.properties *

* * @author Bruno Farache * @see com.liferay.push.notifications.service.persistence.impl.PushNotificationsDevicePersistenceImpl * @see PushNotificationsDeviceUtil * @generated */ @ProviderType public interface PushNotificationsDevicePersistence extends BasePersistence { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this interface directly. Always use {@link PushNotificationsDeviceUtil} to access the push notifications device persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. */ /** * Returns the push notifications device where token = ? or throws a {@link NoSuchDeviceException} if it could not be found. * * @param token the token * @return the matching push notifications device * @throws NoSuchDeviceException if a matching push notifications device could not be found */ public PushNotificationsDevice findByToken(String token) throws NoSuchDeviceException; /** * Returns the push notifications device where token = ? or returns null if it could not be found. Uses the finder cache. * * @param token the token * @return the matching push notifications device, or null if a matching push notifications device could not be found */ public PushNotificationsDevice fetchByToken(String token); /** * Returns the push notifications device where token = ? or returns null if it could not be found, optionally using the finder cache. * * @param token the token * @param retrieveFromCache whether to retrieve from the finder cache * @return the matching push notifications device, or null if a matching push notifications device could not be found */ public PushNotificationsDevice fetchByToken(String token, boolean retrieveFromCache); /** * Removes the push notifications device where token = ? from the database. * * @param token the token * @return the push notifications device that was removed */ public PushNotificationsDevice removeByToken(String token) throws NoSuchDeviceException; /** * Returns the number of push notifications devices where token = ?. * * @param token the token * @return the number of matching push notifications devices */ public int countByToken(String token); /** * Returns all the push notifications devices where userId = ? and platform = ?. * * @param userId the user ID * @param platform the platform * @return the matching push notifications devices */ public java.util.List findByU_P(long userId, String platform); /** * Returns a range of all the push notifications devices where userId = ? and 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userId the user ID * @param platform the platform * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @return the range of matching push notifications devices */ public java.util.List findByU_P(long userId, String platform, int start, int end); /** * Returns an ordered range of all the push notifications devices where userId = ? and 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userId the user ID * @param platform the platform * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching push notifications devices */ public java.util.List findByU_P(long userId, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator); /** * Returns an ordered range of all the push notifications devices where userId = ? and 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userId the user ID * @param platform the platform * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of matching push notifications devices */ public java.util.List findByU_P(long userId, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator, boolean retrieveFromCache); /** * Returns the first push notifications device in the ordered set where userId = ? and platform = ?. * * @param userId the user ID * @param platform the platform * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching push notifications device * @throws NoSuchDeviceException if a matching push notifications device could not be found */ public PushNotificationsDevice findByU_P_First(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws NoSuchDeviceException; /** * Returns the first push notifications device in the ordered set where userId = ? and platform = ?. * * @param userId the user ID * @param platform the platform * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching push notifications device, or null if a matching push notifications device could not be found */ public PushNotificationsDevice fetchByU_P_First(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator orderByComparator); /** * Returns the last push notifications device in the ordered set where userId = ? and platform = ?. * * @param userId the user ID * @param platform the platform * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching push notifications device * @throws NoSuchDeviceException if a matching push notifications device could not be found */ public PushNotificationsDevice findByU_P_Last(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws NoSuchDeviceException; /** * Returns the last push notifications device in the ordered set where userId = ? and platform = ?. * * @param userId the user ID * @param platform the platform * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching push notifications device, or null if a matching push notifications device could not be found */ public PushNotificationsDevice fetchByU_P_Last(long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator orderByComparator); /** * Returns the push notifications devices before and after the current push notifications device in the ordered set where userId = ? and platform = ?. * * @param pushNotificationsDeviceId the primary key of the current push notifications device * @param userId the user ID * @param platform the platform * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next push notifications device * @throws NoSuchDeviceException if a push notifications device with the primary key could not be found */ public PushNotificationsDevice[] findByU_P_PrevAndNext( long pushNotificationsDeviceId, long userId, String platform, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws NoSuchDeviceException; /** * Returns all the push notifications devices where userId = any ? and 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userIds the user IDs * @param platform the platform * @return the matching push notifications devices */ public java.util.List findByU_P(long[] userIds, String platform); /** * Returns a range of all the push notifications devices where userId = any ? and 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userIds the user IDs * @param platform the platform * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @return the range of matching push notifications devices */ public java.util.List findByU_P(long[] userIds, String platform, int start, int end); /** * Returns an ordered range of all the push notifications devices where userId = any ? and 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userIds the user IDs * @param platform the platform * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching push notifications devices */ public java.util.List findByU_P(long[] userIds, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator); /** * 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 - 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param userId the user ID * @param platform the platform * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of matching push notifications devices */ public java.util.List findByU_P(long[] userIds, String platform, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator, boolean retrieveFromCache); /** * Removes all the push notifications devices where userId = ? and platform = ? from the database. * * @param userId the user ID * @param platform the platform */ public void removeByU_P(long userId, String platform); /** * Returns the number of push notifications devices where userId = ? and platform = ?. * * @param userId the user ID * @param platform the platform * @return the number of matching push notifications devices */ public int countByU_P(long userId, String platform); /** * Returns the number of push notifications devices where userId = any ? and platform = ?. * * @param userIds the user IDs * @param platform the platform * @return the number of matching push notifications devices */ public int countByU_P(long[] userIds, String platform); /** * Caches the push notifications device in the entity cache if it is enabled. * * @param pushNotificationsDevice the push notifications device */ public void cacheResult(PushNotificationsDevice pushNotificationsDevice); /** * Caches the push notifications devices in the entity cache if it is enabled. * * @param pushNotificationsDevices the push notifications devices */ public void cacheResult( java.util.List pushNotificationsDevices); /** * Creates a new push notifications device with the primary key. Does not add the push notifications device to the database. * * @param pushNotificationsDeviceId the primary key for the new push notifications device * @return the new push notifications device */ public PushNotificationsDevice create(long pushNotificationsDeviceId); /** * Removes the push notifications device with the primary key from the database. Also notifies the appropriate model listeners. * * @param pushNotificationsDeviceId the primary key of the push notifications device * @return the push notifications device that was removed * @throws NoSuchDeviceException if a push notifications device with the primary key could not be found */ public PushNotificationsDevice remove(long pushNotificationsDeviceId) throws NoSuchDeviceException; public PushNotificationsDevice updateImpl( PushNotificationsDevice pushNotificationsDevice); /** * Returns the push notifications device with the primary key or throws a {@link NoSuchDeviceException} if it could not be found. * * @param pushNotificationsDeviceId the primary key of the push notifications device * @return the push notifications device * @throws NoSuchDeviceException if a push notifications device with the primary key could not be found */ public PushNotificationsDevice findByPrimaryKey( long pushNotificationsDeviceId) throws NoSuchDeviceException; /** * Returns the push notifications device with the primary key or returns null if it could not be found. * * @param pushNotificationsDeviceId the primary key of the push notifications device * @return the push notifications device, or null if a push notifications device with the primary key could not be found */ public PushNotificationsDevice fetchByPrimaryKey( long pushNotificationsDeviceId); @Override public java.util.Map fetchByPrimaryKeys( java.util.Set primaryKeys); /** * Returns all the push notifications devices. * * @return the push notifications devices */ public java.util.List findAll(); /** * Returns a range of all the push notifications devices. * *

* 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @return the range of push notifications devices */ public java.util.List findAll(int start, int end); /** * Returns an ordered range of all the push notifications devices. * *

* 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of push notifications devices */ public java.util.List findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator); /** * Returns an ordered range of all the push notifications devices. * *

* 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 {@link 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 {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. *

* * @param start the lower bound of the range of push notifications devices * @param end the upper bound of the range of push notifications devices (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @param retrieveFromCache whether to retrieve from the finder cache * @return the ordered range of push notifications devices */ public java.util.List findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator, boolean retrieveFromCache); /** * Removes all the push notifications devices from the database. */ public void removeAll(); /** * Returns the number of push notifications devices. * * @return the number of push notifications devices */ public int countAll(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy