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            @Override
306            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
307                    return _subscriptionLocalService.getIndexableActionableDynamicQuery();
308            }
309    
310            /**
311            * Returns the OSGi service identifier.
312            *
313            * @return the OSGi service identifier
314            */
315            @Override
316            public java.lang.String getOSGiServiceIdentifier() {
317                    return _subscriptionLocalService.getOSGiServiceIdentifier();
318            }
319    
320            @Override
321            public com.liferay.portal.model.PersistedModel getPersistedModel(
322                    java.io.Serializable primaryKeyObj)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    return _subscriptionLocalService.getPersistedModel(primaryKeyObj);
325            }
326    
327            /**
328            * Returns the subscription of the user to the entity.
329            *
330            * @param companyId the primary key of the company
331            * @param userId the primary key of the user
332            * @param className the entity's class name
333            * @param classPK the primary key of the entity's instance
334            * @return the subscription of the user to the entity
335            */
336            @Override
337            public com.liferay.portal.model.Subscription getSubscription(
338                    long companyId, long userId, java.lang.String className, long classPK)
339                    throws com.liferay.portal.kernel.exception.PortalException {
340                    return _subscriptionLocalService.getSubscription(companyId, userId,
341                            className, classPK);
342            }
343    
344            /**
345            * Returns the subscription with the primary key.
346            *
347            * @param subscriptionId the primary key of the subscription
348            * @return the subscription
349            * @throws PortalException if a subscription with the primary key could not be found
350            */
351            @Override
352            public com.liferay.portal.model.Subscription getSubscription(
353                    long subscriptionId)
354                    throws com.liferay.portal.kernel.exception.PortalException {
355                    return _subscriptionLocalService.getSubscription(subscriptionId);
356            }
357    
358            /**
359            * Returns all the subscriptions to the entity.
360            *
361            * @param companyId the primary key of the company
362            * @param className the entity's class name
363            * @param classPK the primary key of the entity's instance
364            * @return the subscriptions to the entity
365            */
366            @Override
367            public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
368                    long companyId, java.lang.String className, long classPK) {
369                    return _subscriptionLocalService.getSubscriptions(companyId, className,
370                            classPK);
371            }
372    
373            /**
374            * Returns all the subscriptions of the user to the entities.
375            *
376            * @param companyId the primary key of the company
377            * @param userId the primary key of the user
378            * @param className the entity's class name
379            * @param classPKs the primary key of the entities
380            * @return the subscriptions of the user to the entities
381            */
382            @Override
383            public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
384                    long companyId, long userId, java.lang.String className, long[] classPKs) {
385                    return _subscriptionLocalService.getSubscriptions(companyId, userId,
386                            className, classPKs);
387            }
388    
389            /**
390            * Returns a range of all the subscriptions.
391            *
392            * <p>
393            * 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.
394            * </p>
395            *
396            * @param start the lower bound of the range of subscriptions
397            * @param end the upper bound of the range of subscriptions (not inclusive)
398            * @return the range of subscriptions
399            */
400            @Override
401            public java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
402                    int start, int end) {
403                    return _subscriptionLocalService.getSubscriptions(start, end);
404            }
405    
406            /**
407            * Returns the number of subscriptions.
408            *
409            * @return the number of subscriptions
410            */
411            @Override
412            public int getSubscriptionsCount() {
413                    return _subscriptionLocalService.getSubscriptionsCount();
414            }
415    
416            /**
417            * Returns all the subscriptions of the user to the entities with the class
418            * name.
419            *
420            * @param userId the primary key of the user
421            * @param className the entity's class name
422            * @return the subscriptions of the user to the entities with the class name
423            */
424            @Override
425            public java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
426                    long userId, java.lang.String className) {
427                    return _subscriptionLocalService.getUserSubscriptions(userId, className);
428            }
429    
430            /**
431            * Returns an ordered range of all the subscriptions of the user.
432            *
433            * @param userId the primary key of the user
434            * @param start the lower bound of the range of results
435            * @param end the upper bound of the range of results (not inclusive)
436            * @param orderByComparator the comparator to order the subscriptions
437            * @return the range of subscriptions of the user
438            */
439            @Override
440            public java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
441                    long userId, int start, int end,
442                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Subscription> orderByComparator) {
443                    return _subscriptionLocalService.getUserSubscriptions(userId, start,
444                            end, orderByComparator);
445            }
446    
447            /**
448            * Returns the number of subscriptions of the user.
449            *
450            * @param userId the primary key of the user
451            * @return the number of subscriptions of the user
452            */
453            @Override
454            public int getUserSubscriptionsCount(long userId) {
455                    return _subscriptionLocalService.getUserSubscriptionsCount(userId);
456            }
457    
458            /**
459            * Returns <code>true</code> if the user is subscribed to the entity.
460            *
461            * @param companyId the primary key of the company
462            * @param userId the primary key of the user
463            * @param className the entity's class name
464            * @param classPK the primary key of the entity's instance
465            * @return <code>true</code> if the user is subscribed to the entity;
466            <code>false</code> otherwise
467            */
468            @Override
469            public boolean isSubscribed(long companyId, long userId,
470                    java.lang.String className, long classPK) {
471                    return _subscriptionLocalService.isSubscribed(companyId, userId,
472                            className, classPK);
473            }
474    
475            /**
476            * Returns <code>true</code> if the user is subscribed to any of the
477            * entities.
478            *
479            * @param companyId the primary key of the company
480            * @param userId the primary key of the user
481            * @param className the entity's class name
482            * @param classPKs the primary key of the entities
483            * @return <code>true</code> if the user is subscribed to any of the
484            entities; <code>false</code> otherwise
485            */
486            @Override
487            public boolean isSubscribed(long companyId, long userId,
488                    java.lang.String className, long[] classPKs) {
489                    return _subscriptionLocalService.isSubscribed(companyId, userId,
490                            className, classPKs);
491            }
492    
493            /**
494            * Updates the subscription in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
495            *
496            * @param subscription the subscription
497            * @return the subscription that was updated
498            */
499            @Override
500            public com.liferay.portal.model.Subscription updateSubscription(
501                    com.liferay.portal.model.Subscription subscription) {
502                    return _subscriptionLocalService.updateSubscription(subscription);
503            }
504    
505            @Override
506            public SubscriptionLocalService getWrappedService() {
507                    return _subscriptionLocalService;
508            }
509    
510            @Override
511            public void setWrappedService(
512                    SubscriptionLocalService subscriptionLocalService) {
513                    _subscriptionLocalService = subscriptionLocalService;
514            }
515    
516            private SubscriptionLocalService _subscriptionLocalService;
517    }