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