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            @Override
284            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
285                    return _socialRelationLocalService.getIndexableActionableDynamicQuery();
286            }
287    
288            /**
289            * Returns a range of all the inverse relations of the given type for which
290            * the user is User2 of the relation.
291            *
292            * <p>
293            * Useful when paginating results. Returns a maximum of <code>end -
294            * start</code> instances. <code>start</code> and <code>end</code> are not
295            * primary keys, they are indexes in the result set. Thus, <code>0</code>
296            * refers to the first result in the set. Setting both <code>start</code>
297            * and <code>end</code> to {@link
298            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
299            * result set.
300            * </p>
301            *
302            * @param userId the primary key of the user
303            * @param type the relation's type
304            * @param start the lower bound of the range of results
305            * @param end the upper bound of the range of results (not inclusive)
306            * @return the range of matching relations
307            */
308            @Override
309            public java.util.List<com.liferay.portlet.social.model.SocialRelation> getInverseRelations(
310                    long userId, int type, int start, int end) {
311                    return _socialRelationLocalService.getInverseRelations(userId, type,
312                            start, end);
313            }
314    
315            /**
316            * Returns the number of inverse relations of the given type for which the
317            * user is User2 of the relation.
318            *
319            * @param userId the primary key of the user
320            * @param type the relation's type
321            * @return the number of matching relations
322            */
323            @Override
324            public int getInverseRelationsCount(long userId, int type) {
325                    return _socialRelationLocalService.getInverseRelationsCount(userId, type);
326            }
327    
328            /**
329            * Returns the OSGi service identifier.
330            *
331            * @return the OSGi service identifier
332            */
333            @Override
334            public java.lang.String getOSGiServiceIdentifier() {
335                    return _socialRelationLocalService.getOSGiServiceIdentifier();
336            }
337    
338            @Override
339            public com.liferay.portal.model.PersistedModel getPersistedModel(
340                    java.io.Serializable primaryKeyObj)
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return _socialRelationLocalService.getPersistedModel(primaryKeyObj);
343            }
344    
345            /**
346            * Returns the relation identified by its primary key.
347            *
348            * @param relationId the primary key of the relation
349            * @return Returns the relation
350            */
351            @Override
352            public com.liferay.portlet.social.model.SocialRelation getRelation(
353                    long relationId)
354                    throws com.liferay.portal.kernel.exception.PortalException {
355                    return _socialRelationLocalService.getRelation(relationId);
356            }
357    
358            /**
359            * Returns the relation of the given type between User1 and User2.
360            *
361            * @param userId1 the user that is the subject of the relation
362            * @param userId2 the user at the other end of the relation
363            * @param type the relation's type
364            * @return Returns the relation
365            */
366            @Override
367            public com.liferay.portlet.social.model.SocialRelation getRelation(
368                    long userId1, long userId2, int type)
369                    throws com.liferay.portal.kernel.exception.PortalException {
370                    return _socialRelationLocalService.getRelation(userId1, userId2, type);
371            }
372    
373            /**
374            * Returns a range of all the relations of the given type where the user is
375            * the subject of the relation.
376            *
377            * <p>
378            * Useful when paginating results. Returns a maximum of <code>end -
379            * start</code> instances. <code>start</code> and <code>end</code> are not
380            * primary keys, they are indexes in the result set. Thus, <code>0</code>
381            * refers to the first result in the set. Setting both <code>start</code>
382            * and <code>end</code> to {@link
383            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
384            * result set.
385            * </p>
386            *
387            * @param userId the primary key of the user
388            * @param type the relation's type
389            * @param start the lower bound of the range of results
390            * @param end the upper bound of the range of results (not inclusive)
391            * @return the range of relations
392            */
393            @Override
394            public java.util.List<com.liferay.portlet.social.model.SocialRelation> getRelations(
395                    long userId, int type, int start, int end) {
396                    return _socialRelationLocalService.getRelations(userId, type, start, end);
397            }
398    
399            /**
400            * Returns a range of all the relations between User1 and User2.
401            *
402            * <p>
403            * Useful when paginating results. Returns a maximum of <code>end -
404            * start</code> instances. <code>start</code> and <code>end</code> are not
405            * primary keys, they are indexes in the result set. Thus, <code>0</code>
406            * refers to the first result in the set. Setting both <code>start</code>
407            * and <code>end</code> to {@link
408            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
409            * result set.
410            * </p>
411            *
412            * @param userId1 the user that is the subject of the relation
413            * @param userId2 the user at the other end of the relation
414            * @param start the lower bound of the range of results
415            * @param end the upper bound of the range of results (not inclusive)
416            * @return the range of relations
417            */
418            @Override
419            public java.util.List<com.liferay.portlet.social.model.SocialRelation> getRelations(
420                    long userId1, long userId2, int start, int end) {
421                    return _socialRelationLocalService.getRelations(userId1, userId2,
422                            start, end);
423            }
424    
425            /**
426            * Returns the number of relations of the given type where the user is the
427            * subject of the relation.
428            *
429            * @param userId the primary key of the user
430            * @param type the relation's type
431            * @return the number of relations
432            */
433            @Override
434            public int getRelationsCount(long userId, int type) {
435                    return _socialRelationLocalService.getRelationsCount(userId, type);
436            }
437    
438            /**
439            * Returns the number of relations between User1 and User2.
440            *
441            * @param userId1 the user that is the subject of the relation
442            * @param userId2 the user at the other end of the relation
443            * @return the number of relations
444            */
445            @Override
446            public int getRelationsCount(long userId1, long userId2) {
447                    return _socialRelationLocalService.getRelationsCount(userId1, userId2);
448            }
449    
450            /**
451            * Returns the social relation with the primary key.
452            *
453            * @param relationId the primary key of the social relation
454            * @return the social relation
455            * @throws PortalException if a social relation with the primary key could not be found
456            */
457            @Override
458            public com.liferay.portlet.social.model.SocialRelation getSocialRelation(
459                    long relationId)
460                    throws com.liferay.portal.kernel.exception.PortalException {
461                    return _socialRelationLocalService.getSocialRelation(relationId);
462            }
463    
464            /**
465            * Returns the social relation with the matching UUID and company.
466            *
467            * @param uuid the social relation's UUID
468            * @param companyId the primary key of the company
469            * @return the matching social relation
470            * @throws PortalException if a matching social relation could not be found
471            */
472            @Override
473            public com.liferay.portlet.social.model.SocialRelation getSocialRelationByUuidAndCompanyId(
474                    java.lang.String uuid, long companyId)
475                    throws com.liferay.portal.kernel.exception.PortalException {
476                    return _socialRelationLocalService.getSocialRelationByUuidAndCompanyId(uuid,
477                            companyId);
478            }
479    
480            /**
481            * Returns a range of all the social relations.
482            *
483            * <p>
484            * 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.
485            * </p>
486            *
487            * @param start the lower bound of the range of social relations
488            * @param end the upper bound of the range of social relations (not inclusive)
489            * @return the range of social relations
490            */
491            @Override
492            public java.util.List<com.liferay.portlet.social.model.SocialRelation> getSocialRelations(
493                    int start, int end) {
494                    return _socialRelationLocalService.getSocialRelations(start, end);
495            }
496    
497            /**
498            * Returns the number of social relations.
499            *
500            * @return the number of social relations
501            */
502            @Override
503            public int getSocialRelationsCount() {
504                    return _socialRelationLocalService.getSocialRelationsCount();
505            }
506    
507            /**
508            * Returns <code>true</code> if a relation of the given type exists where
509            * the user with primary key <code>userId1</code> is User1 of the relation
510            * and the user with the primary key <code>userId2</code> is User2 of the
511            * relation.
512            *
513            * @param userId1 the user that is the subject of the relation
514            * @param userId2 the user at the other end of the relation
515            * @param type the relation's type
516            * @return <code>true</code> if the relation exists; <code>false</code>
517            otherwise
518            */
519            @Override
520            public boolean hasRelation(long userId1, long userId2, int type) {
521                    return _socialRelationLocalService.hasRelation(userId1, userId2, type);
522            }
523    
524            /**
525            * Returns <code>true</code> if the users can be in a relation of the given
526            * type where the user with primary key <code>userId1</code> is User1 of the
527            * relation and the user with the primary key <code>userId2</code> is User2
528            * of the relation.
529            *
530            * <p>
531            * This method returns <code>false</code> if User1 and User2 are the same,
532            * if either user is the default user, or if a matching relation already
533            * exists.
534            * </p>
535            *
536            * @param userId1 the user that is the subject of the relation
537            * @param userId2 the user at the other end of the relation
538            * @param type the relation's type
539            * @return <code>true</code> if the two users can be in a new relation of
540            the given type; <code>false</code> otherwise
541            */
542            @Override
543            public boolean isRelatable(long userId1, long userId2, int type) {
544                    return _socialRelationLocalService.isRelatable(userId1, userId2, type);
545            }
546    
547            /**
548            * Updates the social relation in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
549            *
550            * @param socialRelation the social relation
551            * @return the social relation that was updated
552            */
553            @Override
554            public com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
555                    com.liferay.portlet.social.model.SocialRelation socialRelation) {
556                    return _socialRelationLocalService.updateSocialRelation(socialRelation);
557            }
558    
559            @Override
560            public SocialRelationLocalService getWrappedService() {
561                    return _socialRelationLocalService;
562            }
563    
564            @Override
565            public void setWrappedService(
566                    SocialRelationLocalService socialRelationLocalService) {
567                    _socialRelationLocalService = socialRelationLocalService;
568            }
569    
570            private SocialRelationLocalService _socialRelationLocalService;
571    }