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