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