001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the team local service. This utility wraps {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see TeamLocalService
029     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
030     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
031     * @generated
032     */
033    public class TeamLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Adds the team to the database. Also notifies the appropriate model listeners.
042            *
043            * @param team the team
044            * @return the team that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portal.model.Team addTeam(
048                    com.liferay.portal.model.Team team)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addTeam(team);
051            }
052    
053            /**
054            * Creates a new team with the primary key. Does not add the team to the database.
055            *
056            * @param teamId the primary key for the new team
057            * @return the new team
058            */
059            public static com.liferay.portal.model.Team createTeam(long teamId) {
060                    return getService().createTeam(teamId);
061            }
062    
063            /**
064            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param teamId the primary key of the team
067            * @return the team that was removed
068            * @throws PortalException if a team with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public static com.liferay.portal.model.Team deleteTeam(long teamId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService().deleteTeam(teamId);
075            }
076    
077            /**
078            * Deletes the team from the database. Also notifies the appropriate model listeners.
079            *
080            * @param team the team
081            * @return the team that was removed
082            * @throws PortalException
083            * @throws SystemException if a system exception occurred
084            */
085            public static com.liferay.portal.model.Team deleteTeam(
086                    com.liferay.portal.model.Team team)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService().deleteTeam(team);
090            }
091    
092            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093                    return getService().dynamicQuery();
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns the matching rows.
098            *
099            * @param dynamicQuery the dynamic query
100            * @return the matching rows
101            * @throws SystemException if a system exception occurred
102            */
103            @SuppressWarnings("rawtypes")
104            public static java.util.List dynamicQuery(
105                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().dynamicQuery(dynamicQuery);
108            }
109    
110            /**
111            * Performs a dynamic query on the database and returns a range of the matching rows.
112            *
113            * <p>
114            * 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.
115            * </p>
116            *
117            * @param dynamicQuery the dynamic query
118            * @param start the lower bound of the range of model instances
119            * @param end the upper bound of the range of model instances (not inclusive)
120            * @return the range of matching rows
121            * @throws SystemException if a system exception occurred
122            */
123            @SuppressWarnings("rawtypes")
124            public static java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().dynamicQuery(dynamicQuery, start, end);
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
132            *
133            * <p>
134            * 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.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching rows
142            * @throws SystemException if a system exception occurred
143            */
144            @SuppressWarnings("rawtypes")
145            public static java.util.List dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getService()
151                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152            }
153    
154            /**
155            * Returns the number of rows that match the dynamic query.
156            *
157            * @param dynamicQuery the dynamic query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public static long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().dynamicQueryCount(dynamicQuery);
165            }
166    
167            public static com.liferay.portal.model.Team fetchTeam(long teamId)
168                    throws com.liferay.portal.kernel.exception.SystemException {
169                    return getService().fetchTeam(teamId);
170            }
171    
172            /**
173            * Returns the team with the primary key.
174            *
175            * @param teamId the primary key of the team
176            * @return the team
177            * @throws PortalException if a team with the primary key could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public static com.liferay.portal.model.Team getTeam(long teamId)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getService().getTeam(teamId);
184            }
185    
186            public static com.liferay.portal.model.PersistedModel getPersistedModel(
187                    java.io.Serializable primaryKeyObj)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException {
190                    return getService().getPersistedModel(primaryKeyObj);
191            }
192    
193            /**
194            * Returns a range of all the teams.
195            *
196            * <p>
197            * 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.
198            * </p>
199            *
200            * @param start the lower bound of the range of teams
201            * @param end the upper bound of the range of teams (not inclusive)
202            * @return the range of teams
203            * @throws SystemException if a system exception occurred
204            */
205            public static java.util.List<com.liferay.portal.model.Team> getTeams(
206                    int start, int end)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return getService().getTeams(start, end);
209            }
210    
211            /**
212            * Returns the number of teams.
213            *
214            * @return the number of teams
215            * @throws SystemException if a system exception occurred
216            */
217            public static int getTeamsCount()
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getService().getTeamsCount();
220            }
221    
222            /**
223            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
224            *
225            * @param team the team
226            * @return the team that was updated
227            * @throws SystemException if a system exception occurred
228            */
229            public static com.liferay.portal.model.Team updateTeam(
230                    com.liferay.portal.model.Team team)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return getService().updateTeam(team);
233            }
234    
235            /**
236            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
237            *
238            * @param team the team
239            * @param merge whether to merge the team with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
240            * @return the team that was updated
241            * @throws SystemException if a system exception occurred
242            */
243            public static com.liferay.portal.model.Team updateTeam(
244                    com.liferay.portal.model.Team team, boolean merge)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getService().updateTeam(team, merge);
247            }
248    
249            /**
250            * Returns the Spring bean ID for this bean.
251            *
252            * @return the Spring bean ID for this bean
253            */
254            public static java.lang.String getBeanIdentifier() {
255                    return getService().getBeanIdentifier();
256            }
257    
258            /**
259            * Sets the Spring bean ID for this bean.
260            *
261            * @param beanIdentifier the Spring bean ID for this bean
262            */
263            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
264                    getService().setBeanIdentifier(beanIdentifier);
265            }
266    
267            public static com.liferay.portal.model.Team addTeam(long userId,
268                    long groupId, java.lang.String name, java.lang.String description)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return getService().addTeam(userId, groupId, name, description);
272            }
273    
274            public static void deleteTeams(long groupId)
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    getService().deleteTeams(groupId);
278            }
279    
280            public static java.util.List<com.liferay.portal.model.Team> getGroupTeams(
281                    long groupId)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getService().getGroupTeams(groupId);
284            }
285    
286            public static com.liferay.portal.model.Team getTeam(long groupId,
287                    java.lang.String name)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    return getService().getTeam(groupId, name);
291            }
292    
293            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
294                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
295                    return getService().getUserTeams(userId);
296            }
297    
298            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
299                    long userId, long groupId)
300                    throws com.liferay.portal.kernel.exception.SystemException {
301                    return getService().getUserTeams(userId, groupId);
302            }
303    
304            public static boolean hasUserTeam(long userId, long teamId)
305                    throws com.liferay.portal.kernel.exception.SystemException {
306                    return getService().hasUserTeam(userId, teamId);
307            }
308    
309            public static java.util.List<com.liferay.portal.model.Team> search(
310                    long groupId, java.lang.String name, java.lang.String description,
311                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
312                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
313                    throws com.liferay.portal.kernel.exception.SystemException {
314                    return getService()
315                                       .search(groupId, name, description, params, start, end, obc);
316            }
317    
318            public static int searchCount(long groupId, java.lang.String name,
319                    java.lang.String description,
320                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    return getService().searchCount(groupId, name, description, params);
323            }
324    
325            public static com.liferay.portal.model.Team updateTeam(long teamId,
326                    java.lang.String name, java.lang.String description)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getService().updateTeam(teamId, name, description);
330            }
331    
332            public static TeamLocalService getService() {
333                    if (_service == null) {
334                            _service = (TeamLocalService)PortalBeanLocatorUtil.locate(TeamLocalService.class.getName());
335    
336                            ReferenceRegistry.registerReference(TeamLocalServiceUtil.class,
337                                    "_service");
338                    }
339    
340                    return _service;
341            }
342    
343            /**
344             * @deprecated
345             */
346            public void setService(TeamLocalService service) {
347            }
348    
349            private static TeamLocalService _service;
350    }