1
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 import com.liferay.portal.kernel.util.ReferenceRegistry;
21
22 import com.liferay.portlet.ratings.model.RatingsEntry;
23
24 import java.util.List;
25
26
39 public class RatingsEntryUtil {
40
43 public static void clearCache() {
44 getPersistence().clearCache();
45 }
46
47
50 public static void clearCache(RatingsEntry ratingsEntry) {
51 getPersistence().clearCache(ratingsEntry);
52 }
53
54
57 public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58 throws SystemException {
59 return getPersistence().countWithDynamicQuery(dynamicQuery);
60 }
61
62
65 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66 throws SystemException {
67 return getPersistence().findWithDynamicQuery(dynamicQuery);
68 }
69
70
73 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74 int start, int end) throws SystemException {
75 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76 }
77
78
81 public static RatingsEntry remove(RatingsEntry ratingsEntry)
82 throws SystemException {
83 return getPersistence().remove(ratingsEntry);
84 }
85
86
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.SystemException,
112 com.liferay.portlet.ratings.NoSuchEntryException {
113 return getPersistence().remove(entryId);
114 }
115
116
119 public static com.liferay.portlet.ratings.model.RatingsEntry update(
120 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry)
121 throws com.liferay.portal.SystemException {
122 return getPersistence().update(ratingsEntry);
123 }
124
125 public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
126 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
127 boolean merge) throws com.liferay.portal.SystemException {
128 return getPersistence().updateImpl(ratingsEntry, merge);
129 }
130
131 public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
132 long entryId)
133 throws com.liferay.portal.SystemException,
134 com.liferay.portlet.ratings.NoSuchEntryException {
135 return getPersistence().findByPrimaryKey(entryId);
136 }
137
138 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
139 long entryId) throws com.liferay.portal.SystemException {
140 return getPersistence().fetchByPrimaryKey(entryId);
141 }
142
143 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
144 long classNameId, long classPK)
145 throws com.liferay.portal.SystemException {
146 return getPersistence().findByC_C(classNameId, classPK);
147 }
148
149 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
150 long classNameId, long classPK, int start, int end)
151 throws com.liferay.portal.SystemException {
152 return getPersistence().findByC_C(classNameId, classPK, start, end);
153 }
154
155 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
156 long classNameId, long classPK, int start, int end,
157 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158 throws com.liferay.portal.SystemException {
159 return getPersistence()
160 .findByC_C(classNameId, classPK, start, end,
161 orderByComparator);
162 }
163
164 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
165 long classNameId, long classPK,
166 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167 throws com.liferay.portal.SystemException,
168 com.liferay.portlet.ratings.NoSuchEntryException {
169 return getPersistence()
170 .findByC_C_First(classNameId, classPK, orderByComparator);
171 }
172
173 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
174 long classNameId, long classPK,
175 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176 throws com.liferay.portal.SystemException,
177 com.liferay.portlet.ratings.NoSuchEntryException {
178 return getPersistence()
179 .findByC_C_Last(classNameId, classPK, orderByComparator);
180 }
181
182 public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
183 long entryId, long classNameId, long classPK,
184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185 throws com.liferay.portal.SystemException,
186 com.liferay.portlet.ratings.NoSuchEntryException {
187 return getPersistence()
188 .findByC_C_PrevAndNext(entryId, classNameId, classPK,
189 orderByComparator);
190 }
191
192 public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
193 long userId, long classNameId, long classPK)
194 throws com.liferay.portal.SystemException,
195 com.liferay.portlet.ratings.NoSuchEntryException {
196 return getPersistence().findByU_C_C(userId, classNameId, classPK);
197 }
198
199 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
200 long userId, long classNameId, long classPK)
201 throws com.liferay.portal.SystemException {
202 return getPersistence().fetchByU_C_C(userId, classNameId, classPK);
203 }
204
205 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
206 long userId, long classNameId, long classPK, boolean retrieveFromCache)
207 throws com.liferay.portal.SystemException {
208 return getPersistence()
209 .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache);
210 }
211
212 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
213 throws com.liferay.portal.SystemException {
214 return getPersistence().findAll();
215 }
216
217 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
218 int start, int end) throws com.liferay.portal.SystemException {
219 return getPersistence().findAll(start, end);
220 }
221
222 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
223 int start, int end,
224 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225 throws com.liferay.portal.SystemException {
226 return getPersistence().findAll(start, end, orderByComparator);
227 }
228
229 public static void removeByC_C(long classNameId, long classPK)
230 throws com.liferay.portal.SystemException {
231 getPersistence().removeByC_C(classNameId, classPK);
232 }
233
234 public static void removeByU_C_C(long userId, long classNameId, long classPK)
235 throws com.liferay.portal.SystemException,
236 com.liferay.portlet.ratings.NoSuchEntryException {
237 getPersistence().removeByU_C_C(userId, classNameId, classPK);
238 }
239
240 public static void removeAll() throws com.liferay.portal.SystemException {
241 getPersistence().removeAll();
242 }
243
244 public static int countByC_C(long classNameId, long classPK)
245 throws com.liferay.portal.SystemException {
246 return getPersistence().countByC_C(classNameId, classPK);
247 }
248
249 public static int countByU_C_C(long userId, long classNameId, long classPK)
250 throws com.liferay.portal.SystemException {
251 return getPersistence().countByU_C_C(userId, classNameId, classPK);
252 }
253
254 public static int countAll() throws com.liferay.portal.SystemException {
255 return getPersistence().countAll();
256 }
257
258 public static RatingsEntryPersistence getPersistence() {
259 if (_persistence == null) {
260 _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName());
261
262 ReferenceRegistry.registerReference(RatingsEntryUtil.class,
263 "_persistence");
264 }
265
266 return _persistence;
267 }
268
269 public void setPersistence(RatingsEntryPersistence persistence) {
270 _persistence = persistence;
271
272 ReferenceRegistry.registerReference(RatingsEntryUtil.class,
273 "_persistence");
274 }
275
276 private static RatingsEntryPersistence _persistence;
277 }