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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
317                    return getService().getIndexableActionableDynamicQuery();
318            }
319    
320            /**
321            * Returns the OSGi service identifier.
322            *
323            * @return the OSGi service identifier
324            */
325            public static java.lang.String getOSGiServiceIdentifier() {
326                    return getService().getOSGiServiceIdentifier();
327            }
328    
329            public static com.liferay.portal.model.PersistedModel getPersistedModel(
330                    java.io.Serializable primaryKeyObj)
331                    throws com.liferay.portal.kernel.exception.PortalException {
332                    return getService().getPersistedModel(primaryKeyObj);
333            }
334    
335            public static com.liferay.portal.model.Team getTeam(long groupId,
336                    java.lang.String name)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    return getService().getTeam(groupId, name);
339            }
340    
341            /**
342            * Returns the team with the primary key.
343            *
344            * @param teamId the primary key of the team
345            * @return the team
346            * @throws PortalException if a team with the primary key could not be found
347            */
348            public static com.liferay.portal.model.Team getTeam(long teamId)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return getService().getTeam(teamId);
351            }
352    
353            /**
354            * Returns the team matching the UUID and group.
355            *
356            * @param uuid the team's UUID
357            * @param groupId the primary key of the group
358            * @return the matching team
359            * @throws PortalException if a matching team could not be found
360            */
361            public static com.liferay.portal.model.Team getTeamByUuidAndGroupId(
362                    java.lang.String uuid, long groupId)
363                    throws com.liferay.portal.kernel.exception.PortalException {
364                    return getService().getTeamByUuidAndGroupId(uuid, groupId);
365            }
366    
367            /**
368            * Returns a range of all the teams.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param start the lower bound of the range of teams
375            * @param end the upper bound of the range of teams (not inclusive)
376            * @return the range of teams
377            */
378            public static java.util.List<com.liferay.portal.model.Team> getTeams(
379                    int start, int end) {
380                    return getService().getTeams(start, end);
381            }
382    
383            /**
384            * Returns all the teams matching the UUID and company.
385            *
386            * @param uuid the UUID of the teams
387            * @param companyId the primary key of the company
388            * @return the matching teams, or an empty list if no matches were found
389            */
390            public static java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
391                    java.lang.String uuid, long companyId) {
392                    return getService().getTeamsByUuidAndCompanyId(uuid, companyId);
393            }
394    
395            /**
396            * Returns a range of teams matching the UUID and company.
397            *
398            * @param uuid the UUID of the teams
399            * @param companyId the primary key of the company
400            * @param start the lower bound of the range of teams
401            * @param end the upper bound of the range of teams (not inclusive)
402            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
403            * @return the range of matching teams, or an empty list if no matches were found
404            */
405            public static java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
406                    java.lang.String uuid, long companyId, int start, int end,
407                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator) {
408                    return getService()
409                                       .getTeamsByUuidAndCompanyId(uuid, companyId, start, end,
410                            orderByComparator);
411            }
412    
413            /**
414            * Returns the number of teams.
415            *
416            * @return the number of teams
417            */
418            public static int getTeamsCount() {
419                    return getService().getTeamsCount();
420            }
421    
422            /**
423            * Returns the userGroupIds of the user groups associated with the team.
424            *
425            * @param teamId the teamId of the team
426            * @return long[] the userGroupIds of user groups associated with the team
427            */
428            public static long[] getUserGroupPrimaryKeys(long teamId) {
429                    return getService().getUserGroupPrimaryKeys(teamId);
430            }
431    
432            public static java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
433                    long userGroupId) {
434                    return getService().getUserGroupTeams(userGroupId);
435            }
436    
437            public static java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
438                    long userGroupId, int start, int end) {
439                    return getService().getUserGroupTeams(userGroupId, start, end);
440            }
441    
442            public static java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
443                    long userGroupId, int start, int end,
444                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator) {
445                    return getService()
446                                       .getUserGroupTeams(userGroupId, start, end, orderByComparator);
447            }
448    
449            public static int getUserGroupTeamsCount(long userGroupId) {
450                    return getService().getUserGroupTeamsCount(userGroupId);
451            }
452    
453            public static java.util.List<com.liferay.portal.model.Team> getUserOrUserGroupTeams(
454                    long groupId, long userId) {
455                    return getService().getUserOrUserGroupTeams(groupId, userId);
456            }
457    
458            /**
459            * Returns the userIds of the users associated with the team.
460            *
461            * @param teamId the teamId of the team
462            * @return long[] the userIds of users associated with the team
463            */
464            public static long[] getUserPrimaryKeys(long teamId) {
465                    return getService().getUserPrimaryKeys(teamId);
466            }
467    
468            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
469                    long userId) {
470                    return getService().getUserTeams(userId);
471            }
472    
473            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
474                    long userId, long groupId) {
475                    return getService().getUserTeams(userId, groupId);
476            }
477    
478            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
479                    long userId, int start, int end) {
480                    return getService().getUserTeams(userId, start, end);
481            }
482    
483            public static java.util.List<com.liferay.portal.model.Team> getUserTeams(
484                    long userId, int start, int end,
485                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator) {
486                    return getService().getUserTeams(userId, start, end, orderByComparator);
487            }
488    
489            public static int getUserTeamsCount(long userId) {
490                    return getService().getUserTeamsCount(userId);
491            }
492    
493            public static boolean hasUserGroupTeam(long userGroupId, long teamId) {
494                    return getService().hasUserGroupTeam(userGroupId, teamId);
495            }
496    
497            public static boolean hasUserGroupTeams(long userGroupId) {
498                    return getService().hasUserGroupTeams(userGroupId);
499            }
500    
501            public static boolean hasUserTeam(long userId, long teamId) {
502                    return getService().hasUserTeam(userId, teamId);
503            }
504    
505            public static boolean hasUserTeams(long userId) {
506                    return getService().hasUserTeams(userId);
507            }
508    
509            public static java.util.List<com.liferay.portal.model.Team> search(
510                    long groupId, java.lang.String name, java.lang.String description,
511                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
512                    int start, int end,
513                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc) {
514                    return getService()
515                                       .search(groupId, name, description, params, start, end, obc);
516            }
517    
518            public static int searchCount(long groupId, java.lang.String name,
519                    java.lang.String description,
520                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) {
521                    return getService().searchCount(groupId, name, description, params);
522            }
523    
524            public static void setUserGroupTeams(long userGroupId, long[] teamIds) {
525                    getService().setUserGroupTeams(userGroupId, teamIds);
526            }
527    
528            public static void setUserTeams(long userId, long[] teamIds) {
529                    getService().setUserTeams(userId, teamIds);
530            }
531    
532            /**
533            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
534            *
535            * @param team the team
536            * @return the team that was updated
537            */
538            public static com.liferay.portal.model.Team updateTeam(
539                    com.liferay.portal.model.Team team) {
540                    return getService().updateTeam(team);
541            }
542    
543            public static com.liferay.portal.model.Team updateTeam(long teamId,
544                    java.lang.String name, java.lang.String description)
545                    throws com.liferay.portal.kernel.exception.PortalException {
546                    return getService().updateTeam(teamId, name, description);
547            }
548    
549            public static TeamLocalService getService() {
550                    if (_service == null) {
551                            _service = (TeamLocalService)PortalBeanLocatorUtil.locate(TeamLocalService.class.getName());
552    
553                            ReferenceRegistry.registerReference(TeamLocalServiceUtil.class,
554                                    "_service");
555                    }
556    
557                    return _service;
558            }
559    
560            private static TeamLocalService _service;
561    }