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    /**
020     * Provides a wrapper for {@link SubscriptionLocalService}.
021     *
022     * @author Brian Wing Shun Chan
023     * @see SubscriptionLocalService
024     * @generated
025     */
026    @ProviderType
027    public class SubscriptionLocalServiceWrapper implements SubscriptionLocalService,
028            ServiceWrapper<SubscriptionLocalService> {
029            public SubscriptionLocalServiceWrapper(
030                    SubscriptionLocalService subscriptionLocalService) {
031                    _subscriptionLocalService = subscriptionLocalService;
032            }
033    
034            /**
035            * Adds the subscription to the database. Also notifies the appropriate model listeners.
036            *
037            * @param subscription the subscription
038            * @return the subscription that was added
039            */
040            @Override
041            public com.liferay.portal.model.Subscription addSubscription(
042                    com.liferay.portal.model.Subscription subscription) {
043                    return _subscriptionLocalService.addSubscription(subscription);
044            }
045    
046            /**
047            * Subscribes the user to the entity, notifying him the instant the entity
048            * is created, deleted, or modified.
049            *
050            * <p>
051            * If there is no asset entry with the class name and class PK a new asset
052            * entry is created.
053            * </p>
054            *
055            * <p>
056            * A social activity for the subscription is created using the asset entry
057            * associated with the class name and class PK, or the newly created asset
058            * entry.
059            * </p>
060            *
061            * @param userId the primary key of the user
062            * @param groupId the primary key of the entity's group
063            * @param className the entity's class name
064            * @param classPK the primary key of the entity's instance
065            * @return the subscription
066            */
067            @Override
068            public com.liferay.portal.model.Subscription addSubscription(long userId,
069                    long groupId, java.lang.String className, long classPK)
070                    throws com.liferay.portal.kernel.exception.PortalException {
071                    return _subscriptionLocalService.addSubscription(userId, groupId,
072                            className, classPK);
073            }
074    
075            /**
076            * Subscribes the user to the entity, notifying him at the given frequency.
077            *
078            * <p>
079            * If there is no asset entry with the class name and class PK a new asset
080            * entry is created.
081            * </p>
082            *
083            * <p>
084            * A social activity for the subscription is created using the asset entry
085            * associated with the class name and class PK, or the newly created asset
086            * entry.
087            * </p>
088            *
089            * @param userId the primary key of the user
090            * @param groupId the primary key of the entity's group
091            * @param className the entity's class name
092            * @param classPK the primary key of the entity's instance
093            * @param frequency the frequency for notifications
094            * @return the subscription
095            */
096            @Override
097            public com.liferay.portal.model.Subscription addSubscription(long userId,
098                    long groupId, java.lang.String className, long classPK,
099                    java.lang.String frequency)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    return _subscriptionLocalService.addSubscription(userId, groupId,
102                            className, classPK, frequency);
103            }
104    
105            /**
106            * Creates a new subscription with the primary key. Does not add the subscription to the database.
107            *
108            * @param subscriptionId the primary key for the new subscription
109            * @return the new subscription
110            */
111            @Override
112            public com.liferay.portal.model.Subscription createSubscription(
113                    long subscriptionId) {
114                    return _subscriptionLocalService.createSubscription(subscriptionId);
115            }
116    
117            /**
118            * @throws PortalException
119            */
120            @Override
121            public com.liferay.portal.model.PersistedModel deletePersistedModel(
122                    com.liferay.portal.model.PersistedModel persistedModel)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    return _subscriptionLocalService.deletePersistedModel(persistedModel);
125            }
126    
127            /**
128            * Deletes the subscription from the database. Also notifies the appropriate model listeners.
129            *
130            * @param subscription the subscription
131            * @return the subscription that was removed
132            * @throws PortalException
133            */
134            @Override
135            public com.liferay.portal.model.Subscription deleteSubscription(
136                    com.liferay.portal.model.Subscription subscription)
137                    throws com.liferay.portal.kernel.exception.PortalException {
138                    return _subscriptionLocalService.deleteSubscription(subscription);
139            }
140    
141            /**
142            * Deletes the subscription with the primary key from the database. Also notifies the appropriate model listeners.
143            *
144            * @param subscriptionId the primary key of the subscription
145            * @return the subscription that was removed
146            * @throws PortalException if a subscription with the primary key could not be found
147            */
148            @Override
149            public com.liferay.portal.model.Subscription deleteSubscription(
150                    long subscriptionId)
151                    throws com.liferay.portal.kernel.exception.PortalException {
152                    return _subscriptionLocalService.deleteSubscription(subscriptionId);
153            }
154    
155            /**
156            * Deletes the user's subscription to the entity. A social activity with the
157            * unsubscribe action is created.
158            *
159            * @param userId the primary key of the user
160            * @param className the entity's class name
161            * @param classPK the primary key of the entity's instance
162            */
163            @Override
164            public void deleteSubscription(long userId, java.lang.String className,
165                    long classPK)
166                    throws com.liferay.portal.kernel.exception.PortalException {
167                    _subscriptionLocalService.deleteSubscription(userId, className, classPK);
168            }
169    
170            /**
171            * Deletes all the subscriptions to the entity.
172            *
173            * @param companyId the primary key of the company
174            * @param className the entity's class name
175            * @param classPK the primary key of the entity's instance
176            */
177            @Override
178            public void deleteSubscriptions(long companyId, java.lang.String className,
179                    long classPK)
180                    throws com.liferay.portal.kernel.exception.PortalException {
181                    _subscriptionLocalService.deleteSubscriptions(companyId, className,
182                            classPK);
183            }
184    
185            /**
186            * Deletes all the subscriptions of the user.
187            *
188            * @param userId the primary key of the user
189            */
190            @Override
191            public void deleteSubscriptions(long userId)
192                    throws com.liferay.portal.kernel.exception.PortalException {
193                    _subscriptionLocalService.deleteSubscriptions(userId);
194            }
195    
196            @Override
197            public void deleteSubscriptions(long userId, long groupId)
198                    throws com.liferay.portal.kernel.exception.PortalException {
199                    _subscriptionLocalService.deleteSubscriptions(userId, groupId);
200            }
201    
202            @Override
203            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
204                    return _subscriptionLocalService.dynamicQuery();
205            }
206    
207            /**
208            * Performs a dynamic query on the database and returns the matching rows.
209            *
210            * @param dynamicQuery the dynamic query
211            * @return the matching rows
212            */
213            @Override
214            public <T> java.util.List<T> dynamicQuery(
215                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
216                    return _subscriptionLocalService.dynamicQuery(dynamicQuery);
217            }
218    
219            /**
220            * Performs a dynamic query on the database and returns a range of the matching rows.
221            *
222            * <p>
223            * 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.SubscriptionModelImpl}. 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.
224            * </p>
225            *
226            * @param dynamicQuery the dynamic query
227            * @param start the lower bound of the range of model instances
228            * @param end the upper bound of the range of model instances (not inclusive)
229            * @return the range of matching rows
230            */
231            @Override
232            public <T> java.util.List<T> dynamicQuery(
233                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
234                    int end) {
235                    return _subscriptionLocalService.dynamicQuery(dynamicQuery, start, end);
236            }
237    
238            /**
239            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
240            *
241            * <p>
242            * 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.SubscriptionModelImpl}. 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.
243            * </p>
244            *
245            * @param dynamicQuery the dynamic query
246            * @param start the lower bound of the range of model instances
247            * @param end the upper bound of the range of model instances (not inclusive)
248            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
249            * @return the ordered range of matching rows
250            */
251            @Override
252            public <T> java.util.List<T> dynamicQuery(
253                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
254                    int end,
255                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
256                    return _subscriptionLocalService.dynamicQuery(dynamicQuery, start, end,
257                            orderByComparator);
258            }
259    
260            /**
261            * Returns the number of rows matching the dynamic query.
262            *
263            * @param dynamicQuery the dynamic query
264            * @return the number of rows matching the dynamic query
265            */
266            @Override
267            public long dynamicQueryCount(
268                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
269                    return _subscriptionLocalService.dynamicQueryCount(dynamicQuery);
270            }
271    
272            /**
273            * Returns the number of rows matching the dynamic query.
274            *
275            * @param dynamicQuery the dynamic query
276            * @param projection the projection to apply to the query
277            * @return the number of rows matching the dynamic query
278            */
279            @Override
280            public long dynamicQueryCount(
281                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
282                    com.liferay.portal.kernel.dao.orm.Projection projection) {
283                    return _subscriptionLocalService.dynamicQueryCount(dynamicQuery,
284                            projection);
285            }
286    
287            @Override
288            public com.liferay.portal.model.Subscription fetchSubscription(
289                    long companyId, long userId, java.lang.String className, long classPK) {
290                    return _subscriptionLocalService.fetchSubscription(companyId, userId,
291                            className, classPK);
292            }
293    
294            @Override
295            public com.liferay.portal.model.Subscription fetchSubscription(
296                    long subscriptionId) {
297                    return _subscriptionLocalService.fetchSubscription(subscriptionId);
298            }
299    
300            @Override
301            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
302                    return _subscriptionLocalService.getActionableDynamicQuery();
303            }
304    
305            /**
306            * Returns the OSGi service identifier.
307            *
308            * @return the OSGi service identifier
309            */
310            @Override
311            public java.lang.String getOSGiServiceIdentifier() {
312                    return _subscriptionLocalService.getOSGiServiceIdentifier();
313            }
314    
315            @Override
316            public com.liferay.portal.model.PersistedModel getPersistedModel(
317                    java.io.Serializable primaryKeyObj)
318                    throws com.liferay.portal.kernel.exception.PortalException {
319                    return _subscriptionLocalService.getPersistedModel(primaryKeyObj);
320            }
321    
322            /**
323            * Returns the subscription of the user to the entity.
324            *
325            * @param companyId the primary key of the company
326            * @param userId the primary key of the user
327            * @param className the entity's class name
328            * @param classPK the primary key of the entity's instance
329            * @return the subscription of the user to the entity
330            */
331            @Override
332            public com.liferay.portal.model.Subscription getSubscription(
333                    long companyId, long userId, java.lang.String className, long classPK)
334                    throws com.liferay.portal.kernel.exception.PortalException {
335                    return _subscriptionLocalService.getSubscription(companyId, userId,
336                            className, classPK);
337            }
338    
339            /**
340            * Returns the subscription with the primary key.
341            *
342            * @param subscriptionId the primary key of the subscription
343            * @return the subscription
344            * @throws PortalException if a subscription with the primary key could not be found
345            */
346            @Override
347            public com.liferay.portal.model.Subscription getSubscription(
348                    long subscriptionId)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return _subscriptionLocalService.getSubscription(subscriptionId);
351            }
352    
353            /**
354            * Returns all the subscriptions to the entity.
355            *
356            * @param companyId the primary key of the company
357            * @param className the entity's class name
358            * @param classPK the primary key of the entity's instance
359            * @return the subscriptions to the entity
360            */
361            @Override
362            public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
363                    long companyId, java.lang.String className, long classPK) {
364                    return _subscriptionLocalService.getSubscriptions(companyId, className,
365                            classPK);
366            }
367    
368            /**
369            * Returns all the subscriptions of the user to the entities.
370            *
371            * @param companyId the primary key of the company
372            * @param userId the primary key of the user
373            * @param className the entity's class name
374            * @param classPKs the primary key of the entities
375            * @return the subscriptions of the user to the entities
376            */
377            @Override
378            public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
379                    long companyId, long userId, java.lang.String className, long[] classPKs) {
380                    return _subscriptionLocalService.getSubscriptions(companyId, userId,
381                            className, classPKs);
382            }
383    
384            /**
385            * Returns a range of all the subscriptions.
386            *
387            * <p>
388            * 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.SubscriptionModelImpl}. 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.
389            * </p>
390            *
391            * @param start the lower bound of the range of subscriptions
392            * @param end the upper bound of the range of subscriptions (not inclusive)
393            * @return the range of subscriptions
394            */
395            @Override
396            public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
397                    int start, int end) {
398                    return _subscriptionLocalService.getSubscriptions(start, end);
399            }
400    
401            /**
402            * Returns the number of subscriptions.
403            *
404            * @return the number of subscriptions
405            */
406            @Override
407            public int getSubscriptionsCount() {
408                    return _subscriptionLocalService.getSubscriptionsCount();
409            }
410    
411            /**
412            * Returns all the subscriptions of the user to the entities with the class
413            * name.
414            *
415            * @param userId the primary key of the user
416            * @param className the entity's class name
417            * @return the subscriptions of the user to the entities with the class name
418            */
419            @Override
420            public java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
421                    long userId, java.lang.String className) {
422                    return _subscriptionLocalService.getUserSubscriptions(userId, className);
423            }
424    
425            /**
426            * Returns an ordered range of all the subscriptions of the user.
427            *
428            * @param userId the primary key of the user
429            * @param start the lower bound of the range of results
430            * @param end the upper bound of the range of results (not inclusive)
431            * @param orderByComparator the comparator to order the subscriptions
432            * @return the range of subscriptions of the user
433            */
434            @Override
435            public java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
436                    long userId, int start, int end,
437                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Subscription> orderByComparator) {
438                    return _subscriptionLocalService.getUserSubscriptions(userId, start,
439                            end, orderByComparator);
440            }
441    
442            /**
443            * Returns the number of subscriptions of the user.
444            *
445            * @param userId the primary key of the user
446            * @return the number of subscriptions of the user
447            */
448            @Override
449            public int getUserSubscriptionsCount(long userId) {
450                    return _subscriptionLocalService.getUserSubscriptionsCount(userId);
451            }
452    
453            /**
454            * Returns <code>true</code> if the user is subscribed to the entity.
455            *
456            * @param companyId the primary key of the company
457            * @param userId the primary key of the user
458            * @param className the entity's class name
459            * @param classPK the primary key of the entity's instance
460            * @return <code>true</code> if the user is subscribed to the entity;
461            <code>false</code> otherwise
462            */
463            @Override
464            public boolean isSubscribed(long companyId, long userId,
465                    java.lang.String className, long classPK) {
466                    return _subscriptionLocalService.isSubscribed(companyId, userId,
467                            className, classPK);
468            }
469    
470            /**
471            * Returns <code>true</code> if the user is subscribed to any of the
472            * entities.
473            *
474            * @param companyId the primary key of the company
475            * @param userId the primary key of the user
476            * @param className the entity's class name
477            * @param classPKs the primary key of the entities
478            * @return <code>true</code> if the user is subscribed to any of the
479            entities; <code>false</code> otherwise
480            */
481            @Override
482            public boolean isSubscribed(long companyId, long userId,
483                    java.lang.String className, long[] classPKs) {
484                    return _subscriptionLocalService.isSubscribed(companyId, userId,
485                            className, classPKs);
486            }
487    
488            /**
489            * Updates the subscription in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
490            *
491            * @param subscription the subscription
492            * @return the subscription that was updated
493            */
494            @Override
495            public com.liferay.portal.model.Subscription updateSubscription(
496                    com.liferay.portal.model.Subscription subscription) {
497                    return _subscriptionLocalService.updateSubscription(subscription);
498            }
499    
500            /**
501             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
502             */
503            @Deprecated
504            public SubscriptionLocalService getWrappedSubscriptionLocalService() {
505                    return _subscriptionLocalService;
506            }
507    
508            /**
509             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
510             */
511            @Deprecated
512            public void setWrappedSubscriptionLocalService(
513                    SubscriptionLocalService subscriptionLocalService) {
514                    _subscriptionLocalService = subscriptionLocalService;
515            }
516    
517            @Override
518            public SubscriptionLocalService getWrappedService() {
519                    return _subscriptionLocalService;
520            }
521    
522            @Override
523            public void setWrappedService(
524                    SubscriptionLocalService subscriptionLocalService) {
525                    _subscriptionLocalService = subscriptionLocalService;
526            }
527    
528            private SubscriptionLocalService _subscriptionLocalService;
529    }