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