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