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