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