1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.ratings.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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.SystemException,
96              com.liferay.portlet.ratings.NoSuchEntryException {
97          return getPersistence().remove(entryId);
98      }
99  
100     /**
101      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
102      */
103     public static com.liferay.portlet.ratings.model.RatingsEntry update(
104         com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry)
105         throws com.liferay.portal.SystemException {
106         return getPersistence().update(ratingsEntry);
107     }
108 
109     public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
110         com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
111         boolean merge) throws com.liferay.portal.SystemException {
112         return getPersistence().updateImpl(ratingsEntry, merge);
113     }
114 
115     public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
116         long entryId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.ratings.NoSuchEntryException {
119         return getPersistence().findByPrimaryKey(entryId);
120     }
121 
122     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
123         long entryId) throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByPrimaryKey(entryId);
125     }
126 
127     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
128         long classNameId, long classPK)
129         throws com.liferay.portal.SystemException {
130         return getPersistence().findByC_C(classNameId, classPK);
131     }
132 
133     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
134         long classNameId, long classPK, int start, int end)
135         throws com.liferay.portal.SystemException {
136         return getPersistence().findByC_C(classNameId, classPK, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
140         long classNameId, long classPK, int start, int end,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByC_C(classNameId, classPK, start, end, obc);
144     }
145 
146     public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
147         long classNameId, long classPK,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.ratings.NoSuchEntryException {
151         return getPersistence().findByC_C_First(classNameId, classPK, obc);
152     }
153 
154     public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
155         long classNameId, long classPK,
156         com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.ratings.NoSuchEntryException {
159         return getPersistence().findByC_C_Last(classNameId, classPK, obc);
160     }
161 
162     public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
163         long entryId, long classNameId, long classPK,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException,
166             com.liferay.portlet.ratings.NoSuchEntryException {
167         return getPersistence()
168                    .findByC_C_PrevAndNext(entryId, classNameId, classPK, obc);
169     }
170 
171     public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
172         long userId, long classNameId, long classPK)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.ratings.NoSuchEntryException {
175         return getPersistence().findByU_C_C(userId, classNameId, classPK);
176     }
177 
178     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
179         long userId, long classNameId, long classPK)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
182     }
183 
184     public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
185         long userId, long classNameId, long classPK, boolean retrieveFromCache)
186         throws com.liferay.portal.SystemException {
187         return getPersistence()
188                    .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
189     }
190 
191     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findAll();
194     }
195 
196     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
197         int start, int end) throws com.liferay.portal.SystemException {
198         return getPersistence().findAll(start, end);
199     }
200 
201     public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
202         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findAll(start, end, obc);
205     }
206 
207     public static void removeByC_C(long classNameId, long classPK)
208         throws com.liferay.portal.SystemException {
209         getPersistence().removeByC_C(classNameId, classPK);
210     }
211 
212     public static void removeByU_C_C(long userId, long classNameId, long classPK)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.ratings.NoSuchEntryException {
215         getPersistence().removeByU_C_C(userId, classNameId, classPK);
216     }
217 
218     public static void removeAll() throws com.liferay.portal.SystemException {
219         getPersistence().removeAll();
220     }
221 
222     public static int countByC_C(long classNameId, long classPK)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().countByC_C(classNameId, classPK);
225     }
226 
227     public static int countByU_C_C(long userId, long classNameId, long classPK)
228         throws com.liferay.portal.SystemException {
229         return getPersistence().countByU_C_C(userId, classNameId, classPK);
230     }
231 
232     public static int countAll() throws com.liferay.portal.SystemException {
233         return getPersistence().countAll();
234     }
235 
236     public static RatingsEntryPersistence getPersistence() {
237         if (_persistence == null) {
238             _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
239         }
240 
241         return _persistence;
242     }
243 
244     public void setPersistence(RatingsEntryPersistence persistence) {
245         _persistence = persistence;
246     }
247 
248     private static RatingsEntryPersistence _persistence;
249 }