001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for UserNotificationDelivery. This utility wraps
024     * {@link com.liferay.portal.service.impl.UserNotificationDeliveryLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see UserNotificationDeliveryLocalService
032     * @see com.liferay.portal.service.base.UserNotificationDeliveryLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.UserNotificationDeliveryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class UserNotificationDeliveryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserNotificationDeliveryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portal.model.UserNotificationDelivery addUserNotificationDelivery(
044                    long userId, java.lang.String portletId, long classNameId,
045                    int notificationType, int deliveryType, boolean deliver)
046                    throws com.liferay.portal.kernel.exception.PortalException {
047                    return getService()
048                                       .addUserNotificationDelivery(userId, portletId, classNameId,
049                            notificationType, deliveryType, deliver);
050            }
051    
052            /**
053            * Adds the user notification delivery to the database. Also notifies the appropriate model listeners.
054            *
055            * @param userNotificationDelivery the user notification delivery
056            * @return the user notification delivery that was added
057            */
058            public static com.liferay.portal.model.UserNotificationDelivery addUserNotificationDelivery(
059                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) {
060                    return getService().addUserNotificationDelivery(userNotificationDelivery);
061            }
062    
063            /**
064            * Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database.
065            *
066            * @param userNotificationDeliveryId the primary key for the new user notification delivery
067            * @return the new user notification delivery
068            */
069            public static com.liferay.portal.model.UserNotificationDelivery createUserNotificationDelivery(
070                    long userNotificationDeliveryId) {
071                    return getService()
072                                       .createUserNotificationDelivery(userNotificationDeliveryId);
073            }
074    
075            /**
076            * @throws PortalException
077            */
078            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
079                    com.liferay.portal.model.PersistedModel persistedModel)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    return getService().deletePersistedModel(persistedModel);
082            }
083    
084            public static void deleteUserNotificationDeliveries(long userId) {
085                    getService().deleteUserNotificationDeliveries(userId);
086            }
087    
088            public static void deleteUserNotificationDelivery(long userId,
089                    java.lang.String portletId, long classNameId, int notificationType,
090                    int deliveryType) {
091                    getService()
092                            .deleteUserNotificationDelivery(userId, portletId, classNameId,
093                            notificationType, deliveryType);
094            }
095    
096            /**
097            * Deletes the user notification delivery from the database. Also notifies the appropriate model listeners.
098            *
099            * @param userNotificationDelivery the user notification delivery
100            * @return the user notification delivery that was removed
101            */
102            public static com.liferay.portal.model.UserNotificationDelivery deleteUserNotificationDelivery(
103                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) {
104                    return getService()
105                                       .deleteUserNotificationDelivery(userNotificationDelivery);
106            }
107    
108            /**
109            * Deletes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners.
110            *
111            * @param userNotificationDeliveryId the primary key of the user notification delivery
112            * @return the user notification delivery that was removed
113            * @throws PortalException if a user notification delivery with the primary key could not be found
114            */
115            public static com.liferay.portal.model.UserNotificationDelivery deleteUserNotificationDelivery(
116                    long userNotificationDeliveryId)
117                    throws com.liferay.portal.kernel.exception.PortalException {
118                    return getService()
119                                       .deleteUserNotificationDelivery(userNotificationDeliveryId);
120            }
121    
122            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
123                    return getService().dynamicQuery();
124            }
125    
126            /**
127            * Performs a dynamic query on the database and returns the matching rows.
128            *
129            * @param dynamicQuery the dynamic query
130            * @return the matching rows
131            */
132            public static <T> java.util.List<T> dynamicQuery(
133                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
134                    return getService().dynamicQuery(dynamicQuery);
135            }
136    
137            /**
138            * Performs a dynamic query on the database and returns a range of the matching rows.
139            *
140            * <p>
141            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserNotificationDeliveryModelImpl}. If both <code>orderByComparator</code> 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.
142            * </p>
143            *
144            * @param dynamicQuery the dynamic query
145            * @param start the lower bound of the range of model instances
146            * @param end the upper bound of the range of model instances (not inclusive)
147            * @return the range of matching rows
148            */
149            public static <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151                    int end) {
152                    return getService().dynamicQuery(dynamicQuery, start, end);
153            }
154    
155            /**
156            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
157            *
158            * <p>
159            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserNotificationDeliveryModelImpl}. If both <code>orderByComparator</code> 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.
160            * </p>
161            *
162            * @param dynamicQuery the dynamic query
163            * @param start the lower bound of the range of model instances
164            * @param end the upper bound of the range of model instances (not inclusive)
165            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
166            * @return the ordered range of matching rows
167            */
168            public static <T> java.util.List<T> dynamicQuery(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
170                    int end,
171                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
172                    return getService()
173                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
174            }
175    
176            /**
177            * Returns the number of rows matching the dynamic query.
178            *
179            * @param dynamicQuery the dynamic query
180            * @return the number of rows matching the dynamic query
181            */
182            public static long dynamicQueryCount(
183                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
184                    return getService().dynamicQueryCount(dynamicQuery);
185            }
186    
187            /**
188            * Returns the number of rows matching the dynamic query.
189            *
190            * @param dynamicQuery the dynamic query
191            * @param projection the projection to apply to the query
192            * @return the number of rows matching the dynamic query
193            */
194            public static long dynamicQueryCount(
195                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
196                    com.liferay.portal.kernel.dao.orm.Projection projection) {
197                    return getService().dynamicQueryCount(dynamicQuery, projection);
198            }
199    
200            public static com.liferay.portal.model.UserNotificationDelivery fetchUserNotificationDelivery(
201                    long userId, java.lang.String portletId, long classNameId,
202                    int notificationType, int deliveryType) {
203                    return getService()
204                                       .fetchUserNotificationDelivery(userId, portletId,
205                            classNameId, notificationType, deliveryType);
206            }
207    
208            public static com.liferay.portal.model.UserNotificationDelivery fetchUserNotificationDelivery(
209                    long userNotificationDeliveryId) {
210                    return getService()
211                                       .fetchUserNotificationDelivery(userNotificationDeliveryId);
212            }
213    
214            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
215                    return getService().getActionableDynamicQuery();
216            }
217    
218            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
219                    return getService().getIndexableActionableDynamicQuery();
220            }
221    
222            /**
223            * Returns the OSGi service identifier.
224            *
225            * @return the OSGi service identifier
226            */
227            public static java.lang.String getOSGiServiceIdentifier() {
228                    return getService().getOSGiServiceIdentifier();
229            }
230    
231            public static com.liferay.portal.model.PersistedModel getPersistedModel(
232                    java.io.Serializable primaryKeyObj)
233                    throws com.liferay.portal.kernel.exception.PortalException {
234                    return getService().getPersistedModel(primaryKeyObj);
235            }
236    
237            /**
238            * Returns a range of all the user notification deliveries.
239            *
240            * <p>
241            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserNotificationDeliveryModelImpl}. If both <code>orderByComparator</code> 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.
242            * </p>
243            *
244            * @param start the lower bound of the range of user notification deliveries
245            * @param end the upper bound of the range of user notification deliveries (not inclusive)
246            * @return the range of user notification deliveries
247            */
248            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> getUserNotificationDeliveries(
249                    int start, int end) {
250                    return getService().getUserNotificationDeliveries(start, end);
251            }
252    
253            /**
254            * Returns the number of user notification deliveries.
255            *
256            * @return the number of user notification deliveries
257            */
258            public static int getUserNotificationDeliveriesCount() {
259                    return getService().getUserNotificationDeliveriesCount();
260            }
261    
262            public static com.liferay.portal.model.UserNotificationDelivery getUserNotificationDelivery(
263                    long userId, java.lang.String portletId, long classNameId,
264                    int notificationType, int deliveryType, boolean deliver)
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    return getService()
267                                       .getUserNotificationDelivery(userId, portletId, classNameId,
268                            notificationType, deliveryType, deliver);
269            }
270    
271            /**
272            * Returns the user notification delivery with the primary key.
273            *
274            * @param userNotificationDeliveryId the primary key of the user notification delivery
275            * @return the user notification delivery
276            * @throws PortalException if a user notification delivery with the primary key could not be found
277            */
278            public static com.liferay.portal.model.UserNotificationDelivery getUserNotificationDelivery(
279                    long userNotificationDeliveryId)
280                    throws com.liferay.portal.kernel.exception.PortalException {
281                    return getService()
282                                       .getUserNotificationDelivery(userNotificationDeliveryId);
283            }
284    
285            /**
286            * Updates the user notification delivery in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
287            *
288            * @param userNotificationDelivery the user notification delivery
289            * @return the user notification delivery that was updated
290            */
291            public static com.liferay.portal.model.UserNotificationDelivery updateUserNotificationDelivery(
292                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) {
293                    return getService()
294                                       .updateUserNotificationDelivery(userNotificationDelivery);
295            }
296    
297            public static com.liferay.portal.model.UserNotificationDelivery updateUserNotificationDelivery(
298                    long userNotificationDeliveryId, boolean deliver) {
299                    return getService()
300                                       .updateUserNotificationDelivery(userNotificationDeliveryId,
301                            deliver);
302            }
303    
304            public static UserNotificationDeliveryLocalService getService() {
305                    if (_service == null) {
306                            _service = (UserNotificationDeliveryLocalService)PortalBeanLocatorUtil.locate(UserNotificationDeliveryLocalService.class.getName());
307    
308                            ReferenceRegistry.registerReference(UserNotificationDeliveryLocalServiceUtil.class,
309                                    "_service");
310                    }
311    
312                    return _service;
313            }
314    
315            private static UserNotificationDeliveryLocalService _service;
316    }