1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.ratings.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.ratings.model.RatingsEntry;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="RatingsEntryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       RatingsEntryPersistence
35   * @see       RatingsEntryPersistenceImpl
36   * @generated
37   */
38  public class RatingsEntryUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(RatingsEntry)
48       */
49      public static void clearCache(RatingsEntry ratingsEntry) {
50          getPersistence().clearCache(ratingsEntry);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<RatingsEntry> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<RatingsEntry> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static RatingsEntry remove(RatingsEntry ratingsEntry)
82          throws SystemException {
83          return getPersistence().remove(ratingsEntry);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge)
90          throws SystemException {
91          return getPersistence().update(ratingsEntry, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
96          getPersistence().cacheResult(ratingsEntry);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries) {
101         getPersistence().cacheResult(ratingsEntries);
102     }
103 
104     public static com.liferay.portlet.ratings.model.RatingsEntry create(
105         long entryId) {
106         return getPersistence().create(entryId);
107     }
108 
109     public static com.liferay.portlet.ratings.model.RatingsEntry remove(
110         long entryId)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.ratings.NoSuchEntryException {
113         return getPersistence().remove(entryId);
114     }
115 
116     public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
117         com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(ratingsEntry, merge);
121     }
122 
123     public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
124         long entryId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.ratings.NoSuchEntryException {
127         return getPersistence().findByPrimaryKey(entryId);
128     }
129 
130     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
131         long entryId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(entryId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
137         long classNameId, long classPK)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByC_C(classNameId, classPK);
140     }
141 
142     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
143         long classNameId, long classPK, int start, int end)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByC_C(classNameId, classPK, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
149         long classNameId, long classPK, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByC_C(classNameId, classPK, start, end,
154             orderByComparator);
155     }
156 
157     public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
158         long classNameId, long classPK,
159         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160         throws com.liferay.portal.kernel.exception.SystemException,
161             com.liferay.portlet.ratings.NoSuchEntryException {
162         return getPersistence()
163                    .findByC_C_First(classNameId, classPK, orderByComparator);
164     }
165 
166     public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
167         long classNameId, long classPK,
168         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169         throws com.liferay.portal.kernel.exception.SystemException,
170             com.liferay.portlet.ratings.NoSuchEntryException {
171         return getPersistence()
172                    .findByC_C_Last(classNameId, classPK, orderByComparator);
173     }
174 
175     public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
176         long entryId, long classNameId, long classPK,
177         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178         throws com.liferay.portal.kernel.exception.SystemException,
179             com.liferay.portlet.ratings.NoSuchEntryException {
180         return getPersistence()
181                    .findByC_C_PrevAndNext(entryId, classNameId, classPK,
182             orderByComparator);
183     }
184 
185     public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
186         long userId, long classNameId, long classPK)
187         throws com.liferay.portal.kernel.exception.SystemException,
188             com.liferay.portlet.ratings.NoSuchEntryException {
189         return getPersistence().findByU_C_C(userId, classNameId, classPK);
190     }
191 
192     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
193         long userId, long classNameId, long classPK)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
196     }
197 
198     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
199         long userId, long classNameId, long classPK, boolean retrieveFromCache)
200         throws com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence()
202                    .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
203     }
204 
205     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
206         throws com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().findAll();
208     }
209 
210     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
211         int start, int end)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().findAll(start, end);
214     }
215 
216     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
217         int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getPersistence().findAll(start, end, orderByComparator);
221     }
222 
223     public static void removeByC_C(long classNameId, long classPK)
224         throws com.liferay.portal.kernel.exception.SystemException {
225         getPersistence().removeByC_C(classNameId, classPK);
226     }
227 
228     public static void removeByU_C_C(long userId, long classNameId, long classPK)
229         throws com.liferay.portal.kernel.exception.SystemException,
230             com.liferay.portlet.ratings.NoSuchEntryException {
231         getPersistence().removeByU_C_C(userId, classNameId, classPK);
232     }
233 
234     public static void removeAll()
235         throws com.liferay.portal.kernel.exception.SystemException {
236         getPersistence().removeAll();
237     }
238 
239     public static int countByC_C(long classNameId, long classPK)
240         throws com.liferay.portal.kernel.exception.SystemException {
241         return getPersistence().countByC_C(classNameId, classPK);
242     }
243 
244     public static int countByU_C_C(long userId, long classNameId, long classPK)
245         throws com.liferay.portal.kernel.exception.SystemException {
246         return getPersistence().countByU_C_C(userId, classNameId, classPK);
247     }
248 
249     public static int countAll()
250         throws com.liferay.portal.kernel.exception.SystemException {
251         return getPersistence().countAll();
252     }
253 
254     public static RatingsEntryPersistence getPersistence() {
255         if (_persistence == null) {
256             _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
257         }
258 
259         return _persistence;
260     }
261 
262     public void setPersistence(RatingsEntryPersistence persistence) {
263         _persistence = persistence;
264     }
265 
266     private static RatingsEntryPersistence _persistence;
267 }