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