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.portlet.announcements.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 AnnouncementsDelivery. This utility wraps
024     * {@link com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl} 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 AnnouncementsDeliveryLocalService
032     * @see com.liferay.portlet.announcements.service.base.AnnouncementsDeliveryLocalServiceBaseImpl
033     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AnnouncementsDeliveryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the announcements delivery to the database. Also notifies the appropriate model listeners.
046            *
047            * @param announcementsDelivery the announcements delivery
048            * @return the announcements delivery that was added
049            */
050            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery addAnnouncementsDelivery(
051                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery) {
052                    return getService().addAnnouncementsDelivery(announcementsDelivery);
053            }
054    
055            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery addUserDelivery(
056                    long userId, java.lang.String type)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    return getService().addUserDelivery(userId, type);
059            }
060    
061            /**
062            * Creates a new announcements delivery with the primary key. Does not add the announcements delivery to the database.
063            *
064            * @param deliveryId the primary key for the new announcements delivery
065            * @return the new announcements delivery
066            */
067            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery createAnnouncementsDelivery(
068                    long deliveryId) {
069                    return getService().createAnnouncementsDelivery(deliveryId);
070            }
071    
072            /**
073            * Deletes the announcements delivery from the database. Also notifies the appropriate model listeners.
074            *
075            * @param announcementsDelivery the announcements delivery
076            * @return the announcements delivery that was removed
077            */
078            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery deleteAnnouncementsDelivery(
079                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery) {
080                    return getService().deleteAnnouncementsDelivery(announcementsDelivery);
081            }
082    
083            /**
084            * Deletes the announcements delivery with the primary key from the database. Also notifies the appropriate model listeners.
085            *
086            * @param deliveryId the primary key of the announcements delivery
087            * @return the announcements delivery that was removed
088            * @throws PortalException if a announcements delivery with the primary key could not be found
089            */
090            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery deleteAnnouncementsDelivery(
091                    long deliveryId)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    return getService().deleteAnnouncementsDelivery(deliveryId);
094            }
095    
096            public static void deleteDeliveries(long userId) {
097                    getService().deleteDeliveries(userId);
098            }
099    
100            public static void deleteDelivery(
101                    com.liferay.portlet.announcements.model.AnnouncementsDelivery delivery) {
102                    getService().deleteDelivery(delivery);
103            }
104    
105            public static void deleteDelivery(long deliveryId)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    getService().deleteDelivery(deliveryId);
108            }
109    
110            public static void deleteDelivery(long userId, java.lang.String type) {
111                    getService().deleteDelivery(userId, type);
112            }
113    
114            /**
115            * @throws PortalException
116            */
117            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
118                    com.liferay.portal.model.PersistedModel persistedModel)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    return getService().deletePersistedModel(persistedModel);
121            }
122    
123            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
124                    return getService().dynamicQuery();
125            }
126    
127            /**
128            * Performs a dynamic query on the database and returns the matching rows.
129            *
130            * @param dynamicQuery the dynamic query
131            * @return the matching rows
132            */
133            public static <T> java.util.List<T> dynamicQuery(
134                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
135                    return getService().dynamicQuery(dynamicQuery);
136            }
137    
138            /**
139            * Performs a dynamic query on the database and returns a range of the matching rows.
140            *
141            * <p>
142            * 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.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl}. 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.
143            * </p>
144            *
145            * @param dynamicQuery the dynamic query
146            * @param start the lower bound of the range of model instances
147            * @param end the upper bound of the range of model instances (not inclusive)
148            * @return the range of matching rows
149            */
150            public static <T> java.util.List<T> dynamicQuery(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
152                    int end) {
153                    return getService().dynamicQuery(dynamicQuery, start, end);
154            }
155    
156            /**
157            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
158            *
159            * <p>
160            * 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.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl}. 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.
161            * </p>
162            *
163            * @param dynamicQuery the dynamic query
164            * @param start the lower bound of the range of model instances
165            * @param end the upper bound of the range of model instances (not inclusive)
166            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
167            * @return the ordered range of matching rows
168            */
169            public static <T> java.util.List<T> dynamicQuery(
170                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
171                    int end,
172                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
173                    return getService()
174                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
175            }
176    
177            /**
178            * Returns the number of rows matching the dynamic query.
179            *
180            * @param dynamicQuery the dynamic query
181            * @return the number of rows matching the dynamic query
182            */
183            public static long dynamicQueryCount(
184                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
185                    return getService().dynamicQueryCount(dynamicQuery);
186            }
187    
188            /**
189            * Returns the number of rows matching the dynamic query.
190            *
191            * @param dynamicQuery the dynamic query
192            * @param projection the projection to apply to the query
193            * @return the number of rows matching the dynamic query
194            */
195            public static long dynamicQueryCount(
196                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
197                    com.liferay.portal.kernel.dao.orm.Projection projection) {
198                    return getService().dynamicQueryCount(dynamicQuery, projection);
199            }
200    
201            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchAnnouncementsDelivery(
202                    long deliveryId) {
203                    return getService().fetchAnnouncementsDelivery(deliveryId);
204            }
205    
206            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
207                    return getService().getActionableDynamicQuery();
208            }
209    
210            /**
211            * Returns a range of all the announcements deliveries.
212            *
213            * <p>
214            * 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.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl}. 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.
215            * </p>
216            *
217            * @param start the lower bound of the range of announcements deliveries
218            * @param end the upper bound of the range of announcements deliveries (not inclusive)
219            * @return the range of announcements deliveries
220            */
221            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> getAnnouncementsDeliveries(
222                    int start, int end) {
223                    return getService().getAnnouncementsDeliveries(start, end);
224            }
225    
226            /**
227            * Returns the number of announcements deliveries.
228            *
229            * @return the number of announcements deliveries
230            */
231            public static int getAnnouncementsDeliveriesCount() {
232                    return getService().getAnnouncementsDeliveriesCount();
233            }
234    
235            /**
236            * Returns the announcements delivery with the primary key.
237            *
238            * @param deliveryId the primary key of the announcements delivery
239            * @return the announcements delivery
240            * @throws PortalException if a announcements delivery with the primary key could not be found
241            */
242            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery getAnnouncementsDelivery(
243                    long deliveryId)
244                    throws com.liferay.portal.kernel.exception.PortalException {
245                    return getService().getAnnouncementsDelivery(deliveryId);
246            }
247    
248            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery getDelivery(
249                    long deliveryId)
250                    throws com.liferay.portal.kernel.exception.PortalException {
251                    return getService().getDelivery(deliveryId);
252            }
253    
254            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
255                    return getService().getIndexableActionableDynamicQuery();
256            }
257    
258            /**
259            * Returns the OSGi service identifier.
260            *
261            * @return the OSGi service identifier
262            */
263            public static java.lang.String getOSGiServiceIdentifier() {
264                    return getService().getOSGiServiceIdentifier();
265            }
266    
267            public static com.liferay.portal.model.PersistedModel getPersistedModel(
268                    java.io.Serializable primaryKeyObj)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    return getService().getPersistedModel(primaryKeyObj);
271            }
272    
273            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> getUserDeliveries(
274                    long userId) throws com.liferay.portal.kernel.exception.PortalException {
275                    return getService().getUserDeliveries(userId);
276            }
277    
278            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery getUserDelivery(
279                    long userId, java.lang.String type)
280                    throws com.liferay.portal.kernel.exception.PortalException {
281                    return getService().getUserDelivery(userId, type);
282            }
283    
284            /**
285            * Updates the announcements delivery in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
286            *
287            * @param announcementsDelivery the announcements delivery
288            * @return the announcements delivery that was updated
289            */
290            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery updateAnnouncementsDelivery(
291                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery) {
292                    return getService().updateAnnouncementsDelivery(announcementsDelivery);
293            }
294    
295            public static com.liferay.portlet.announcements.model.AnnouncementsDelivery updateDelivery(
296                    long userId, java.lang.String type, boolean email, boolean sms,
297                    boolean website)
298                    throws com.liferay.portal.kernel.exception.PortalException {
299                    return getService().updateDelivery(userId, type, email, sms, website);
300            }
301    
302            public static AnnouncementsDeliveryLocalService getService() {
303                    if (_service == null) {
304                            _service = (AnnouncementsDeliveryLocalService)PortalBeanLocatorUtil.locate(AnnouncementsDeliveryLocalService.class.getName());
305    
306                            ReferenceRegistry.registerReference(AnnouncementsDeliveryLocalServiceUtil.class,
307                                    "_service");
308                    }
309    
310                    return _service;
311            }
312    
313            private static AnnouncementsDeliveryLocalService _service;
314    }