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