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