001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link SocialRelationLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       SocialRelationLocalService
030     * @generated
031     */
032    public class SocialRelationLocalServiceUtil {
033            public static com.liferay.portlet.social.model.SocialRelation addSocialRelation(
034                    com.liferay.portlet.social.model.SocialRelation socialRelation)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addSocialRelation(socialRelation);
037            }
038    
039            public static com.liferay.portlet.social.model.SocialRelation createSocialRelation(
040                    long relationId) {
041                    return getService().createSocialRelation(relationId);
042            }
043    
044            public static void deleteSocialRelation(long relationId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteSocialRelation(relationId);
048            }
049    
050            public static void deleteSocialRelation(
051                    com.liferay.portlet.social.model.SocialRelation socialRelation)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteSocialRelation(socialRelation);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.social.model.SocialRelation getSocialRelation(
087                    long relationId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getSocialRelation(relationId);
091            }
092    
093            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> getSocialRelations(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getSocialRelations(start, end);
097            }
098    
099            public static int getSocialRelationsCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getSocialRelationsCount();
102            }
103    
104            public static com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
105                    com.liferay.portlet.social.model.SocialRelation socialRelation)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateSocialRelation(socialRelation);
108            }
109    
110            public static com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
111                    com.liferay.portlet.social.model.SocialRelation socialRelation,
112                    boolean merge)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateSocialRelation(socialRelation, merge);
115            }
116    
117            public static com.liferay.portlet.social.model.SocialRelation addRelation(
118                    long userId1, long userId2, int type)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getService().addRelation(userId1, userId2, type);
122            }
123    
124            public static void deleteRelation(long relationId)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException {
127                    getService().deleteRelation(relationId);
128            }
129    
130            public static void deleteRelation(long userId1, long userId2, int type)
131                    throws com.liferay.portal.kernel.exception.PortalException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    getService().deleteRelation(userId1, userId2, type);
134            }
135    
136            public static void deleteRelation(
137                    com.liferay.portlet.social.model.SocialRelation relation)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    getService().deleteRelation(relation);
141            }
142    
143            public static void deleteRelations(long userId)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    getService().deleteRelations(userId);
146            }
147    
148            public static com.liferay.portlet.social.model.SocialRelation getRelation(
149                    long relationId)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getService().getRelation(relationId);
153            }
154    
155            public static com.liferay.portlet.social.model.SocialRelation getRelation(
156                    long userId1, long userId2, int type)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    return getService().getRelation(userId1, userId2, type);
160            }
161    
162            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> getRelations(
163                    long userId, int type, int start, int end)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return getService().getRelations(userId, type, start, end);
166            }
167    
168            public static int getRelationsCount(long userId, int type)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().getRelationsCount(userId, type);
171            }
172    
173            public static boolean hasRelation(long userId1, long userId2, int type)
174                    throws com.liferay.portal.kernel.exception.SystemException {
175                    return getService().hasRelation(userId1, userId2, type);
176            }
177    
178            public static boolean isRelatable(long userId1, long userId2, int type)
179                    throws com.liferay.portal.kernel.exception.SystemException {
180                    return getService().isRelatable(userId1, userId2, type);
181            }
182    
183            public static SocialRelationLocalService getService() {
184                    if (_service == null) {
185                            _service = (SocialRelationLocalService)PortalBeanLocatorUtil.locate(SocialRelationLocalService.class.getName());
186                    }
187    
188                    return _service;
189            }
190    
191            public void setService(SocialRelationLocalService service) {
192                    _service = service;
193            }
194    
195            private static SocialRelationLocalService _service;
196    }