1
14
15 package com.liferay.portal.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 import com.liferay.portal.model.Website;
21
22 import java.util.List;
23
24
37 public class WebsiteUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57 int start, int end) throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59 }
60
61
64 public static Website remove(Website website) throws SystemException {
65 return getPersistence().remove(website);
66 }
67
68
71 public static Website update(Website website, boolean merge)
72 throws SystemException {
73 return getPersistence().update(website, merge);
74 }
75
76 public static void cacheResult(com.liferay.portal.model.Website website) {
77 getPersistence().cacheResult(website);
78 }
79
80 public static void cacheResult(
81 java.util.List<com.liferay.portal.model.Website> websites) {
82 getPersistence().cacheResult(websites);
83 }
84
85 public static com.liferay.portal.model.Website create(long websiteId) {
86 return getPersistence().create(websiteId);
87 }
88
89 public static com.liferay.portal.model.Website remove(long websiteId)
90 throws com.liferay.portal.NoSuchWebsiteException,
91 com.liferay.portal.kernel.exception.SystemException {
92 return getPersistence().remove(websiteId);
93 }
94
95 public static com.liferay.portal.model.Website updateImpl(
96 com.liferay.portal.model.Website website, boolean merge)
97 throws com.liferay.portal.kernel.exception.SystemException {
98 return getPersistence().updateImpl(website, merge);
99 }
100
101 public static com.liferay.portal.model.Website findByPrimaryKey(
102 long websiteId)
103 throws com.liferay.portal.NoSuchWebsiteException,
104 com.liferay.portal.kernel.exception.SystemException {
105 return getPersistence().findByPrimaryKey(websiteId);
106 }
107
108 public static com.liferay.portal.model.Website fetchByPrimaryKey(
109 long websiteId)
110 throws com.liferay.portal.kernel.exception.SystemException {
111 return getPersistence().fetchByPrimaryKey(websiteId);
112 }
113
114 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
115 long companyId)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getPersistence().findByCompanyId(companyId);
118 }
119
120 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
121 long companyId, int start, int end)
122 throws com.liferay.portal.kernel.exception.SystemException {
123 return getPersistence().findByCompanyId(companyId, start, end);
124 }
125
126 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
127 long companyId, int start, int end,
128 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
129 throws com.liferay.portal.kernel.exception.SystemException {
130 return getPersistence()
131 .findByCompanyId(companyId, start, end, orderByComparator);
132 }
133
134 public static com.liferay.portal.model.Website findByCompanyId_First(
135 long companyId,
136 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137 throws com.liferay.portal.NoSuchWebsiteException,
138 com.liferay.portal.kernel.exception.SystemException {
139 return getPersistence()
140 .findByCompanyId_First(companyId, orderByComparator);
141 }
142
143 public static com.liferay.portal.model.Website findByCompanyId_Last(
144 long companyId,
145 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146 throws com.liferay.portal.NoSuchWebsiteException,
147 com.liferay.portal.kernel.exception.SystemException {
148 return getPersistence()
149 .findByCompanyId_Last(companyId, orderByComparator);
150 }
151
152 public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext(
153 long websiteId, long companyId,
154 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155 throws com.liferay.portal.NoSuchWebsiteException,
156 com.liferay.portal.kernel.exception.SystemException {
157 return getPersistence()
158 .findByCompanyId_PrevAndNext(websiteId, companyId,
159 orderByComparator);
160 }
161
162 public static java.util.List<com.liferay.portal.model.Website> findByUserId(
163 long userId) throws com.liferay.portal.kernel.exception.SystemException {
164 return getPersistence().findByUserId(userId);
165 }
166
167 public static java.util.List<com.liferay.portal.model.Website> findByUserId(
168 long userId, int start, int end)
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getPersistence().findByUserId(userId, start, end);
171 }
172
173 public static java.util.List<com.liferay.portal.model.Website> findByUserId(
174 long userId, int start, int end,
175 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176 throws com.liferay.portal.kernel.exception.SystemException {
177 return getPersistence()
178 .findByUserId(userId, start, end, orderByComparator);
179 }
180
181 public static com.liferay.portal.model.Website findByUserId_First(
182 long userId,
183 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
184 throws com.liferay.portal.NoSuchWebsiteException,
185 com.liferay.portal.kernel.exception.SystemException {
186 return getPersistence().findByUserId_First(userId, orderByComparator);
187 }
188
189 public static com.liferay.portal.model.Website findByUserId_Last(
190 long userId,
191 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192 throws com.liferay.portal.NoSuchWebsiteException,
193 com.liferay.portal.kernel.exception.SystemException {
194 return getPersistence().findByUserId_Last(userId, orderByComparator);
195 }
196
197 public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext(
198 long websiteId, long userId,
199 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
200 throws com.liferay.portal.NoSuchWebsiteException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getPersistence()
203 .findByUserId_PrevAndNext(websiteId, userId,
204 orderByComparator);
205 }
206
207 public static java.util.List<com.liferay.portal.model.Website> findByC_C(
208 long companyId, long classNameId)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence().findByC_C(companyId, classNameId);
211 }
212
213 public static java.util.List<com.liferay.portal.model.Website> findByC_C(
214 long companyId, long classNameId, int start, int end)
215 throws com.liferay.portal.kernel.exception.SystemException {
216 return getPersistence().findByC_C(companyId, classNameId, start, end);
217 }
218
219 public static java.util.List<com.liferay.portal.model.Website> findByC_C(
220 long companyId, long classNameId, int start, int end,
221 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222 throws com.liferay.portal.kernel.exception.SystemException {
223 return getPersistence()
224 .findByC_C(companyId, classNameId, start, end,
225 orderByComparator);
226 }
227
228 public static com.liferay.portal.model.Website findByC_C_First(
229 long companyId, long classNameId,
230 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
231 throws com.liferay.portal.NoSuchWebsiteException,
232 com.liferay.portal.kernel.exception.SystemException {
233 return getPersistence()
234 .findByC_C_First(companyId, classNameId, orderByComparator);
235 }
236
237 public static com.liferay.portal.model.Website findByC_C_Last(
238 long companyId, long classNameId,
239 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
240 throws com.liferay.portal.NoSuchWebsiteException,
241 com.liferay.portal.kernel.exception.SystemException {
242 return getPersistence()
243 .findByC_C_Last(companyId, classNameId, orderByComparator);
244 }
245
246 public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext(
247 long websiteId, long companyId, long classNameId,
248 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249 throws com.liferay.portal.NoSuchWebsiteException,
250 com.liferay.portal.kernel.exception.SystemException {
251 return getPersistence()
252 .findByC_C_PrevAndNext(websiteId, companyId, classNameId,
253 orderByComparator);
254 }
255
256 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
257 long companyId, long classNameId, long classPK)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
260 }
261
262 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
263 long companyId, long classNameId, long classPK, int start, int end)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getPersistence()
266 .findByC_C_C(companyId, classNameId, classPK, start, end);
267 }
268
269 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
270 long companyId, long classNameId, long classPK, int start, int end,
271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272 throws com.liferay.portal.kernel.exception.SystemException {
273 return getPersistence()
274 .findByC_C_C(companyId, classNameId, classPK, start, end,
275 orderByComparator);
276 }
277
278 public static com.liferay.portal.model.Website findByC_C_C_First(
279 long companyId, long classNameId, long classPK,
280 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281 throws com.liferay.portal.NoSuchWebsiteException,
282 com.liferay.portal.kernel.exception.SystemException {
283 return getPersistence()
284 .findByC_C_C_First(companyId, classNameId, classPK,
285 orderByComparator);
286 }
287
288 public static com.liferay.portal.model.Website findByC_C_C_Last(
289 long companyId, long classNameId, long classPK,
290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291 throws com.liferay.portal.NoSuchWebsiteException,
292 com.liferay.portal.kernel.exception.SystemException {
293 return getPersistence()
294 .findByC_C_C_Last(companyId, classNameId, classPK,
295 orderByComparator);
296 }
297
298 public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext(
299 long websiteId, long companyId, long classNameId, long classPK,
300 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301 throws com.liferay.portal.NoSuchWebsiteException,
302 com.liferay.portal.kernel.exception.SystemException {
303 return getPersistence()
304 .findByC_C_C_PrevAndNext(websiteId, companyId, classNameId,
305 classPK, orderByComparator);
306 }
307
308 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
309 long companyId, long classNameId, long classPK, boolean primary)
310 throws com.liferay.portal.kernel.exception.SystemException {
311 return getPersistence()
312 .findByC_C_C_P(companyId, classNameId, classPK, primary);
313 }
314
315 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
316 long companyId, long classNameId, long classPK, boolean primary,
317 int start, int end)
318 throws com.liferay.portal.kernel.exception.SystemException {
319 return getPersistence()
320 .findByC_C_C_P(companyId, classNameId, classPK, primary,
321 start, end);
322 }
323
324 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
325 long companyId, long classNameId, long classPK, boolean primary,
326 int start, int end,
327 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
328 throws com.liferay.portal.kernel.exception.SystemException {
329 return getPersistence()
330 .findByC_C_C_P(companyId, classNameId, classPK, primary,
331 start, end, orderByComparator);
332 }
333
334 public static com.liferay.portal.model.Website findByC_C_C_P_First(
335 long companyId, long classNameId, long classPK, boolean primary,
336 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
337 throws com.liferay.portal.NoSuchWebsiteException,
338 com.liferay.portal.kernel.exception.SystemException {
339 return getPersistence()
340 .findByC_C_C_P_First(companyId, classNameId, classPK,
341 primary, orderByComparator);
342 }
343
344 public static com.liferay.portal.model.Website findByC_C_C_P_Last(
345 long companyId, long classNameId, long classPK, boolean primary,
346 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
347 throws com.liferay.portal.NoSuchWebsiteException,
348 com.liferay.portal.kernel.exception.SystemException {
349 return getPersistence()
350 .findByC_C_C_P_Last(companyId, classNameId, classPK,
351 primary, orderByComparator);
352 }
353
354 public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext(
355 long websiteId, long companyId, long classNameId, long classPK,
356 boolean primary,
357 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
358 throws com.liferay.portal.NoSuchWebsiteException,
359 com.liferay.portal.kernel.exception.SystemException {
360 return getPersistence()
361 .findByC_C_C_P_PrevAndNext(websiteId, companyId,
362 classNameId, classPK, primary, orderByComparator);
363 }
364
365 public static java.util.List<com.liferay.portal.model.Website> findAll()
366 throws com.liferay.portal.kernel.exception.SystemException {
367 return getPersistence().findAll();
368 }
369
370 public static java.util.List<com.liferay.portal.model.Website> findAll(
371 int start, int end)
372 throws com.liferay.portal.kernel.exception.SystemException {
373 return getPersistence().findAll(start, end);
374 }
375
376 public static java.util.List<com.liferay.portal.model.Website> findAll(
377 int start, int end,
378 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379 throws com.liferay.portal.kernel.exception.SystemException {
380 return getPersistence().findAll(start, end, orderByComparator);
381 }
382
383 public static void removeByCompanyId(long companyId)
384 throws com.liferay.portal.kernel.exception.SystemException {
385 getPersistence().removeByCompanyId(companyId);
386 }
387
388 public static void removeByUserId(long userId)
389 throws com.liferay.portal.kernel.exception.SystemException {
390 getPersistence().removeByUserId(userId);
391 }
392
393 public static void removeByC_C(long companyId, long classNameId)
394 throws com.liferay.portal.kernel.exception.SystemException {
395 getPersistence().removeByC_C(companyId, classNameId);
396 }
397
398 public static void removeByC_C_C(long companyId, long classNameId,
399 long classPK)
400 throws com.liferay.portal.kernel.exception.SystemException {
401 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
402 }
403
404 public static void removeByC_C_C_P(long companyId, long classNameId,
405 long classPK, boolean primary)
406 throws com.liferay.portal.kernel.exception.SystemException {
407 getPersistence()
408 .removeByC_C_C_P(companyId, classNameId, classPK, primary);
409 }
410
411 public static void removeAll()
412 throws com.liferay.portal.kernel.exception.SystemException {
413 getPersistence().removeAll();
414 }
415
416 public static int countByCompanyId(long companyId)
417 throws com.liferay.portal.kernel.exception.SystemException {
418 return getPersistence().countByCompanyId(companyId);
419 }
420
421 public static int countByUserId(long userId)
422 throws com.liferay.portal.kernel.exception.SystemException {
423 return getPersistence().countByUserId(userId);
424 }
425
426 public static int countByC_C(long companyId, long classNameId)
427 throws com.liferay.portal.kernel.exception.SystemException {
428 return getPersistence().countByC_C(companyId, classNameId);
429 }
430
431 public static int countByC_C_C(long companyId, long classNameId,
432 long classPK)
433 throws com.liferay.portal.kernel.exception.SystemException {
434 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
435 }
436
437 public static int countByC_C_C_P(long companyId, long classNameId,
438 long classPK, boolean primary)
439 throws com.liferay.portal.kernel.exception.SystemException {
440 return getPersistence()
441 .countByC_C_C_P(companyId, classNameId, classPK, primary);
442 }
443
444 public static int countAll()
445 throws com.liferay.portal.kernel.exception.SystemException {
446 return getPersistence().countAll();
447 }
448
449 public static WebsitePersistence getPersistence() {
450 if (_persistence == null) {
451 _persistence = (WebsitePersistence)PortalBeanLocatorUtil.locate(WebsitePersistence.class.getName());
452 }
453
454 return _persistence;
455 }
456
457 public void setPersistence(WebsitePersistence persistence) {
458 _persistence = persistence;
459 }
460
461 private static WebsitePersistence _persistence;
462 }