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