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