001    /**
002     * Copyright (c) 2000-2010 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.service.ServiceContext;
022    
023    import com.liferay.portlet.ratings.model.RatingsEntry;
024    
025    import java.util.List;
026    
027    /**
028     * @author    Brian Wing Shun Chan
029     * @see       RatingsEntryPersistence
030     * @see       RatingsEntryPersistenceImpl
031     * @generated
032     */
033    public class RatingsEntryUtil {
034            /**
035             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
036             */
037            public static void clearCache() {
038                    getPersistence().clearCache();
039            }
040    
041            /**
042             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
043             */
044            public static void clearCache(RatingsEntry ratingsEntry) {
045                    getPersistence().clearCache(ratingsEntry);
046            }
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
050             */
051            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052                    throws SystemException {
053                    return getPersistence().countWithDynamicQuery(dynamicQuery);
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
058             */
059            public static List<RatingsEntry> findWithDynamicQuery(
060                    DynamicQuery dynamicQuery) throws SystemException {
061                    return getPersistence().findWithDynamicQuery(dynamicQuery);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
066             */
067            public static List<RatingsEntry> findWithDynamicQuery(
068                    DynamicQuery dynamicQuery, int start, int end)
069                    throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
075             */
076            public static List<RatingsEntry> findWithDynamicQuery(
077                    DynamicQuery dynamicQuery, int start, int end,
078                    OrderByComparator orderByComparator) throws SystemException {
079                    return getPersistence()
080                                       .findWithDynamicQuery(dynamicQuery, start, end,
081                            orderByComparator);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
086             */
087            public static RatingsEntry remove(RatingsEntry ratingsEntry)
088                    throws SystemException {
089                    return getPersistence().remove(ratingsEntry);
090            }
091    
092            /**
093             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
094             */
095            public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge)
096                    throws SystemException {
097                    return getPersistence().update(ratingsEntry, merge);
098            }
099    
100            /**
101             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
102             */
103            public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge,
104                    ServiceContext serviceContext) throws SystemException {
105                    return getPersistence().update(ratingsEntry, merge, serviceContext);
106            }
107    
108            public static void cacheResult(
109                    com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
110                    getPersistence().cacheResult(ratingsEntry);
111            }
112    
113            public static void cacheResult(
114                    java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries) {
115                    getPersistence().cacheResult(ratingsEntries);
116            }
117    
118            public static com.liferay.portlet.ratings.model.RatingsEntry create(
119                    long entryId) {
120                    return getPersistence().create(entryId);
121            }
122    
123            public static com.liferay.portlet.ratings.model.RatingsEntry remove(
124                    long entryId)
125                    throws com.liferay.portal.kernel.exception.SystemException,
126                            com.liferay.portlet.ratings.NoSuchEntryException {
127                    return getPersistence().remove(entryId);
128            }
129    
130            public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
131                    com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
132                    boolean merge)
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    return getPersistence().updateImpl(ratingsEntry, merge);
135            }
136    
137            public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
138                    long entryId)
139                    throws com.liferay.portal.kernel.exception.SystemException,
140                            com.liferay.portlet.ratings.NoSuchEntryException {
141                    return getPersistence().findByPrimaryKey(entryId);
142            }
143    
144            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
145                    long entryId)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return getPersistence().fetchByPrimaryKey(entryId);
148            }
149    
150            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
151                    long classNameId, long classPK)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getPersistence().findByC_C(classNameId, classPK);
154            }
155    
156            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
157                    long classNameId, long classPK, int start, int end)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return getPersistence().findByC_C(classNameId, classPK, start, end);
160            }
161    
162            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
163                    long classNameId, long classPK, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence()
167                                       .findByC_C(classNameId, classPK, start, end,
168                            orderByComparator);
169            }
170    
171            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
172                    long classNameId, long classPK,
173                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174                    throws com.liferay.portal.kernel.exception.SystemException,
175                            com.liferay.portlet.ratings.NoSuchEntryException {
176                    return getPersistence()
177                                       .findByC_C_First(classNameId, classPK, orderByComparator);
178            }
179    
180            public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
181                    long classNameId, long classPK,
182                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183                    throws com.liferay.portal.kernel.exception.SystemException,
184                            com.liferay.portlet.ratings.NoSuchEntryException {
185                    return getPersistence()
186                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
187            }
188    
189            public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
190                    long entryId, long classNameId, long classPK,
191                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192                    throws com.liferay.portal.kernel.exception.SystemException,
193                            com.liferay.portlet.ratings.NoSuchEntryException {
194                    return getPersistence()
195                                       .findByC_C_PrevAndNext(entryId, classNameId, classPK,
196                            orderByComparator);
197            }
198    
199            public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
200                    long userId, long classNameId, long classPK)
201                    throws com.liferay.portal.kernel.exception.SystemException,
202                            com.liferay.portlet.ratings.NoSuchEntryException {
203                    return getPersistence().findByU_C_C(userId, classNameId, classPK);
204            }
205    
206            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
207                    long userId, long classNameId, long classPK)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
210            }
211    
212            public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
213                    long userId, long classNameId, long classPK, boolean retrieveFromCache)
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence()
216                                       .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
217            }
218    
219            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findAll();
222            }
223    
224            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
225                    int start, int end)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findAll(start, end);
228            }
229    
230            public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
231                    int start, int end,
232                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getPersistence().findAll(start, end, orderByComparator);
235            }
236    
237            public static void removeByC_C(long classNameId, long classPK)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    getPersistence().removeByC_C(classNameId, classPK);
240            }
241    
242            public static void removeByU_C_C(long userId, long classNameId, long classPK)
243                    throws com.liferay.portal.kernel.exception.SystemException,
244                            com.liferay.portlet.ratings.NoSuchEntryException {
245                    getPersistence().removeByU_C_C(userId, classNameId, classPK);
246            }
247    
248            public static void removeAll()
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    getPersistence().removeAll();
251            }
252    
253            public static int countByC_C(long classNameId, long classPK)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getPersistence().countByC_C(classNameId, classPK);
256            }
257    
258            public static int countByU_C_C(long userId, long classNameId, long classPK)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence().countByU_C_C(userId, classNameId, classPK);
261            }
262    
263            public static int countAll()
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence().countAll();
266            }
267    
268            public static RatingsEntryPersistence getPersistence() {
269                    if (_persistence == null) {
270                            _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
271                    }
272    
273                    return _persistence;
274            }
275    
276            public void setPersistence(RatingsEntryPersistence persistence) {
277                    _persistence = persistence;
278            }
279    
280            private static RatingsEntryPersistence _persistence;
281    }