001    /**
002     * Copyright (c) 2000-2013 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            * @param classNameId the class name ID
256            * @param classPK the class p k
257            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
258            * @return the first matching ratings entry
259            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
260            * @throws SystemException if a system exception occurred
261            */
262            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
263                    long classNameId, long classPK,
264                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265                    throws com.liferay.portal.kernel.exception.SystemException,
266                            com.liferay.portlet.ratings.NoSuchEntryException {
267                    return getPersistence()
268                                       .findByC_C_First(classNameId, classPK, orderByComparator);
269            }
270    
271            /**
272            * Returns the first ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
273            *
274            * @param classNameId the class name ID
275            * @param classPK the class p k
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the first matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_First(
281                    long classNameId, long classPK,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.kernel.exception.SystemException {
284                    return getPersistence()
285                                       .fetchByC_C_First(classNameId, classPK, orderByComparator);
286            }
287    
288            /**
289            * Returns the last ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
290            *
291            * @param classNameId the class name ID
292            * @param classPK the class p k
293            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
294            * @return the last matching ratings entry
295            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
296            * @throws SystemException if a system exception occurred
297            */
298            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
299                    long classNameId, long classPK,
300                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301                    throws com.liferay.portal.kernel.exception.SystemException,
302                            com.liferay.portlet.ratings.NoSuchEntryException {
303                    return getPersistence()
304                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
305            }
306    
307            /**
308            * Returns the last ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
309            *
310            * @param classNameId the class name ID
311            * @param classPK the class p k
312            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
313            * @return the last matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
314            * @throws SystemException if a system exception occurred
315            */
316            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_Last(
317                    long classNameId, long classPK,
318                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319                    throws com.liferay.portal.kernel.exception.SystemException {
320                    return getPersistence()
321                                       .fetchByC_C_Last(classNameId, classPK, orderByComparator);
322            }
323    
324            /**
325            * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = &#63; and classPK = &#63;.
326            *
327            * @param entryId the primary key of the current ratings entry
328            * @param classNameId the class name ID
329            * @param classPK the class p k
330            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
331            * @return the previous, current, and next ratings entry
332            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found
333            * @throws SystemException if a system exception occurred
334            */
335            public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
336                    long entryId, long classNameId, long classPK,
337                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
338                    throws com.liferay.portal.kernel.exception.SystemException,
339                            com.liferay.portlet.ratings.NoSuchEntryException {
340                    return getPersistence()
341                                       .findByC_C_PrevAndNext(entryId, classNameId, classPK,
342                            orderByComparator);
343            }
344    
345            /**
346            * 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.
347            *
348            * @param userId the user ID
349            * @param classNameId the class name ID
350            * @param classPK the class p k
351            * @return the matching ratings entry
352            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
353            * @throws SystemException if a system exception occurred
354            */
355            public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
356                    long userId, long classNameId, long classPK)
357                    throws com.liferay.portal.kernel.exception.SystemException,
358                            com.liferay.portlet.ratings.NoSuchEntryException {
359                    return getPersistence().findByU_C_C(userId, classNameId, classPK);
360            }
361    
362            /**
363            * 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.
364            *
365            * @param userId the user ID
366            * @param classNameId the class name ID
367            * @param classPK the class p k
368            * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
369            * @throws SystemException if a system exception occurred
370            */
371            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
372                    long userId, long classNameId, long classPK)
373                    throws com.liferay.portal.kernel.exception.SystemException {
374                    return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
375            }
376    
377            /**
378            * 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.
379            *
380            * @param userId the user ID
381            * @param classNameId the class name ID
382            * @param classPK the class p k
383            * @param retrieveFromCache whether to use the finder cache
384            * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
385            * @throws SystemException if a system exception occurred
386            */
387            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
388                    long userId, long classNameId, long classPK, boolean retrieveFromCache)
389                    throws com.liferay.portal.kernel.exception.SystemException {
390                    return getPersistence()
391                                       .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
392            }
393    
394            /**
395            * Returns all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
396            *
397            * @param classNameId the class name ID
398            * @param classPK the class p k
399            * @param score the score
400            * @return the matching ratings entries
401            * @throws SystemException if a system exception occurred
402            */
403            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S(
404                    long classNameId, long classPK, double score)
405                    throws com.liferay.portal.kernel.exception.SystemException {
406                    return getPersistence().findByC_C_S(classNameId, classPK, score);
407            }
408    
409            /**
410            * Returns a 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            * @return the range of matching ratings entries
422            * @throws SystemException if a system exception occurred
423            */
424            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S(
425                    long classNameId, long classPK, double score, int start, int end)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    return getPersistence()
428                                       .findByC_C_S(classNameId, classPK, score, start, end);
429            }
430    
431            /**
432            * Returns an ordered range of all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
433            *
434            * <p>
435            * 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.
436            * </p>
437            *
438            * @param classNameId the class name ID
439            * @param classPK the class p k
440            * @param score the score
441            * @param start the lower bound of the range of ratings entries
442            * @param end the upper bound of the range of ratings entries (not inclusive)
443            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
444            * @return the ordered range of matching ratings entries
445            * @throws SystemException if a system exception occurred
446            */
447            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S(
448                    long classNameId, long classPK, double score, int start, int end,
449                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    return getPersistence()
452                                       .findByC_C_S(classNameId, classPK, score, start, end,
453                            orderByComparator);
454            }
455    
456            /**
457            * Returns the first ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
458            *
459            * @param classNameId the class name ID
460            * @param classPK the class p k
461            * @param score the score
462            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
463            * @return the first matching ratings entry
464            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
465            * @throws SystemException if a system exception occurred
466            */
467            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_First(
468                    long classNameId, long classPK, double score,
469                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
470                    throws com.liferay.portal.kernel.exception.SystemException,
471                            com.liferay.portlet.ratings.NoSuchEntryException {
472                    return getPersistence()
473                                       .findByC_C_S_First(classNameId, classPK, score,
474                            orderByComparator);
475            }
476    
477            /**
478            * Returns the first ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
479            *
480            * @param classNameId the class name ID
481            * @param classPK the class p k
482            * @param score the score
483            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
484            * @return the first matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
485            * @throws SystemException if a system exception occurred
486            */
487            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_S_First(
488                    long classNameId, long classPK, double score,
489                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
490                    throws com.liferay.portal.kernel.exception.SystemException {
491                    return getPersistence()
492                                       .fetchByC_C_S_First(classNameId, classPK, score,
493                            orderByComparator);
494            }
495    
496            /**
497            * Returns the last ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
498            *
499            * @param classNameId the class name ID
500            * @param classPK the class p k
501            * @param score the score
502            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
503            * @return the last matching ratings entry
504            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found
505            * @throws SystemException if a system exception occurred
506            */
507            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_Last(
508                    long classNameId, long classPK, double score,
509                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
510                    throws com.liferay.portal.kernel.exception.SystemException,
511                            com.liferay.portlet.ratings.NoSuchEntryException {
512                    return getPersistence()
513                                       .findByC_C_S_Last(classNameId, classPK, score,
514                            orderByComparator);
515            }
516    
517            /**
518            * Returns the last ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
519            *
520            * @param classNameId the class name ID
521            * @param classPK the class p k
522            * @param score the score
523            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
524            * @return the last matching ratings entry, or <code>null</code> if a matching ratings entry could not be found
525            * @throws SystemException if a system exception occurred
526            */
527            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_S_Last(
528                    long classNameId, long classPK, double score,
529                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getPersistence()
532                                       .fetchByC_C_S_Last(classNameId, classPK, score,
533                            orderByComparator);
534            }
535    
536            /**
537            * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = &#63; and classPK = &#63; and score = &#63;.
538            *
539            * @param entryId the primary key of the current ratings entry
540            * @param classNameId the class name ID
541            * @param classPK the class p k
542            * @param score the score
543            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
544            * @return the previous, current, and next ratings entry
545            * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found
546            * @throws SystemException if a system exception occurred
547            */
548            public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_S_PrevAndNext(
549                    long entryId, long classNameId, long classPK, double score,
550                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
551                    throws com.liferay.portal.kernel.exception.SystemException,
552                            com.liferay.portlet.ratings.NoSuchEntryException {
553                    return getPersistence()
554                                       .findByC_C_S_PrevAndNext(entryId, classNameId, classPK,
555                            score, orderByComparator);
556            }
557    
558            /**
559            * Returns all the ratings entries.
560            *
561            * @return the ratings entries
562            * @throws SystemException if a system exception occurred
563            */
564            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
565                    throws com.liferay.portal.kernel.exception.SystemException {
566                    return getPersistence().findAll();
567            }
568    
569            /**
570            * Returns a range of all the ratings entries.
571            *
572            * <p>
573            * 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.
574            * </p>
575            *
576            * @param start the lower bound of the range of ratings entries
577            * @param end the upper bound of the range of ratings entries (not inclusive)
578            * @return the range of ratings entries
579            * @throws SystemException if a system exception occurred
580            */
581            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
582                    int start, int end)
583                    throws com.liferay.portal.kernel.exception.SystemException {
584                    return getPersistence().findAll(start, end);
585            }
586    
587            /**
588            * Returns an ordered range of all the ratings entries.
589            *
590            * <p>
591            * 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.
592            * </p>
593            *
594            * @param start the lower bound of the range of ratings entries
595            * @param end the upper bound of the range of ratings entries (not inclusive)
596            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
597            * @return the ordered range of ratings entries
598            * @throws SystemException if a system exception occurred
599            */
600            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
601                    int start, int end,
602                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    return getPersistence().findAll(start, end, orderByComparator);
605            }
606    
607            /**
608            * Removes all the ratings entries where classNameId = &#63; and classPK = &#63; from the database.
609            *
610            * @param classNameId the class name ID
611            * @param classPK the class p k
612            * @throws SystemException if a system exception occurred
613            */
614            public static void removeByC_C(long classNameId, long classPK)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    getPersistence().removeByC_C(classNameId, classPK);
617            }
618    
619            /**
620            * Removes the ratings entry where userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
621            *
622            * @param userId the user ID
623            * @param classNameId the class name ID
624            * @param classPK the class p k
625            * @return the ratings entry that was removed
626            * @throws SystemException if a system exception occurred
627            */
628            public static com.liferay.portlet.ratings.model.RatingsEntry removeByU_C_C(
629                    long userId, long classNameId, long classPK)
630                    throws com.liferay.portal.kernel.exception.SystemException,
631                            com.liferay.portlet.ratings.NoSuchEntryException {
632                    return getPersistence().removeByU_C_C(userId, classNameId, classPK);
633            }
634    
635            /**
636            * Removes all the ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63; from the database.
637            *
638            * @param classNameId the class name ID
639            * @param classPK the class p k
640            * @param score the score
641            * @throws SystemException if a system exception occurred
642            */
643            public static void removeByC_C_S(long classNameId, long classPK,
644                    double score)
645                    throws com.liferay.portal.kernel.exception.SystemException {
646                    getPersistence().removeByC_C_S(classNameId, classPK, score);
647            }
648    
649            /**
650            * Removes all the ratings entries from the database.
651            *
652            * @throws SystemException if a system exception occurred
653            */
654            public static void removeAll()
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    getPersistence().removeAll();
657            }
658    
659            /**
660            * Returns the number of ratings entries where classNameId = &#63; and classPK = &#63;.
661            *
662            * @param classNameId the class name ID
663            * @param classPK the class p k
664            * @return the number of matching ratings entries
665            * @throws SystemException if a system exception occurred
666            */
667            public static int countByC_C(long classNameId, long classPK)
668                    throws com.liferay.portal.kernel.exception.SystemException {
669                    return getPersistence().countByC_C(classNameId, classPK);
670            }
671    
672            /**
673            * Returns the number of ratings entries where userId = &#63; and classNameId = &#63; and classPK = &#63;.
674            *
675            * @param userId the user ID
676            * @param classNameId the class name ID
677            * @param classPK the class p k
678            * @return the number of matching ratings entries
679            * @throws SystemException if a system exception occurred
680            */
681            public static int countByU_C_C(long userId, long classNameId, long classPK)
682                    throws com.liferay.portal.kernel.exception.SystemException {
683                    return getPersistence().countByU_C_C(userId, classNameId, classPK);
684            }
685    
686            /**
687            * Returns the number of ratings entries where classNameId = &#63; and classPK = &#63; and score = &#63;.
688            *
689            * @param classNameId the class name ID
690            * @param classPK the class p k
691            * @param score the score
692            * @return the number of matching ratings entries
693            * @throws SystemException if a system exception occurred
694            */
695            public static int countByC_C_S(long classNameId, long classPK, double score)
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence().countByC_C_S(classNameId, classPK, score);
698            }
699    
700            /**
701            * Returns the number of ratings entries.
702            *
703            * @return the number of ratings entries
704            * @throws SystemException if a system exception occurred
705            */
706            public static int countAll()
707                    throws com.liferay.portal.kernel.exception.SystemException {
708                    return getPersistence().countAll();
709            }
710    
711            public static RatingsEntryPersistence getPersistence() {
712                    if (_persistence == null) {
713                            _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
714    
715                            ReferenceRegistry.registerReference(RatingsEntryUtil.class,
716                                    "_persistence");
717                    }
718    
719                    return _persistence;
720            }
721    
722            /**
723             * @deprecated
724             */
725            public void setPersistence(RatingsEntryPersistence persistence) {
726            }
727    
728            private static RatingsEntryPersistence _persistence;
729    }