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.ratings.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.ratings.model.RatingsEntry;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the ratings entry service. This utility wraps {@link RatingsEntryPersistenceImpl} 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 RatingsEntryPersistence
037     * @see RatingsEntryPersistenceImpl
038     * @generated
039     */
040    public class RatingsEntryUtil {
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(RatingsEntry ratingsEntry) {
058                    getPersistence().clearCache(ratingsEntry);
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<RatingsEntry> 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<RatingsEntry> 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<RatingsEntry> 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, boolean)
099             */
100            public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(ratingsEntry, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(ratingsEntry, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the ratings entry in the entity cache if it is enabled.
115            *
116            * @param ratingsEntry the ratings entry
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
120                    getPersistence().cacheResult(ratingsEntry);
121            }
122    
123            /**
124            * Caches the ratings entries in the entity cache if it is enabled.
125            *
126            * @param ratingsEntries the ratings entries
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries) {
130                    getPersistence().cacheResult(ratingsEntries);
131            }
132    
133            /**
134            * Creates a new ratings entry with the primary key. Does not add the ratings entry to the database.
135            *
136            * @param entryId the primary key for the new ratings entry
137            * @return the new ratings entry
138            */
139            public static com.liferay.portlet.ratings.model.RatingsEntry create(
140                    long entryId) {
141                    return getPersistence().create(entryId);
142            }
143    
144            /**
145            * Removes the ratings entry with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param entryId the primary key of the ratings entry
148            * @return the ratings entry that was removed
149            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.ratings.model.RatingsEntry remove(
153                    long entryId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.ratings.NoSuchEntryException {
156                    return getPersistence().remove(entryId);
157            }
158    
159            public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
160                    com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(ratingsEntry, merge);
164            }
165    
166            /**
167            * Returns the ratings entry with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchEntryException} if it could not be found.
168            *
169            * @param entryId the primary key of the ratings entry
170            * @return the ratings entry
171            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
175                    long entryId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.ratings.NoSuchEntryException {
178                    return getPersistence().findByPrimaryKey(entryId);
179            }
180    
181            /**
182            * Returns the ratings entry with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param entryId the primary key of the ratings entry
185            * @return the ratings entry, or <code>null</code> if a ratings entry with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
189                    long entryId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(entryId);
192            }
193    
194            /**
195            * Returns all the ratings entries where classNameId = &#63; and classPK = &#63;.
196            *
197            * @param classNameId the class name ID
198            * @param classPK the class p k
199            * @return the matching ratings entries
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
203                    long classNameId, long classPK)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByC_C(classNameId, classPK);
206            }
207    
208            /**
209            * Returns a range of all the ratings entries where classNameId = &#63; and classPK = &#63;.
210            *
211            * <p>
212            * 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.
213            * </p>
214            *
215            * @param classNameId the class name ID
216            * @param classPK the class p k
217            * @param start the lower bound of the range of ratings entries
218            * @param end the upper bound of the range of ratings entries (not inclusive)
219            * @return the range of matching ratings entries
220            * @throws SystemException if a system exception occurred
221            */
222            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
223                    long classNameId, long classPK, int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getPersistence().findByC_C(classNameId, classPK, start, end);
226            }
227    
228            /**
229            * Returns an ordered range of all the ratings entries where classNameId = &#63; and classPK = &#63;.
230            *
231            * <p>
232            * 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.
233            * </p>
234            *
235            * @param classNameId the class name ID
236            * @param classPK the class p k
237            * @param start the lower bound of the range of ratings entries
238            * @param end the upper bound of the range of ratings entries (not inclusive)
239            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
240            * @return the ordered range of matching ratings entries
241            * @throws SystemException if a system exception occurred
242            */
243            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
244                    long classNameId, long classPK, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByC_C(classNameId, classPK, start, end,
249                            orderByComparator);
250            }
251    
252            /**
253            * Returns the first ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
254            *
255            * <p>
256            * 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.
257            * </p>
258            *
259            * @param classNameId the class name ID
260            * @param classPK the class p k
261            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
262            * @return the first matching ratings entry
263            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
264            * @throws SystemException if a system exception occurred
265            */
266            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
267                    long classNameId, long classPK,
268                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
269                    throws com.liferay.portal.kernel.exception.SystemException,
270                            com.liferay.portlet.ratings.NoSuchEntryException {
271                    return getPersistence()
272                                       .findByC_C_First(classNameId, classPK, orderByComparator);
273            }
274    
275            /**
276            * Returns the last ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
277            *
278            * <p>
279            * 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.
280            * </p>
281            *
282            * @param classNameId the class name ID
283            * @param classPK the class p k
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
285            * @return the last matching ratings entry
286            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
290                    long classNameId, long classPK,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException,
293                            com.liferay.portlet.ratings.NoSuchEntryException {
294                    return getPersistence()
295                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
296            }
297    
298            /**
299            * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
300            *
301            * <p>
302            * 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.
303            * </p>
304            *
305            * @param entryId the primary key of the current ratings entry
306            * @param classNameId the class name ID
307            * @param classPK the class p k
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next ratings entry
310            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found
311            * @throws SystemException if a system exception occurred
312            */
313            public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
314                    long entryId, long classNameId, long classPK,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.kernel.exception.SystemException,
317                            com.liferay.portlet.ratings.NoSuchEntryException {
318                    return getPersistence()
319                                       .findByC_C_PrevAndNext(entryId, classNameId, classPK,
320                            orderByComparator);
321            }
322    
323            /**
324            * Returns the ratings entry where userId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portlet.ratings.NoSuchEntryException} if it could not be found.
325            *
326            * @param userId the user ID
327            * @param classNameId the class name ID
328            * @param classPK the class p k
329            * @return the matching ratings entry
330            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
334                    long userId, long classNameId, long classPK)
335                    throws com.liferay.portal.kernel.exception.SystemException,
336                            com.liferay.portlet.ratings.NoSuchEntryException {
337                    return getPersistence().findByU_C_C(userId, classNameId, classPK);
338            }
339    
340            /**
341            * Returns the ratings entry where userId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
342            *
343            * @param userId the user ID
344            * @param classNameId the class name ID
345            * @param classPK the class p k
346            * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
347            * @throws SystemException if a system exception occurred
348            */
349            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
350                    long userId, long classNameId, long classPK)
351                    throws com.liferay.portal.kernel.exception.SystemException {
352                    return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
353            }
354    
355            /**
356            * Returns the ratings entry where userId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
357            *
358            * @param userId the user ID
359            * @param classNameId the class name ID
360            * @param classPK the class p k
361            * @param retrieveFromCache whether to use the finder cache
362            * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
363            * @throws SystemException if a system exception occurred
364            */
365            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
366                    long userId, long classNameId, long classPK, boolean retrieveFromCache)
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence()
369                                       .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
370            }
371    
372            /**
373            * Returns all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
374            *
375            * @param classNameId the class name ID
376            * @param classPK the class p k
377            * @param score the score
378            * @return the matching ratings entries
379            * @throws SystemException if a system exception occurred
380            */
381            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S(
382                    long classNameId, long classPK, double score)
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    return getPersistence().findByC_C_S(classNameId, classPK, score);
385            }
386    
387            /**
388            * Returns a range of all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
389            *
390            * <p>
391            * 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.
392            * </p>
393            *
394            * @param classNameId the class name ID
395            * @param classPK the class p k
396            * @param score the score
397            * @param start the lower bound of the range of ratings entries
398            * @param end the upper bound of the range of ratings entries (not inclusive)
399            * @return the range of matching ratings entries
400            * @throws SystemException if a system exception occurred
401            */
402            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S(
403                    long classNameId, long classPK, double score, int start, int end)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getPersistence()
406                                       .findByC_C_S(classNameId, classPK, score, start, end);
407            }
408    
409            /**
410            * Returns an ordered range of all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
411            *
412            * <p>
413            * 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.
414            * </p>
415            *
416            * @param classNameId the class name ID
417            * @param classPK the class p k
418            * @param score the score
419            * @param start the lower bound of the range of ratings entries
420            * @param end the upper bound of the range of ratings entries (not inclusive)
421            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
422            * @return the ordered range of matching ratings entries
423            * @throws SystemException if a system exception occurred
424            */
425            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S(
426                    long classNameId, long classPK, double score, int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    return getPersistence()
430                                       .findByC_C_S(classNameId, classPK, score, start, end,
431                            orderByComparator);
432            }
433    
434            /**
435            * Returns the first ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
436            *
437            * <p>
438            * 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.
439            * </p>
440            *
441            * @param classNameId the class name ID
442            * @param classPK the class p k
443            * @param score the score
444            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
445            * @return the first matching ratings entry
446            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
447            * @throws SystemException if a system exception occurred
448            */
449            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_First(
450                    long classNameId, long classPK, double score,
451                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
452                    throws com.liferay.portal.kernel.exception.SystemException,
453                            com.liferay.portlet.ratings.NoSuchEntryException {
454                    return getPersistence()
455                                       .findByC_C_S_First(classNameId, classPK, score,
456                            orderByComparator);
457            }
458    
459            /**
460            * Returns the last ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
461            *
462            * <p>
463            * 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.
464            * </p>
465            *
466            * @param classNameId the class name ID
467            * @param classPK the class p k
468            * @param score the score
469            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
470            * @return the last matching ratings entry
471            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
472            * @throws SystemException if a system exception occurred
473            */
474            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_Last(
475                    long classNameId, long classPK, double score,
476                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
477                    throws com.liferay.portal.kernel.exception.SystemException,
478                            com.liferay.portlet.ratings.NoSuchEntryException {
479                    return getPersistence()
480                                       .findByC_C_S_Last(classNameId, classPK, score,
481                            orderByComparator);
482            }
483    
484            /**
485            * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
486            *
487            * <p>
488            * 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.
489            * </p>
490            *
491            * @param entryId the primary key of the current ratings entry
492            * @param classNameId the class name ID
493            * @param classPK the class p k
494            * @param score the score
495            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
496            * @return the previous, current, and next ratings entry
497            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found
498            * @throws SystemException if a system exception occurred
499            */
500            public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_S_PrevAndNext(
501                    long entryId, long classNameId, long classPK, double score,
502                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
503                    throws com.liferay.portal.kernel.exception.SystemException,
504                            com.liferay.portlet.ratings.NoSuchEntryException {
505                    return getPersistence()
506                                       .findByC_C_S_PrevAndNext(entryId, classNameId, classPK,
507                            score, orderByComparator);
508            }
509    
510            /**
511            * Returns all the ratings entries.
512            *
513            * @return the ratings entries
514            * @throws SystemException if a system exception occurred
515            */
516            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
517                    throws com.liferay.portal.kernel.exception.SystemException {
518                    return getPersistence().findAll();
519            }
520    
521            /**
522            * Returns a range of all the ratings entries.
523            *
524            * <p>
525            * 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.
526            * </p>
527            *
528            * @param start the lower bound of the range of ratings entries
529            * @param end the upper bound of the range of ratings entries (not inclusive)
530            * @return the range of ratings entries
531            * @throws SystemException if a system exception occurred
532            */
533            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
534                    int start, int end)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    return getPersistence().findAll(start, end);
537            }
538    
539            /**
540            * Returns an ordered range of all the ratings entries.
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
544            * </p>
545            *
546            * @param start the lower bound of the range of ratings entries
547            * @param end the upper bound of the range of ratings entries (not inclusive)
548            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
549            * @return the ordered range of ratings entries
550            * @throws SystemException if a system exception occurred
551            */
552            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
553                    int start, int end,
554                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
555                    throws com.liferay.portal.kernel.exception.SystemException {
556                    return getPersistence().findAll(start, end, orderByComparator);
557            }
558    
559            /**
560            * Removes all the ratings entries where classNameId = &#63; and classPK = &#63; from the database.
561            *
562            * @param classNameId the class name ID
563            * @param classPK the class p k
564            * @throws SystemException if a system exception occurred
565            */
566            public static void removeByC_C(long classNameId, long classPK)
567                    throws com.liferay.portal.kernel.exception.SystemException {
568                    getPersistence().removeByC_C(classNameId, classPK);
569            }
570    
571            /**
572            * Removes the ratings entry where userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
573            *
574            * @param userId the user ID
575            * @param classNameId the class name ID
576            * @param classPK the class p k
577            * @throws SystemException if a system exception occurred
578            */
579            public static void removeByU_C_C(long userId, long classNameId, long classPK)
580                    throws com.liferay.portal.kernel.exception.SystemException,
581                            com.liferay.portlet.ratings.NoSuchEntryException {
582                    getPersistence().removeByU_C_C(userId, classNameId, classPK);
583            }
584    
585            /**
586            * Removes all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63; from the database.
587            *
588            * @param classNameId the class name ID
589            * @param classPK the class p k
590            * @param score the score
591            * @throws SystemException if a system exception occurred
592            */
593            public static void removeByC_C_S(long classNameId, long classPK,
594                    double score)
595                    throws com.liferay.portal.kernel.exception.SystemException {
596                    getPersistence().removeByC_C_S(classNameId, classPK, score);
597            }
598    
599            /**
600            * Removes all the ratings entries from the database.
601            *
602            * @throws SystemException if a system exception occurred
603            */
604            public static void removeAll()
605                    throws com.liferay.portal.kernel.exception.SystemException {
606                    getPersistence().removeAll();
607            }
608    
609            /**
610            * Returns the number of ratings entries where classNameId = &#63; and classPK = &#63;.
611            *
612            * @param classNameId the class name ID
613            * @param classPK the class p k
614            * @return the number of matching ratings entries
615            * @throws SystemException if a system exception occurred
616            */
617            public static int countByC_C(long classNameId, long classPK)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    return getPersistence().countByC_C(classNameId, classPK);
620            }
621    
622            /**
623            * Returns the number of ratings entries where userId = &#63; and classNameId = &#63; and classPK = &#63;.
624            *
625            * @param userId the user ID
626            * @param classNameId the class name ID
627            * @param classPK the class p k
628            * @return the number of matching ratings entries
629            * @throws SystemException if a system exception occurred
630            */
631            public static int countByU_C_C(long userId, long classNameId, long classPK)
632                    throws com.liferay.portal.kernel.exception.SystemException {
633                    return getPersistence().countByU_C_C(userId, classNameId, classPK);
634            }
635    
636            /**
637            * Returns the number of ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
638            *
639            * @param classNameId the class name ID
640            * @param classPK the class p k
641            * @param score the score
642            * @return the number of matching ratings entries
643            * @throws SystemException if a system exception occurred
644            */
645            public static int countByC_C_S(long classNameId, long classPK, double score)
646                    throws com.liferay.portal.kernel.exception.SystemException {
647                    return getPersistence().countByC_C_S(classNameId, classPK, score);
648            }
649    
650            /**
651            * Returns the number of ratings entries.
652            *
653            * @return the number of ratings entries
654            * @throws SystemException if a system exception occurred
655            */
656            public static int countAll()
657                    throws com.liferay.portal.kernel.exception.SystemException {
658                    return getPersistence().countAll();
659            }
660    
661            public static RatingsEntryPersistence getPersistence() {
662                    if (_persistence == null) {
663                            _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
664    
665                            ReferenceRegistry.registerReference(RatingsEntryUtil.class,
666                                    "_persistence");
667                    }
668    
669                    return _persistence;
670            }
671    
672            public void setPersistence(RatingsEntryPersistence persistence) {
673                    _persistence = persistence;
674    
675                    ReferenceRegistry.registerReference(RatingsEntryUtil.class,
676                            "_persistence");
677            }
678    
679            private static RatingsEntryPersistence _persistence;
680    }