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