001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.Website;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class WebsiteUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(Website website) {
044 getPersistence().clearCache(website);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<Website> findWithDynamicQuery(DynamicQuery dynamicQuery)
059 throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<Website> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<Website> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static Website remove(Website website) throws SystemException {
087 return getPersistence().remove(website);
088 }
089
090
093 public static Website update(Website website, boolean merge)
094 throws SystemException {
095 return getPersistence().update(website, merge);
096 }
097
098
101 public static Website update(Website website, boolean merge,
102 ServiceContext serviceContext) throws SystemException {
103 return getPersistence().update(website, merge, serviceContext);
104 }
105
106 public static void cacheResult(com.liferay.portal.model.Website website) {
107 getPersistence().cacheResult(website);
108 }
109
110 public static void cacheResult(
111 java.util.List<com.liferay.portal.model.Website> websites) {
112 getPersistence().cacheResult(websites);
113 }
114
115 public static com.liferay.portal.model.Website create(long websiteId) {
116 return getPersistence().create(websiteId);
117 }
118
119 public static com.liferay.portal.model.Website remove(long websiteId)
120 throws com.liferay.portal.NoSuchWebsiteException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getPersistence().remove(websiteId);
123 }
124
125 public static com.liferay.portal.model.Website updateImpl(
126 com.liferay.portal.model.Website website, boolean merge)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().updateImpl(website, merge);
129 }
130
131 public static com.liferay.portal.model.Website findByPrimaryKey(
132 long websiteId)
133 throws com.liferay.portal.NoSuchWebsiteException,
134 com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findByPrimaryKey(websiteId);
136 }
137
138 public static com.liferay.portal.model.Website fetchByPrimaryKey(
139 long websiteId)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getPersistence().fetchByPrimaryKey(websiteId);
142 }
143
144 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
145 long companyId)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getPersistence().findByCompanyId(companyId);
148 }
149
150 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
151 long companyId, int start, int end)
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence().findByCompanyId(companyId, start, end);
154 }
155
156 public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
157 long companyId, int start, int end,
158 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159 throws com.liferay.portal.kernel.exception.SystemException {
160 return getPersistence()
161 .findByCompanyId(companyId, start, end, orderByComparator);
162 }
163
164 public static com.liferay.portal.model.Website findByCompanyId_First(
165 long companyId,
166 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167 throws com.liferay.portal.NoSuchWebsiteException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getPersistence()
170 .findByCompanyId_First(companyId, orderByComparator);
171 }
172
173 public static com.liferay.portal.model.Website findByCompanyId_Last(
174 long companyId,
175 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176 throws com.liferay.portal.NoSuchWebsiteException,
177 com.liferay.portal.kernel.exception.SystemException {
178 return getPersistence()
179 .findByCompanyId_Last(companyId, orderByComparator);
180 }
181
182 public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext(
183 long websiteId, long companyId,
184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185 throws com.liferay.portal.NoSuchWebsiteException,
186 com.liferay.portal.kernel.exception.SystemException {
187 return getPersistence()
188 .findByCompanyId_PrevAndNext(websiteId, companyId,
189 orderByComparator);
190 }
191
192 public static java.util.List<com.liferay.portal.model.Website> findByUserId(
193 long userId) throws com.liferay.portal.kernel.exception.SystemException {
194 return getPersistence().findByUserId(userId);
195 }
196
197 public static java.util.List<com.liferay.portal.model.Website> findByUserId(
198 long userId, int start, int end)
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getPersistence().findByUserId(userId, start, end);
201 }
202
203 public static java.util.List<com.liferay.portal.model.Website> findByUserId(
204 long userId, int start, int end,
205 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206 throws com.liferay.portal.kernel.exception.SystemException {
207 return getPersistence()
208 .findByUserId(userId, start, end, orderByComparator);
209 }
210
211 public static com.liferay.portal.model.Website findByUserId_First(
212 long userId,
213 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214 throws com.liferay.portal.NoSuchWebsiteException,
215 com.liferay.portal.kernel.exception.SystemException {
216 return getPersistence().findByUserId_First(userId, orderByComparator);
217 }
218
219 public static com.liferay.portal.model.Website findByUserId_Last(
220 long userId,
221 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222 throws com.liferay.portal.NoSuchWebsiteException,
223 com.liferay.portal.kernel.exception.SystemException {
224 return getPersistence().findByUserId_Last(userId, orderByComparator);
225 }
226
227 public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext(
228 long websiteId, long userId,
229 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230 throws com.liferay.portal.NoSuchWebsiteException,
231 com.liferay.portal.kernel.exception.SystemException {
232 return getPersistence()
233 .findByUserId_PrevAndNext(websiteId, userId,
234 orderByComparator);
235 }
236
237 public static java.util.List<com.liferay.portal.model.Website> findByC_C(
238 long companyId, long classNameId)
239 throws com.liferay.portal.kernel.exception.SystemException {
240 return getPersistence().findByC_C(companyId, classNameId);
241 }
242
243 public static java.util.List<com.liferay.portal.model.Website> findByC_C(
244 long companyId, long classNameId, int start, int end)
245 throws com.liferay.portal.kernel.exception.SystemException {
246 return getPersistence().findByC_C(companyId, classNameId, start, end);
247 }
248
249 public static java.util.List<com.liferay.portal.model.Website> findByC_C(
250 long companyId, long classNameId, int start, int end,
251 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 return getPersistence()
254 .findByC_C(companyId, classNameId, start, end,
255 orderByComparator);
256 }
257
258 public static com.liferay.portal.model.Website findByC_C_First(
259 long companyId, long classNameId,
260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261 throws com.liferay.portal.NoSuchWebsiteException,
262 com.liferay.portal.kernel.exception.SystemException {
263 return getPersistence()
264 .findByC_C_First(companyId, classNameId, orderByComparator);
265 }
266
267 public static com.liferay.portal.model.Website findByC_C_Last(
268 long companyId, long classNameId,
269 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270 throws com.liferay.portal.NoSuchWebsiteException,
271 com.liferay.portal.kernel.exception.SystemException {
272 return getPersistence()
273 .findByC_C_Last(companyId, classNameId, orderByComparator);
274 }
275
276 public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext(
277 long websiteId, long companyId, long classNameId,
278 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279 throws com.liferay.portal.NoSuchWebsiteException,
280 com.liferay.portal.kernel.exception.SystemException {
281 return getPersistence()
282 .findByC_C_PrevAndNext(websiteId, companyId, classNameId,
283 orderByComparator);
284 }
285
286 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
287 long companyId, long classNameId, long classPK)
288 throws com.liferay.portal.kernel.exception.SystemException {
289 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
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 throws com.liferay.portal.kernel.exception.SystemException {
295 return getPersistence()
296 .findByC_C_C(companyId, classNameId, classPK, start, end);
297 }
298
299 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
300 long companyId, long classNameId, long classPK, int start, int end,
301 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302 throws com.liferay.portal.kernel.exception.SystemException {
303 return getPersistence()
304 .findByC_C_C(companyId, classNameId, classPK, start, end,
305 orderByComparator);
306 }
307
308 public static com.liferay.portal.model.Website findByC_C_C_First(
309 long companyId, long classNameId, long classPK,
310 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311 throws com.liferay.portal.NoSuchWebsiteException,
312 com.liferay.portal.kernel.exception.SystemException {
313 return getPersistence()
314 .findByC_C_C_First(companyId, classNameId, classPK,
315 orderByComparator);
316 }
317
318 public static com.liferay.portal.model.Website findByC_C_C_Last(
319 long companyId, long classNameId, long classPK,
320 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
321 throws com.liferay.portal.NoSuchWebsiteException,
322 com.liferay.portal.kernel.exception.SystemException {
323 return getPersistence()
324 .findByC_C_C_Last(companyId, classNameId, classPK,
325 orderByComparator);
326 }
327
328 public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext(
329 long websiteId, long companyId, long classNameId, long classPK,
330 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331 throws com.liferay.portal.NoSuchWebsiteException,
332 com.liferay.portal.kernel.exception.SystemException {
333 return getPersistence()
334 .findByC_C_C_PrevAndNext(websiteId, companyId, classNameId,
335 classPK, orderByComparator);
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 throws com.liferay.portal.kernel.exception.SystemException {
341 return getPersistence()
342 .findByC_C_C_P(companyId, classNameId, classPK, primary);
343 }
344
345 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
346 long companyId, long classNameId, long classPK, boolean primary,
347 int start, int end)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 return getPersistence()
350 .findByC_C_C_P(companyId, classNameId, classPK, primary,
351 start, end);
352 }
353
354 public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
355 long companyId, long classNameId, long classPK, boolean primary,
356 int start, int end,
357 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
358 throws com.liferay.portal.kernel.exception.SystemException {
359 return getPersistence()
360 .findByC_C_C_P(companyId, classNameId, classPK, primary,
361 start, end, orderByComparator);
362 }
363
364 public static com.liferay.portal.model.Website findByC_C_C_P_First(
365 long companyId, long classNameId, long classPK, boolean primary,
366 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
367 throws com.liferay.portal.NoSuchWebsiteException,
368 com.liferay.portal.kernel.exception.SystemException {
369 return getPersistence()
370 .findByC_C_C_P_First(companyId, classNameId, classPK,
371 primary, orderByComparator);
372 }
373
374 public static com.liferay.portal.model.Website findByC_C_C_P_Last(
375 long companyId, long classNameId, long classPK, boolean primary,
376 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
377 throws com.liferay.portal.NoSuchWebsiteException,
378 com.liferay.portal.kernel.exception.SystemException {
379 return getPersistence()
380 .findByC_C_C_P_Last(companyId, classNameId, classPK,
381 primary, orderByComparator);
382 }
383
384 public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext(
385 long websiteId, long companyId, long classNameId, long classPK,
386 boolean primary,
387 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388 throws com.liferay.portal.NoSuchWebsiteException,
389 com.liferay.portal.kernel.exception.SystemException {
390 return getPersistence()
391 .findByC_C_C_P_PrevAndNext(websiteId, companyId,
392 classNameId, classPK, primary, orderByComparator);
393 }
394
395 public static java.util.List<com.liferay.portal.model.Website> findAll()
396 throws com.liferay.portal.kernel.exception.SystemException {
397 return getPersistence().findAll();
398 }
399
400 public static java.util.List<com.liferay.portal.model.Website> findAll(
401 int start, int end)
402 throws com.liferay.portal.kernel.exception.SystemException {
403 return getPersistence().findAll(start, end);
404 }
405
406 public static java.util.List<com.liferay.portal.model.Website> findAll(
407 int start, int end,
408 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return getPersistence().findAll(start, end, orderByComparator);
411 }
412
413 public static void removeByCompanyId(long companyId)
414 throws com.liferay.portal.kernel.exception.SystemException {
415 getPersistence().removeByCompanyId(companyId);
416 }
417
418 public static void removeByUserId(long userId)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 getPersistence().removeByUserId(userId);
421 }
422
423 public static void removeByC_C(long companyId, long classNameId)
424 throws com.liferay.portal.kernel.exception.SystemException {
425 getPersistence().removeByC_C(companyId, classNameId);
426 }
427
428 public static void removeByC_C_C(long companyId, long classNameId,
429 long classPK)
430 throws com.liferay.portal.kernel.exception.SystemException {
431 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
432 }
433
434 public static void removeByC_C_C_P(long companyId, long classNameId,
435 long classPK, boolean primary)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 getPersistence()
438 .removeByC_C_C_P(companyId, classNameId, classPK, primary);
439 }
440
441 public static void removeAll()
442 throws com.liferay.portal.kernel.exception.SystemException {
443 getPersistence().removeAll();
444 }
445
446 public static int countByCompanyId(long companyId)
447 throws com.liferay.portal.kernel.exception.SystemException {
448 return getPersistence().countByCompanyId(companyId);
449 }
450
451 public static int countByUserId(long userId)
452 throws com.liferay.portal.kernel.exception.SystemException {
453 return getPersistence().countByUserId(userId);
454 }
455
456 public static int countByC_C(long companyId, long classNameId)
457 throws com.liferay.portal.kernel.exception.SystemException {
458 return getPersistence().countByC_C(companyId, classNameId);
459 }
460
461 public static int countByC_C_C(long companyId, long classNameId,
462 long classPK)
463 throws com.liferay.portal.kernel.exception.SystemException {
464 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
465 }
466
467 public static int countByC_C_C_P(long companyId, long classNameId,
468 long classPK, boolean primary)
469 throws com.liferay.portal.kernel.exception.SystemException {
470 return getPersistence()
471 .countByC_C_C_P(companyId, classNameId, classPK, primary);
472 }
473
474 public static int countAll()
475 throws com.liferay.portal.kernel.exception.SystemException {
476 return getPersistence().countAll();
477 }
478
479 public static WebsitePersistence getPersistence() {
480 if (_persistence == null) {
481 _persistence = (WebsitePersistence)PortalBeanLocatorUtil.locate(WebsitePersistence.class.getName());
482 }
483
484 return _persistence;
485 }
486
487 public void setPersistence(WebsitePersistence persistence) {
488 _persistence = persistence;
489 }
490
491 private static WebsitePersistence _persistence;
492 }