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.portal.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 Team. This utility wraps
024     * {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} 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 TeamLocalService
032     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class TeamLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the team to the database. Also notifies the appropriate model listeners.
046            *
047            * @param team the team
048            * @return the team that was added
049            */
050            public static com.liferay.portal.model.Team addTeam(
051                    com.liferay.portal.model.Team team) {
052                    return getService().addTeam(team);
053            }
054    
055            public static com.liferay.portal.model.Team addTeam(long userId,
056                    long groupId, java.lang.String name, java.lang.String description)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    return getService().addTeam(userId, groupId, name, description);
059            }
060    
061            public static void addUserGroupTeam(long userGroupId,
062                    com.liferay.portal.model.Team team) {
063                    getService().addUserGroupTeam(userGroupId, team);
064            }
065    
066            public static void addUserGroupTeam(long userGroupId, long teamId) {
067                    getService().addUserGroupTeam(userGroupId, teamId);
068            }
069    
070            public static void addUserGroupTeams(long userGroupId,
071                    java.util.List<com.liferay.portal.model.Team> Teams) {
072                    getService().addUserGroupTeams(userGroupId, Teams);
073            }
074    
075            public static void addUserGroupTeams(long userGroupId, long[] teamIds) {
076                    getService().addUserGroupTeams(userGroupId, teamIds);
077            }
078    
079            public static void addUserTeam(long userId,
080                    com.liferay.portal.model.Team team) {
081                    getService().addUserTeam(userId, team);
082            }
083    
084            public static void addUserTeam(long userId, long teamId) {
085                    getService().addUserTeam(userId, teamId);
086            }
087    
088            public static void addUserTeams(long userId,
089                    java.util.List<com.liferay.portal.model.Team> Teams) {
090                    getService().addUserTeams(userId, Teams);
091            }
092    
093            public static void addUserTeams(long userId, long[] teamIds) {
094                    getService().addUserTeams(userId, teamIds);
095            }
096    
097            public static void clearUserGroupTeams(long userGroupId) {
098                    getService().clearUserGroupTeams(userGroupId);
099            }
100    
101            public static void clearUserTeams(long userId) {
102                    getService().clearUserTeams(userId);
103            }
104    
105            /**
106            * Creates a new team with the primary key. Does not add the team to the database.
107            *
108            * @param teamId the primary key for the new team
109            * @return the new team
110            */
111            public static com.liferay.portal.model.Team createTeam(long teamId) {
112                    return getService().createTeam(teamId);
113            }
114    
115            /**
116            * @throws PortalException
117            */
118            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
119                    com.liferay.portal.model.PersistedModel persistedModel)
120                    throws com.liferay.portal.kernel.exception.PortalException {
121                    return getService().deletePersistedModel(persistedModel);
122            }
123    
124            /**
125            * Deletes the team from the database. Also notifies the appropriate model listeners.
126            *
127            * @param team the team
128            * @return the team that was removed
129            * @throws PortalException
130            */
131            public static com.liferay.portal.model.Team deleteTeam(
132                    com.liferay.portal.model.Team team)
133                    throws com.liferay.portal.kernel.exception.PortalException {
134                    return getService().deleteTeam(team);
135            }
136    
137            /**
138            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
139            *
140            * @param teamId the primary key of the team
141            * @return the team that was removed
142            * @throws PortalException if a team with the primary key could not be found
143            */
144            public static com.liferay.portal.model.Team deleteTeam(long teamId)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    return getService().deleteTeam(teamId);
147            }
148    
149            public static void deleteTeams(long groupId)
150                    throws com.liferay.portal.kernel.exception.PortalException {
151                    getService().deleteTeams(groupId);
152            }
153    
154            public static void deleteUserGroupTeam(long userGroupId,
155                    com.liferay.portal.model.Team team) {
156                    getService().deleteUserGroupTeam(userGroupId, team);
157            }
158    
159            public static void deleteUserGroupTeam(long userGroupId, long teamId) {
160                    getService().deleteUserGroupTeam(userGroupId, teamId);
161            }
162    
163            public static void deleteUserGroupTeams(long userGroupId,
164                    java.util.List<com.liferay.portal.model.Team> Teams) {
165                    getService().deleteUserGroupTeams(userGroupId, Teams);
166            }
167    
168            public static void deleteUserGroupTeams(long userGroupId, long[] teamIds) {
169                    getService().deleteUserGroupTeams(userGroupId, teamIds);
170            }
171    
172            public static void deleteUserTeam(long userId,
173                    com.liferay.portal.model.Team team) {
174                    getService().deleteUserTeam(userId, team);
175            }
176    
177            public static void deleteUserTeam(long userId, long teamId) {
178                    getService().deleteUserTeam(userId, teamId);
179            }
180    
181            public static void deleteUserTeams(long userId,
182                    java.util.List<com.liferay.portal.model.Team> Teams) {
183                    getService().deleteUserTeams(userId, Teams);
184            }
185    
186            public static void deleteUserTeams(long userId, long[] teamIds) {
187                    getService().deleteUserTeams(userId, teamIds);
188            }
189    
190            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
191                    return getService().dynamicQuery();
192            }
193    
194            /**
195            * Performs a dynamic query on the database and returns the matching rows.
196            *
197            * @param dynamicQuery the dynamic query
198            * @return the matching rows
199            */
200            public static <T> java.util.List<T> dynamicQuery(
201                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
202                    return getService().dynamicQuery(dynamicQuery);
203            }
204    
205            /**
206            * Performs a dynamic query on the database and returns a range of the matching rows.
207            *
208            * <p>
209            * 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.portal.model.impl.TeamModelImpl}. 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.
210            * </p>
211            *
212            * @param dynamicQuery the dynamic query
213            * @param start the lower bound of the range of model instances
214            * @param end the upper bound of the range of model instances (not inclusive)
215            * @return the range of matching rows
216            */
217            public static <T> java.util.List<T> dynamicQuery(
218                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
219                    int end) {
220                    return getService().dynamicQuery(dynamicQuery, start, end);
221            }
222    
223            /**
224            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
225            *
226            * <p>
227            * 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.portal.model.impl.TeamModelImpl}. 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.
228            * </p>
229            *
230            * @param dynamicQuery the dynamic query
231            * @param start the lower bound of the range of model instances
232            * @param end the upper bound of the range of model instances (not inclusive)
233            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
234            * @return the ordered range of matching rows
235            */
236            public static <T> java.util.List<T> dynamicQuery(
237                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
238                    int end,
239                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
240                    return getService()
241                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
242            }
243    
244            /**
245            * Returns the number of rows matching the dynamic query.
246            *
247            * @param dynamicQuery the dynamic query
248            * @return the number of rows matching the dynamic query
249            */
250            public static long dynamicQueryCount(
251                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
252                    return getService().dynamicQueryCount(dynamicQuery);
253            }
254    
255            /**
256            * Returns the number of rows matching the dynamic query.
257            *
258            * @param dynamicQuery the dynamic query
259            * @param projection the projection to apply to the query
260            * @return the number of rows matching the dynamic query
261            */
262            public static long dynamicQueryCount(
263                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
264                    com.liferay.portal.kernel.dao.orm.Projection projection) {
265                    return getService().dynamicQueryCount(dynamicQuery, projection);
266            }
267    
268            public static com.liferay.portal.model.Team fetchTeam(long teamId) {
269                    return getService().fetchTeam(teamId);
270            }
271    
272            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
273                    return getService().getActionableDynamicQuery();
274            }
275    
276            /**
277            * Returns the Spring bean ID for this bean.
278            *
279            * @return the Spring bean ID for this bean
280            */
281            public static java.lang.String getBeanIdentifier() {
282                    return getService().getBeanIdentifier();
283            }
284    
285            public static java.util.List<com.liferay.portal.model.Team> getGroupTeams(
286                    long groupId) {
287                    return getService().getGroupTeams(groupId);
288            }
289    
290            public static com.liferay.portal.model.PersistedModel getPersistedModel(
291                    java.io.Serializable primaryKeyObj)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    return getService().getPersistedModel(primaryKeyObj);
294            }
295    
296            public static com.liferay.portal.model.Team getTeam(long groupId,
297                    java.lang.String name)
298                    throws com.liferay.portal.kernel.exception.PortalException {
299                    return getService().getTeam(groupId, name);
300            }
301    
302            /**
303            * Returns the team with the primary key.
304            *
305            * @param teamId the primary key of the team
306            * @return the team
307            * @throws PortalException if a team with the primary key could not be found
308            */
309            public static com.liferay.portal.model.Team getTeam(long teamId)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    return getService().getTeam(teamId);
312            }
313    
314            /**
315            * Returns a range of all the teams.
316            *
317            * <p>
318            * 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.portal.model.impl.TeamModelImpl}. 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.
319            * </p>
320            *
321            * @param start the lower bound of the range of teams
322            * @param end the upper bound of the range of teams (not inclusive)
323            * @return the range of teams
324            */
325            public static java.util.List<com.liferay.portal.model.Team> getTeams(
326                    int start, int end) {
327                    return getService().getTeams(start, end);
328            }
329    
330            /**
331            * Returns the number of teams.
332            *
333            * @return the number of teams
334            */
335            public static int getTeamsCount() {
336                    return getService().getTeamsCount();
337            }
338    
339            /**
340            * Returns the userGroupIds of the user groups associated with the team.
341            *
342            * @param teamId the teamId of the team
343            * @return long[] the userGroupIds of user groups associated with the team
344            */
345            public static long[] getUserGroupPrimaryKeys(long teamId) {
346                    return getService().getUserGroupPrimaryKeys(teamId);
347            }
348    
349            public static java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
350                    long userGroupId) {
351                    return getService().getUserGroupTeams(userGroupId);
352            }
353    
354            public static java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
355                    long userGroupId, int start, int end) {
356                    return getService().getUserGroupTeams(userGroupId, start, end);
357            }
358    
359            public static java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
360                    long userGroupId, int start, int end,
361                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator) {
362                    return getService()
363                                       .getUserGroupTeams(userGroupId, start, end, orderByComparator);
364            }
365    
366            public static int getUserGroupTeamsCount(long userGroupId) {
367                    return getService().getUserGroupTeamsCount(userGroupId);
368            }
369    
370            /**
371            * Returns the userIds of the users associated with the team.
372            *
373            * @param teamId the teamId of the team
374            * @return long[] the userIds of users associated with the team
375            */
376            public static long[] getUserPrimaryKeys(long teamId) {
377                    return getService().getUserPrimaryKeys(teamId);
378            }
379    
380            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
381                    long userId) {
382                    return getService().getUserTeams(userId);
383            }
384    
385            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
386                    long userId, long groupId) {
387                    return getService().getUserTeams(userId, groupId);
388            }
389    
390            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
391                    long userId, int start, int end) {
392                    return getService().getUserTeams(userId, start, end);
393            }
394    
395            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
396                    long userId, int start, int end,
397                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator) {
398                    return getService().getUserTeams(userId, start, end, orderByComparator);
399            }
400    
401            public static int getUserTeamsCount(long userId) {
402                    return getService().getUserTeamsCount(userId);
403            }
404    
405            public static boolean hasUserGroupTeam(long userGroupId, long teamId) {
406                    return getService().hasUserGroupTeam(userGroupId, teamId);
407            }
408    
409            public static boolean hasUserGroupTeams(long userGroupId) {
410                    return getService().hasUserGroupTeams(userGroupId);
411            }
412    
413            public static boolean hasUserTeam(long userId, long teamId) {
414                    return getService().hasUserTeam(userId, teamId);
415            }
416    
417            public static boolean hasUserTeams(long userId) {
418                    return getService().hasUserTeams(userId);
419            }
420    
421            public static java.util.List<com.liferay.portal.model.Team> search(
422                    long groupId, java.lang.String name, java.lang.String description,
423                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
424                    int start, int end,
425                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc) {
426                    return getService()
427                                       .search(groupId, name, description, params, start, end, obc);
428            }
429    
430            public static int searchCount(long groupId, java.lang.String name,
431                    java.lang.String description,
432                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) {
433                    return getService().searchCount(groupId, name, description, params);
434            }
435    
436            /**
437            * Sets the Spring bean ID for this bean.
438            *
439            * @param beanIdentifier the Spring bean ID for this bean
440            */
441            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
442                    getService().setBeanIdentifier(beanIdentifier);
443            }
444    
445            public static void setUserGroupTeams(long userGroupId, long[] teamIds) {
446                    getService().setUserGroupTeams(userGroupId, teamIds);
447            }
448    
449            public static void setUserTeams(long userId, long[] teamIds) {
450                    getService().setUserTeams(userId, teamIds);
451            }
452    
453            /**
454            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
455            *
456            * @param team the team
457            * @return the team that was updated
458            */
459            public static com.liferay.portal.model.Team updateTeam(
460                    com.liferay.portal.model.Team team) {
461                    return getService().updateTeam(team);
462            }
463    
464            public static com.liferay.portal.model.Team updateTeam(long teamId,
465                    java.lang.String name, java.lang.String description)
466                    throws com.liferay.portal.kernel.exception.PortalException {
467                    return getService().updateTeam(teamId, name, description);
468            }
469    
470            public static TeamLocalService getService() {
471                    if (_service == null) {
472                            _service = (TeamLocalService)PortalBeanLocatorUtil.locate(TeamLocalService.class.getName());
473    
474                            ReferenceRegistry.registerReference(TeamLocalServiceUtil.class,
475                                    "_service");
476                    }
477    
478                    return _service;
479            }
480    
481            /**
482             * @deprecated As of 6.2.0
483             */
484            @Deprecated
485            public void setService(TeamLocalService service) {
486            }
487    
488            private static TeamLocalService _service;
489    }