001    /**
002     * Copyright (c) 2000-2010 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.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Team;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       TeamPersistence
029     * @see       TeamPersistenceImpl
030     * @generated
031     */
032    public class TeamUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Team team) {
044                    getPersistence().clearCache(team);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery,
067                    int start, int end) throws SystemException {
068                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
073             */
074            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery,
075                    int start, int end, OrderByComparator orderByComparator)
076                    throws SystemException {
077                    return getPersistence()
078                                       .findWithDynamicQuery(dynamicQuery, start, end,
079                            orderByComparator);
080            }
081    
082            /**
083             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
084             */
085            public static Team remove(Team team) throws SystemException {
086                    return getPersistence().remove(team);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
091             */
092            public static Team update(Team team, boolean merge)
093                    throws SystemException {
094                    return getPersistence().update(team, merge);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
099             */
100            public static Team update(Team team, boolean merge,
101                    ServiceContext serviceContext) throws SystemException {
102                    return getPersistence().update(team, merge, serviceContext);
103            }
104    
105            public static void cacheResult(com.liferay.portal.model.Team team) {
106                    getPersistence().cacheResult(team);
107            }
108    
109            public static void cacheResult(
110                    java.util.List<com.liferay.portal.model.Team> teams) {
111                    getPersistence().cacheResult(teams);
112            }
113    
114            public static com.liferay.portal.model.Team create(long teamId) {
115                    return getPersistence().create(teamId);
116            }
117    
118            public static com.liferay.portal.model.Team remove(long teamId)
119                    throws com.liferay.portal.NoSuchTeamException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getPersistence().remove(teamId);
122            }
123    
124            public static com.liferay.portal.model.Team updateImpl(
125                    com.liferay.portal.model.Team team, boolean merge)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getPersistence().updateImpl(team, merge);
128            }
129    
130            public static com.liferay.portal.model.Team findByPrimaryKey(long teamId)
131                    throws com.liferay.portal.NoSuchTeamException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    return getPersistence().findByPrimaryKey(teamId);
134            }
135    
136            public static com.liferay.portal.model.Team fetchByPrimaryKey(long teamId)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getPersistence().fetchByPrimaryKey(teamId);
139            }
140    
141            public static java.util.List<com.liferay.portal.model.Team> findByGroupId(
142                    long groupId)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getPersistence().findByGroupId(groupId);
145            }
146    
147            public static java.util.List<com.liferay.portal.model.Team> findByGroupId(
148                    long groupId, int start, int end)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getPersistence().findByGroupId(groupId, start, end);
151            }
152    
153            public static java.util.List<com.liferay.portal.model.Team> findByGroupId(
154                    long groupId, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence()
158                                       .findByGroupId(groupId, start, end, orderByComparator);
159            }
160    
161            public static com.liferay.portal.model.Team findByGroupId_First(
162                    long groupId,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.NoSuchTeamException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
167            }
168    
169            public static com.liferay.portal.model.Team findByGroupId_Last(
170                    long groupId,
171                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172                    throws com.liferay.portal.NoSuchTeamException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
175            }
176    
177            public static com.liferay.portal.model.Team[] findByGroupId_PrevAndNext(
178                    long teamId, long groupId,
179                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180                    throws com.liferay.portal.NoSuchTeamException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getPersistence()
183                                       .findByGroupId_PrevAndNext(teamId, groupId, orderByComparator);
184            }
185    
186            public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
187                    long groupId)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    return getPersistence().filterFindByGroupId(groupId);
190            }
191    
192            public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
193                    long groupId, int start, int end)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().filterFindByGroupId(groupId, start, end);
196            }
197    
198            public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
199                    long groupId, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence()
203                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
204            }
205    
206            public static com.liferay.portal.model.Team findByG_N(long groupId,
207                    java.lang.String name)
208                    throws com.liferay.portal.NoSuchTeamException,
209                            com.liferay.portal.kernel.exception.SystemException {
210                    return getPersistence().findByG_N(groupId, name);
211            }
212    
213            public static com.liferay.portal.model.Team fetchByG_N(long groupId,
214                    java.lang.String name)
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return getPersistence().fetchByG_N(groupId, name);
217            }
218    
219            public static com.liferay.portal.model.Team fetchByG_N(long groupId,
220                    java.lang.String name, boolean retrieveFromCache)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
223            }
224    
225            public static java.util.List<com.liferay.portal.model.Team> findAll()
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findAll();
228            }
229    
230            public static java.util.List<com.liferay.portal.model.Team> findAll(
231                    int start, int end)
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getPersistence().findAll(start, end);
234            }
235    
236            public static java.util.List<com.liferay.portal.model.Team> findAll(
237                    int start, int end,
238                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return getPersistence().findAll(start, end, orderByComparator);
241            }
242    
243            public static void removeByGroupId(long groupId)
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    getPersistence().removeByGroupId(groupId);
246            }
247    
248            public static void removeByG_N(long groupId, java.lang.String name)
249                    throws com.liferay.portal.NoSuchTeamException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    getPersistence().removeByG_N(groupId, name);
252            }
253    
254            public static void removeAll()
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    getPersistence().removeAll();
257            }
258    
259            public static int countByGroupId(long groupId)
260                    throws com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().countByGroupId(groupId);
262            }
263    
264            public static int filterCountByGroupId(long groupId)
265                    throws com.liferay.portal.kernel.exception.SystemException {
266                    return getPersistence().filterCountByGroupId(groupId);
267            }
268    
269            public static int countByG_N(long groupId, java.lang.String name)
270                    throws com.liferay.portal.kernel.exception.SystemException {
271                    return getPersistence().countByG_N(groupId, name);
272            }
273    
274            public static int filterCountByG_N(long groupId, java.lang.String name)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return getPersistence().filterCountByG_N(groupId, name);
277            }
278    
279            public static int countAll()
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return getPersistence().countAll();
282            }
283    
284            public static java.util.List<com.liferay.portal.model.User> getUsers(
285                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
286                    return getPersistence().getUsers(pk);
287            }
288    
289            public static java.util.List<com.liferay.portal.model.User> getUsers(
290                    long pk, int start, int end)
291                    throws com.liferay.portal.kernel.exception.SystemException {
292                    return getPersistence().getUsers(pk, start, end);
293            }
294    
295            public static java.util.List<com.liferay.portal.model.User> getUsers(
296                    long pk, int start, int end,
297                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence().getUsers(pk, start, end, orderByComparator);
300            }
301    
302            public static int getUsersSize(long pk)
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return getPersistence().getUsersSize(pk);
305            }
306    
307            public static boolean containsUser(long pk, long userPK)
308                    throws com.liferay.portal.kernel.exception.SystemException {
309                    return getPersistence().containsUser(pk, userPK);
310            }
311    
312            public static boolean containsUsers(long pk)
313                    throws com.liferay.portal.kernel.exception.SystemException {
314                    return getPersistence().containsUsers(pk);
315            }
316    
317            public static void addUser(long pk, long userPK)
318                    throws com.liferay.portal.kernel.exception.SystemException {
319                    getPersistence().addUser(pk, userPK);
320            }
321    
322            public static void addUser(long pk, com.liferay.portal.model.User user)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    getPersistence().addUser(pk, user);
325            }
326    
327            public static void addUsers(long pk, long[] userPKs)
328                    throws com.liferay.portal.kernel.exception.SystemException {
329                    getPersistence().addUsers(pk, userPKs);
330            }
331    
332            public static void addUsers(long pk,
333                    java.util.List<com.liferay.portal.model.User> users)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    getPersistence().addUsers(pk, users);
336            }
337    
338            public static void clearUsers(long pk)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    getPersistence().clearUsers(pk);
341            }
342    
343            public static void removeUser(long pk, long userPK)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    getPersistence().removeUser(pk, userPK);
346            }
347    
348            public static void removeUser(long pk, com.liferay.portal.model.User user)
349                    throws com.liferay.portal.kernel.exception.SystemException {
350                    getPersistence().removeUser(pk, user);
351            }
352    
353            public static void removeUsers(long pk, long[] userPKs)
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    getPersistence().removeUsers(pk, userPKs);
356            }
357    
358            public static void removeUsers(long pk,
359                    java.util.List<com.liferay.portal.model.User> users)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    getPersistence().removeUsers(pk, users);
362            }
363    
364            public static void setUsers(long pk, long[] userPKs)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    getPersistence().setUsers(pk, userPKs);
367            }
368    
369            public static void setUsers(long pk,
370                    java.util.List<com.liferay.portal.model.User> users)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    getPersistence().setUsers(pk, users);
373            }
374    
375            public static TeamPersistence getPersistence() {
376                    if (_persistence == null) {
377                            _persistence = (TeamPersistence)PortalBeanLocatorUtil.locate(TeamPersistence.class.getName());
378                    }
379    
380                    return _persistence;
381            }
382    
383            public void setPersistence(TeamPersistence persistence) {
384                    _persistence = persistence;
385            }
386    
387            private static TeamPersistence _persistence;
388    }