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