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#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58          int start, int end) throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static RatingsEntry remove(RatingsEntry ratingsEntry)
66          throws SystemException {
67          return getPersistence().remove(ratingsEntry);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge)
74          throws SystemException {
75          return getPersistence().update(ratingsEntry, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) {
80          getPersistence().cacheResult(ratingsEntry);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries) {
85          getPersistence().cacheResult(ratingsEntries);
86      }
87  
88      public static com.liferay.portlet.ratings.model.RatingsEntry create(
89          long entryId) {
90          return getPersistence().create(entryId);
91      }
92  
93      public static com.liferay.portlet.ratings.model.RatingsEntry remove(
94          long entryId)
95          throws com.liferay.portal.kernel.exception.SystemException,
96              com.liferay.portlet.ratings.NoSuchEntryException {
97          return getPersistence().remove(entryId);
98      }
99  
100     public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
101         com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
102         boolean merge)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().updateImpl(ratingsEntry, merge);
105     }
106 
107     public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
108         long entryId)
109         throws com.liferay.portal.kernel.exception.SystemException,
110             com.liferay.portlet.ratings.NoSuchEntryException {
111         return getPersistence().findByPrimaryKey(entryId);
112     }
113 
114     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
115         long entryId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().fetchByPrimaryKey(entryId);
118     }
119 
120     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
121         long classNameId, long classPK)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByC_C(classNameId, classPK);
124     }
125 
126     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
127         long classNameId, long classPK, int start, int end)
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().findByC_C(classNameId, classPK, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
133         long classNameId, long classPK, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByC_C(classNameId, classPK, start, end, obc);
137     }
138 
139     public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
140         long classNameId, long classPK,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.kernel.exception.SystemException,
143             com.liferay.portlet.ratings.NoSuchEntryException {
144         return getPersistence().findByC_C_First(classNameId, classPK, obc);
145     }
146 
147     public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
148         long classNameId, long classPK,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.kernel.exception.SystemException,
151             com.liferay.portlet.ratings.NoSuchEntryException {
152         return getPersistence().findByC_C_Last(classNameId, classPK, obc);
153     }
154 
155     public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
156         long entryId, long classNameId, long classPK,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.kernel.exception.SystemException,
159             com.liferay.portlet.ratings.NoSuchEntryException {
160         return getPersistence()
161                    .findByC_C_PrevAndNext(entryId, classNameId, classPK, obc);
162     }
163 
164     public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
165         long userId, long classNameId, long classPK)
166         throws com.liferay.portal.kernel.exception.SystemException,
167             com.liferay.portlet.ratings.NoSuchEntryException {
168         return getPersistence().findByU_C_C(userId, classNameId, classPK);
169     }
170 
171     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
172         long userId, long classNameId, long classPK)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
175     }
176 
177     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
178         long userId, long classNameId, long classPK, boolean retrieveFromCache)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence()
181                    .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
182     }
183 
184     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().findAll();
187     }
188 
189     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
190         int start, int end)
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findAll(start, end);
193     }
194 
195     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
196         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence().findAll(start, end, obc);
199     }
200 
201     public static void removeByC_C(long classNameId, long classPK)
202         throws com.liferay.portal.kernel.exception.SystemException {
203         getPersistence().removeByC_C(classNameId, classPK);
204     }
205 
206     public static void removeByU_C_C(long userId, long classNameId, long classPK)
207         throws com.liferay.portal.kernel.exception.SystemException,
208             com.liferay.portlet.ratings.NoSuchEntryException {
209         getPersistence().removeByU_C_C(userId, classNameId, classPK);
210     }
211 
212     public static void removeAll()
213         throws com.liferay.portal.kernel.exception.SystemException {
214         getPersistence().removeAll();
215     }
216 
217     public static int countByC_C(long classNameId, long classPK)
218         throws com.liferay.portal.kernel.exception.SystemException {
219         return getPersistence().countByC_C(classNameId, classPK);
220     }
221 
222     public static int countByU_C_C(long userId, long classNameId, long classPK)
223         throws com.liferay.portal.kernel.exception.SystemException {
224         return getPersistence().countByU_C_C(userId, classNameId, classPK);
225     }
226 
227     public static int countAll()
228         throws com.liferay.portal.kernel.exception.SystemException {
229         return getPersistence().countAll();
230     }
231 
232     public static RatingsEntryPersistence getPersistence() {
233         if (_persistence == null) {
234             _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
235         }
236 
237         return _persistence;
238     }
239 
240     public void setPersistence(RatingsEntryPersistence persistence) {
241         _persistence = persistence;
242     }
243 
244     private static RatingsEntryPersistence _persistence;
245 }