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.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link TeamLocalService} 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       TeamLocalService
030     * @generated
031     */
032    public class TeamLocalServiceUtil {
033            public static com.liferay.portal.model.Team addTeam(
034                    com.liferay.portal.model.Team team)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addTeam(team);
037            }
038    
039            public static com.liferay.portal.model.Team createTeam(long teamId) {
040                    return getService().createTeam(teamId);
041            }
042    
043            public static void deleteTeam(long teamId)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    getService().deleteTeam(teamId);
047            }
048    
049            public static void deleteTeam(com.liferay.portal.model.Team team)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    getService().deleteTeam(team);
052            }
053    
054            @SuppressWarnings("unchecked")
055            public static java.util.List dynamicQuery(
056                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getService().dynamicQuery(dynamicQuery);
059            }
060    
061            @SuppressWarnings("unchecked")
062            public static java.util.List dynamicQuery(
063                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
064                    int end) throws com.liferay.portal.kernel.exception.SystemException {
065                    return getService().dynamicQuery(dynamicQuery, start, end);
066            }
067    
068            @SuppressWarnings("unchecked")
069            public static java.util.List dynamicQuery(
070                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
071                    int end,
072                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
073                    throws com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
076            }
077    
078            public static long dynamicQueryCount(
079                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getService().dynamicQueryCount(dynamicQuery);
082            }
083    
084            public static com.liferay.portal.model.Team getTeam(long teamId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getTeam(teamId);
088            }
089    
090            public static java.util.List<com.liferay.portal.model.Team> getTeams(
091                    int start, int end)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return getService().getTeams(start, end);
094            }
095    
096            public static int getTeamsCount()
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getTeamsCount();
099            }
100    
101            public static com.liferay.portal.model.Team updateTeam(
102                    com.liferay.portal.model.Team team)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().updateTeam(team);
105            }
106    
107            public static com.liferay.portal.model.Team updateTeam(
108                    com.liferay.portal.model.Team team, boolean merge)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getService().updateTeam(team, merge);
111            }
112    
113            public static com.liferay.portal.model.Team addTeam(long userId,
114                    long groupId, java.lang.String name, java.lang.String description)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException {
117                    return getService().addTeam(userId, groupId, name, description);
118            }
119    
120            public static void deleteTeams(long groupId)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    getService().deleteTeams(groupId);
124            }
125    
126            public static java.util.List<com.liferay.portal.model.Team> getGroupTeams(
127                    long groupId)
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getService().getGroupTeams(groupId);
130            }
131    
132            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
133                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
134                    return getService().getUserTeams(userId);
135            }
136    
137            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
138                    long userId, long groupId)
139                    throws com.liferay.portal.kernel.exception.SystemException {
140                    return getService().getUserTeams(userId, groupId);
141            }
142    
143            public static boolean hasUserTeam(long userId, long teamId)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getService().hasUserTeam(userId, teamId);
146            }
147    
148            public static java.util.List<com.liferay.portal.model.Team> search(
149                    long groupId, java.lang.String name, java.lang.String description,
150                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
151                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getService()
154                                       .search(groupId, name, description, params, start, end, obc);
155            }
156    
157            public static int searchCount(long groupId, java.lang.String name,
158                    java.lang.String description,
159                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getService().searchCount(groupId, name, description, params);
162            }
163    
164            public static com.liferay.portal.model.Team updateTeam(long teamId,
165                    java.lang.String name, java.lang.String description)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getService().updateTeam(teamId, name, description);
169            }
170    
171            public static TeamLocalService getService() {
172                    if (_service == null) {
173                            _service = (TeamLocalService)PortalBeanLocatorUtil.locate(TeamLocalService.class.getName());
174                    }
175    
176                    return _service;
177            }
178    
179            public void setService(TeamLocalService service) {
180                    _service = service;
181            }
182    
183            private static TeamLocalService _service;
184    }