001    /**
002     * Copyright (c) 2000-2012 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.portlet.messageboards.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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.messageboards.model.MBStatsUser;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the message boards stats user service. This utility wraps {@link MBStatsUserPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBStatsUserPersistence
037     * @see MBStatsUserPersistenceImpl
038     * @generated
039     */
040    public class MBStatsUserUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(MBStatsUser mbStatsUser) {
058                    getPersistence().clearCache(mbStatsUser);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<MBStatsUser> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<MBStatsUser> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<MBStatsUser> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static MBStatsUser update(MBStatsUser mbStatsUser)
101                    throws SystemException {
102                    return getPersistence().update(mbStatsUser);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static MBStatsUser update(MBStatsUser mbStatsUser,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(mbStatsUser, serviceContext);
111            }
112    
113            /**
114            * Returns all the message boards stats users where groupId = &#63;.
115            *
116            * @param groupId the group ID
117            * @return the matching message boards stats users
118            * @throws SystemException if a system exception occurred
119            */
120            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
121                    long groupId)
122                    throws com.liferay.portal.kernel.exception.SystemException {
123                    return getPersistence().findByGroupId(groupId);
124            }
125    
126            /**
127            * Returns a range of all the message boards stats users where groupId = &#63;.
128            *
129            * <p>
130            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
131            * </p>
132            *
133            * @param groupId the group ID
134            * @param start the lower bound of the range of message boards stats users
135            * @param end the upper bound of the range of message boards stats users (not inclusive)
136            * @return the range of matching message boards stats users
137            * @throws SystemException if a system exception occurred
138            */
139            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
140                    long groupId, int start, int end)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().findByGroupId(groupId, start, end);
143            }
144    
145            /**
146            * Returns an ordered range of all the message boards stats users where groupId = &#63;.
147            *
148            * <p>
149            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
150            * </p>
151            *
152            * @param groupId the group ID
153            * @param start the lower bound of the range of message boards stats users
154            * @param end the upper bound of the range of message boards stats users (not inclusive)
155            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
156            * @return the ordered range of matching message boards stats users
157            * @throws SystemException if a system exception occurred
158            */
159            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
160                    long groupId, int start, int end,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence()
164                                       .findByGroupId(groupId, start, end, orderByComparator);
165            }
166    
167            /**
168            * Returns the first message boards stats user in the ordered set where groupId = &#63;.
169            *
170            * @param groupId the group ID
171            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
172            * @return the first matching message boards stats user
173            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public static com.liferay.portlet.messageboards.model.MBStatsUser findByGroupId_First(
177                    long groupId,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.kernel.exception.SystemException,
180                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
181                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
182            }
183    
184            /**
185            * Returns the first message boards stats user in the ordered set where groupId = &#63;.
186            *
187            * @param groupId the group ID
188            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
189            * @return the first matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByGroupId_First(
193                    long groupId,
194                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
197            }
198    
199            /**
200            * Returns the last message boards stats user in the ordered set where groupId = &#63;.
201            *
202            * @param groupId the group ID
203            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
204            * @return the last matching message boards stats user
205            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
206            * @throws SystemException if a system exception occurred
207            */
208            public static com.liferay.portlet.messageboards.model.MBStatsUser findByGroupId_Last(
209                    long groupId,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.kernel.exception.SystemException,
212                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
213                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
214            }
215    
216            /**
217            * Returns the last message boards stats user in the ordered set where groupId = &#63;.
218            *
219            * @param groupId the group ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the last matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
222            * @throws SystemException if a system exception occurred
223            */
224            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByGroupId_Last(
225                    long groupId,
226                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
229            }
230    
231            /**
232            * Returns the message boards stats users before and after the current message boards stats user in the ordered set where groupId = &#63;.
233            *
234            * @param statsUserId the primary key of the current message boards stats user
235            * @param groupId the group ID
236            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
237            * @return the previous, current, and next message boards stats user
238            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a message boards stats user with the primary key could not be found
239            * @throws SystemException if a system exception occurred
240            */
241            public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByGroupId_PrevAndNext(
242                    long statsUserId, long groupId,
243                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244                    throws com.liferay.portal.kernel.exception.SystemException,
245                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
246                    return getPersistence()
247                                       .findByGroupId_PrevAndNext(statsUserId, groupId,
248                            orderByComparator);
249            }
250    
251            /**
252            * Removes all the message boards stats users where groupId = &#63; from the database.
253            *
254            * @param groupId the group ID
255            * @throws SystemException if a system exception occurred
256            */
257            public static void removeByGroupId(long groupId)
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    getPersistence().removeByGroupId(groupId);
260            }
261    
262            /**
263            * Returns the number of message boards stats users where groupId = &#63;.
264            *
265            * @param groupId the group ID
266            * @return the number of matching message boards stats users
267            * @throws SystemException if a system exception occurred
268            */
269            public static int countByGroupId(long groupId)
270                    throws com.liferay.portal.kernel.exception.SystemException {
271                    return getPersistence().countByGroupId(groupId);
272            }
273    
274            /**
275            * Returns all the message boards stats users where userId = &#63;.
276            *
277            * @param userId the user ID
278            * @return the matching message boards stats users
279            * @throws SystemException if a system exception occurred
280            */
281            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
282                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence().findByUserId(userId);
284            }
285    
286            /**
287            * Returns a range of all the message boards stats users where userId = &#63;.
288            *
289            * <p>
290            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
291            * </p>
292            *
293            * @param userId the user ID
294            * @param start the lower bound of the range of message boards stats users
295            * @param end the upper bound of the range of message boards stats users (not inclusive)
296            * @return the range of matching message boards stats users
297            * @throws SystemException if a system exception occurred
298            */
299            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
300                    long userId, int start, int end)
301                    throws com.liferay.portal.kernel.exception.SystemException {
302                    return getPersistence().findByUserId(userId, start, end);
303            }
304    
305            /**
306            * Returns an ordered range of all the message boards stats users where userId = &#63;.
307            *
308            * <p>
309            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
310            * </p>
311            *
312            * @param userId the user ID
313            * @param start the lower bound of the range of message boards stats users
314            * @param end the upper bound of the range of message boards stats users (not inclusive)
315            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
316            * @return the ordered range of matching message boards stats users
317            * @throws SystemException if a system exception occurred
318            */
319            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
320                    long userId, int start, int end,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence()
324                                       .findByUserId(userId, start, end, orderByComparator);
325            }
326    
327            /**
328            * Returns the first message boards stats user in the ordered set where userId = &#63;.
329            *
330            * @param userId the user ID
331            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
332            * @return the first matching message boards stats user
333            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
334            * @throws SystemException if a system exception occurred
335            */
336            public static com.liferay.portlet.messageboards.model.MBStatsUser findByUserId_First(
337                    long userId,
338                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
339                    throws com.liferay.portal.kernel.exception.SystemException,
340                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
341                    return getPersistence().findByUserId_First(userId, orderByComparator);
342            }
343    
344            /**
345            * Returns the first message boards stats user in the ordered set where userId = &#63;.
346            *
347            * @param userId the user ID
348            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
349            * @return the first matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
350            * @throws SystemException if a system exception occurred
351            */
352            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByUserId_First(
353                    long userId,
354                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
357            }
358    
359            /**
360            * Returns the last message boards stats user in the ordered set where userId = &#63;.
361            *
362            * @param userId the user ID
363            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
364            * @return the last matching message boards stats user
365            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
366            * @throws SystemException if a system exception occurred
367            */
368            public static com.liferay.portlet.messageboards.model.MBStatsUser findByUserId_Last(
369                    long userId,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.kernel.exception.SystemException,
372                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
373                    return getPersistence().findByUserId_Last(userId, orderByComparator);
374            }
375    
376            /**
377            * Returns the last message boards stats user in the ordered set where userId = &#63;.
378            *
379            * @param userId the user ID
380            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
381            * @return the last matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
382            * @throws SystemException if a system exception occurred
383            */
384            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByUserId_Last(
385                    long userId,
386                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
387                    throws com.liferay.portal.kernel.exception.SystemException {
388                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
389            }
390    
391            /**
392            * Returns the message boards stats users before and after the current message boards stats user in the ordered set where userId = &#63;.
393            *
394            * @param statsUserId the primary key of the current message boards stats user
395            * @param userId the user ID
396            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
397            * @return the previous, current, and next message boards stats user
398            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a message boards stats user with the primary key could not be found
399            * @throws SystemException if a system exception occurred
400            */
401            public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByUserId_PrevAndNext(
402                    long statsUserId, long userId,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException,
405                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
406                    return getPersistence()
407                                       .findByUserId_PrevAndNext(statsUserId, userId,
408                            orderByComparator);
409            }
410    
411            /**
412            * Removes all the message boards stats users where userId = &#63; from the database.
413            *
414            * @param userId the user ID
415            * @throws SystemException if a system exception occurred
416            */
417            public static void removeByUserId(long userId)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    getPersistence().removeByUserId(userId);
420            }
421    
422            /**
423            * Returns the number of message boards stats users where userId = &#63;.
424            *
425            * @param userId the user ID
426            * @return the number of matching message boards stats users
427            * @throws SystemException if a system exception occurred
428            */
429            public static int countByUserId(long userId)
430                    throws com.liferay.portal.kernel.exception.SystemException {
431                    return getPersistence().countByUserId(userId);
432            }
433    
434            /**
435            * Returns the message boards stats user where groupId = &#63; and userId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchStatsUserException} if it could not be found.
436            *
437            * @param groupId the group ID
438            * @param userId the user ID
439            * @return the matching message boards stats user
440            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
441            * @throws SystemException if a system exception occurred
442            */
443            public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_U(
444                    long groupId, long userId)
445                    throws com.liferay.portal.kernel.exception.SystemException,
446                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
447                    return getPersistence().findByG_U(groupId, userId);
448            }
449    
450            /**
451            * Returns the message boards stats user where groupId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
452            *
453            * @param groupId the group ID
454            * @param userId the user ID
455            * @return the matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
456            * @throws SystemException if a system exception occurred
457            */
458            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_U(
459                    long groupId, long userId)
460                    throws com.liferay.portal.kernel.exception.SystemException {
461                    return getPersistence().fetchByG_U(groupId, userId);
462            }
463    
464            /**
465            * Returns the message boards stats user where groupId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
466            *
467            * @param groupId the group ID
468            * @param userId the user ID
469            * @param retrieveFromCache whether to use the finder cache
470            * @return the matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
471            * @throws SystemException if a system exception occurred
472            */
473            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_U(
474                    long groupId, long userId, boolean retrieveFromCache)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
477            }
478    
479            /**
480            * Removes the message boards stats user where groupId = &#63; and userId = &#63; from the database.
481            *
482            * @param groupId the group ID
483            * @param userId the user ID
484            * @return the message boards stats user that was removed
485            * @throws SystemException if a system exception occurred
486            */
487            public static com.liferay.portlet.messageboards.model.MBStatsUser removeByG_U(
488                    long groupId, long userId)
489                    throws com.liferay.portal.kernel.exception.SystemException,
490                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
491                    return getPersistence().removeByG_U(groupId, userId);
492            }
493    
494            /**
495            * Returns the number of message boards stats users where groupId = &#63; and userId = &#63;.
496            *
497            * @param groupId the group ID
498            * @param userId the user ID
499            * @return the number of matching message boards stats users
500            * @throws SystemException if a system exception occurred
501            */
502            public static int countByG_U(long groupId, long userId)
503                    throws com.liferay.portal.kernel.exception.SystemException {
504                    return getPersistence().countByG_U(groupId, userId);
505            }
506    
507            /**
508            * Returns all the message boards stats users where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
509            *
510            * @param groupId the group ID
511            * @param userId the user ID
512            * @param messageCount the message count
513            * @return the matching message boards stats users
514            * @throws SystemException if a system exception occurred
515            */
516            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_NotU_NotM(
517                    long groupId, long userId, int messageCount)
518                    throws com.liferay.portal.kernel.exception.SystemException {
519                    return getPersistence().findByG_NotU_NotM(groupId, userId, messageCount);
520            }
521    
522            /**
523            * Returns a range of all the message boards stats users where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
524            *
525            * <p>
526            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
527            * </p>
528            *
529            * @param groupId the group ID
530            * @param userId the user ID
531            * @param messageCount the message count
532            * @param start the lower bound of the range of message boards stats users
533            * @param end the upper bound of the range of message boards stats users (not inclusive)
534            * @return the range of matching message boards stats users
535            * @throws SystemException if a system exception occurred
536            */
537            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_NotU_NotM(
538                    long groupId, long userId, int messageCount, int start, int end)
539                    throws com.liferay.portal.kernel.exception.SystemException {
540                    return getPersistence()
541                                       .findByG_NotU_NotM(groupId, userId, messageCount, start, end);
542            }
543    
544            /**
545            * Returns an ordered range of all the message boards stats users where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
546            *
547            * <p>
548            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
549            * </p>
550            *
551            * @param groupId the group ID
552            * @param userId the user ID
553            * @param messageCount the message count
554            * @param start the lower bound of the range of message boards stats users
555            * @param end the upper bound of the range of message boards stats users (not inclusive)
556            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
557            * @return the ordered range of matching message boards stats users
558            * @throws SystemException if a system exception occurred
559            */
560            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_NotU_NotM(
561                    long groupId, long userId, int messageCount, int start, int end,
562                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence()
565                                       .findByG_NotU_NotM(groupId, userId, messageCount, start,
566                            end, orderByComparator);
567            }
568    
569            /**
570            * Returns the first message boards stats user in the ordered set where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
571            *
572            * @param groupId the group ID
573            * @param userId the user ID
574            * @param messageCount the message count
575            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
576            * @return the first matching message boards stats user
577            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
578            * @throws SystemException if a system exception occurred
579            */
580            public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_NotU_NotM_First(
581                    long groupId, long userId, int messageCount,
582                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
583                    throws com.liferay.portal.kernel.exception.SystemException,
584                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
585                    return getPersistence()
586                                       .findByG_NotU_NotM_First(groupId, userId, messageCount,
587                            orderByComparator);
588            }
589    
590            /**
591            * Returns the first message boards stats user in the ordered set where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
592            *
593            * @param groupId the group ID
594            * @param userId the user ID
595            * @param messageCount the message count
596            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
597            * @return the first matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
598            * @throws SystemException if a system exception occurred
599            */
600            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_NotU_NotM_First(
601                    long groupId, long userId, int messageCount,
602                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    return getPersistence()
605                                       .fetchByG_NotU_NotM_First(groupId, userId, messageCount,
606                            orderByComparator);
607            }
608    
609            /**
610            * Returns the last message boards stats user in the ordered set where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
611            *
612            * @param groupId the group ID
613            * @param userId the user ID
614            * @param messageCount the message count
615            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
616            * @return the last matching message boards stats user
617            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a matching message boards stats user could not be found
618            * @throws SystemException if a system exception occurred
619            */
620            public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_NotU_NotM_Last(
621                    long groupId, long userId, int messageCount,
622                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
623                    throws com.liferay.portal.kernel.exception.SystemException,
624                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
625                    return getPersistence()
626                                       .findByG_NotU_NotM_Last(groupId, userId, messageCount,
627                            orderByComparator);
628            }
629    
630            /**
631            * Returns the last message boards stats user in the ordered set where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
632            *
633            * @param groupId the group ID
634            * @param userId the user ID
635            * @param messageCount the message count
636            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
637            * @return the last matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found
638            * @throws SystemException if a system exception occurred
639            */
640            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_NotU_NotM_Last(
641                    long groupId, long userId, int messageCount,
642                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
643                    throws com.liferay.portal.kernel.exception.SystemException {
644                    return getPersistence()
645                                       .fetchByG_NotU_NotM_Last(groupId, userId, messageCount,
646                            orderByComparator);
647            }
648    
649            /**
650            * Returns the message boards stats users before and after the current message boards stats user in the ordered set where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
651            *
652            * @param statsUserId the primary key of the current message boards stats user
653            * @param groupId the group ID
654            * @param userId the user ID
655            * @param messageCount the message count
656            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
657            * @return the previous, current, and next message boards stats user
658            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a message boards stats user with the primary key could not be found
659            * @throws SystemException if a system exception occurred
660            */
661            public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByG_NotU_NotM_PrevAndNext(
662                    long statsUserId, long groupId, long userId, int messageCount,
663                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
664                    throws com.liferay.portal.kernel.exception.SystemException,
665                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
666                    return getPersistence()
667                                       .findByG_NotU_NotM_PrevAndNext(statsUserId, groupId, userId,
668                            messageCount, orderByComparator);
669            }
670    
671            /**
672            * Removes all the message boards stats users where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63; from the database.
673            *
674            * @param groupId the group ID
675            * @param userId the user ID
676            * @param messageCount the message count
677            * @throws SystemException if a system exception occurred
678            */
679            public static void removeByG_NotU_NotM(long groupId, long userId,
680                    int messageCount)
681                    throws com.liferay.portal.kernel.exception.SystemException {
682                    getPersistence().removeByG_NotU_NotM(groupId, userId, messageCount);
683            }
684    
685            /**
686            * Returns the number of message boards stats users where groupId = &#63; and userId &ne; &#63; and messageCount &ne; &#63;.
687            *
688            * @param groupId the group ID
689            * @param userId the user ID
690            * @param messageCount the message count
691            * @return the number of matching message boards stats users
692            * @throws SystemException if a system exception occurred
693            */
694            public static int countByG_NotU_NotM(long groupId, long userId,
695                    int messageCount)
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence().countByG_NotU_NotM(groupId, userId, messageCount);
698            }
699    
700            /**
701            * Caches the message boards stats user in the entity cache if it is enabled.
702            *
703            * @param mbStatsUser the message boards stats user
704            */
705            public static void cacheResult(
706                    com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) {
707                    getPersistence().cacheResult(mbStatsUser);
708            }
709    
710            /**
711            * Caches the message boards stats users in the entity cache if it is enabled.
712            *
713            * @param mbStatsUsers the message boards stats users
714            */
715            public static void cacheResult(
716                    java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> mbStatsUsers) {
717                    getPersistence().cacheResult(mbStatsUsers);
718            }
719    
720            /**
721            * Creates a new message boards stats user with the primary key. Does not add the message boards stats user to the database.
722            *
723            * @param statsUserId the primary key for the new message boards stats user
724            * @return the new message boards stats user
725            */
726            public static com.liferay.portlet.messageboards.model.MBStatsUser create(
727                    long statsUserId) {
728                    return getPersistence().create(statsUserId);
729            }
730    
731            /**
732            * Removes the message boards stats user with the primary key from the database. Also notifies the appropriate model listeners.
733            *
734            * @param statsUserId the primary key of the message boards stats user
735            * @return the message boards stats user that was removed
736            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a message boards stats user with the primary key could not be found
737            * @throws SystemException if a system exception occurred
738            */
739            public static com.liferay.portlet.messageboards.model.MBStatsUser remove(
740                    long statsUserId)
741                    throws com.liferay.portal.kernel.exception.SystemException,
742                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
743                    return getPersistence().remove(statsUserId);
744            }
745    
746            public static com.liferay.portlet.messageboards.model.MBStatsUser updateImpl(
747                    com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser)
748                    throws com.liferay.portal.kernel.exception.SystemException {
749                    return getPersistence().updateImpl(mbStatsUser);
750            }
751    
752            /**
753            * Returns the message boards stats user with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchStatsUserException} if it could not be found.
754            *
755            * @param statsUserId the primary key of the message boards stats user
756            * @return the message boards stats user
757            * @throws com.liferay.portlet.messageboards.NoSuchStatsUserException if a message boards stats user with the primary key could not be found
758            * @throws SystemException if a system exception occurred
759            */
760            public static com.liferay.portlet.messageboards.model.MBStatsUser findByPrimaryKey(
761                    long statsUserId)
762                    throws com.liferay.portal.kernel.exception.SystemException,
763                            com.liferay.portlet.messageboards.NoSuchStatsUserException {
764                    return getPersistence().findByPrimaryKey(statsUserId);
765            }
766    
767            /**
768            * Returns the message boards stats user with the primary key or returns <code>null</code> if it could not be found.
769            *
770            * @param statsUserId the primary key of the message boards stats user
771            * @return the message boards stats user, or <code>null</code> if a message boards stats user with the primary key could not be found
772            * @throws SystemException if a system exception occurred
773            */
774            public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByPrimaryKey(
775                    long statsUserId)
776                    throws com.liferay.portal.kernel.exception.SystemException {
777                    return getPersistence().fetchByPrimaryKey(statsUserId);
778            }
779    
780            /**
781            * Returns all the message boards stats users.
782            *
783            * @return the message boards stats users
784            * @throws SystemException if a system exception occurred
785            */
786            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll()
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    return getPersistence().findAll();
789            }
790    
791            /**
792            * Returns a range of all the message boards stats users.
793            *
794            * <p>
795            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
796            * </p>
797            *
798            * @param start the lower bound of the range of message boards stats users
799            * @param end the upper bound of the range of message boards stats users (not inclusive)
800            * @return the range of message boards stats users
801            * @throws SystemException if a system exception occurred
802            */
803            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll(
804                    int start, int end)
805                    throws com.liferay.portal.kernel.exception.SystemException {
806                    return getPersistence().findAll(start, end);
807            }
808    
809            /**
810            * Returns an ordered range of all the message boards stats users.
811            *
812            * <p>
813            * 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.portlet.messageboards.model.impl.MBStatsUserModelImpl}. 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.
814            * </p>
815            *
816            * @param start the lower bound of the range of message boards stats users
817            * @param end the upper bound of the range of message boards stats users (not inclusive)
818            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
819            * @return the ordered range of message boards stats users
820            * @throws SystemException if a system exception occurred
821            */
822            public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll(
823                    int start, int end,
824                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
825                    throws com.liferay.portal.kernel.exception.SystemException {
826                    return getPersistence().findAll(start, end, orderByComparator);
827            }
828    
829            /**
830            * Removes all the message boards stats users from the database.
831            *
832            * @throws SystemException if a system exception occurred
833            */
834            public static void removeAll()
835                    throws com.liferay.portal.kernel.exception.SystemException {
836                    getPersistence().removeAll();
837            }
838    
839            /**
840            * Returns the number of message boards stats users.
841            *
842            * @return the number of message boards stats users
843            * @throws SystemException if a system exception occurred
844            */
845            public static int countAll()
846                    throws com.liferay.portal.kernel.exception.SystemException {
847                    return getPersistence().countAll();
848            }
849    
850            public static MBStatsUserPersistence getPersistence() {
851                    if (_persistence == null) {
852                            _persistence = (MBStatsUserPersistence)PortalBeanLocatorUtil.locate(MBStatsUserPersistence.class.getName());
853    
854                            ReferenceRegistry.registerReference(MBStatsUserUtil.class,
855                                    "_persistence");
856                    }
857    
858                    return _persistence;
859            }
860    
861            /**
862             * @deprecated
863             */
864            public void setPersistence(MBStatsUserPersistence persistence) {
865            }
866    
867            private static MBStatsUserPersistence _persistence;
868    }