1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.NoSuchImageException;
18 import com.liferay.portal.NoSuchModelException;
19 import com.liferay.portal.SystemException;
20 import com.liferay.portal.kernel.annotation.BeanReference;
21 import com.liferay.portal.kernel.cache.CacheRegistry;
22 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
23 import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
24 import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
25 import com.liferay.portal.kernel.dao.orm.FinderPath;
26 import com.liferay.portal.kernel.dao.orm.Query;
27 import com.liferay.portal.kernel.dao.orm.QueryPos;
28 import com.liferay.portal.kernel.dao.orm.QueryUtil;
29 import com.liferay.portal.kernel.dao.orm.Session;
30 import com.liferay.portal.kernel.log.Log;
31 import com.liferay.portal.kernel.log.LogFactoryUtil;
32 import com.liferay.portal.kernel.util.GetterUtil;
33 import com.liferay.portal.kernel.util.OrderByComparator;
34 import com.liferay.portal.kernel.util.StringBundler;
35 import com.liferay.portal.kernel.util.StringPool;
36 import com.liferay.portal.kernel.util.StringUtil;
37 import com.liferay.portal.model.Image;
38 import com.liferay.portal.model.ModelListener;
39 import com.liferay.portal.model.impl.ImageImpl;
40 import com.liferay.portal.model.impl.ImageModelImpl;
41 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
42
43 import java.io.Serializable;
44
45 import java.util.ArrayList;
46 import java.util.Collections;
47 import java.util.List;
48
49
62 public class ImagePersistenceImpl extends BasePersistenceImpl<Image>
63 implements ImagePersistence {
64 public static final String FINDER_CLASS_NAME_ENTITY = ImageImpl.class.getName();
65 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
66 ".List";
67 public static final FinderPath FINDER_PATH_FIND_BY_SIZE = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
68 ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
69 "findBySize", new String[] { Integer.class.getName() });
70 public static final FinderPath FINDER_PATH_FIND_BY_OBC_SIZE = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
71 ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
72 "findBySize",
73 new String[] {
74 Integer.class.getName(),
75
76 "java.lang.Integer", "java.lang.Integer",
77 "com.liferay.portal.kernel.util.OrderByComparator"
78 });
79 public static final FinderPath FINDER_PATH_COUNT_BY_SIZE = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
80 ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
81 "countBySize", new String[] { Integer.class.getName() });
82 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
83 ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
84 "findAll", new String[0]);
85 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
86 ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
87 "countAll", new String[0]);
88
89 public void cacheResult(Image image) {
90 EntityCacheUtil.putResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
91 ImageImpl.class, image.getPrimaryKey(), image);
92 }
93
94 public void cacheResult(List<Image> images) {
95 for (Image image : images) {
96 if (EntityCacheUtil.getResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
97 ImageImpl.class, image.getPrimaryKey(), this) == null) {
98 cacheResult(image);
99 }
100 }
101 }
102
103 public void clearCache() {
104 CacheRegistry.clear(ImageImpl.class.getName());
105 EntityCacheUtil.clearCache(ImageImpl.class.getName());
106 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
107 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
108 }
109
110 public Image create(long imageId) {
111 Image image = new ImageImpl();
112
113 image.setNew(true);
114 image.setPrimaryKey(imageId);
115
116 return image;
117 }
118
119 public Image remove(Serializable primaryKey)
120 throws NoSuchModelException, SystemException {
121 return remove(((Long)primaryKey).longValue());
122 }
123
124 public Image remove(long imageId)
125 throws NoSuchImageException, SystemException {
126 Session session = null;
127
128 try {
129 session = openSession();
130
131 Image image = (Image)session.get(ImageImpl.class, new Long(imageId));
132
133 if (image == null) {
134 if (_log.isWarnEnabled()) {
135 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + imageId);
136 }
137
138 throw new NoSuchImageException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
139 imageId);
140 }
141
142 return remove(image);
143 }
144 catch (NoSuchImageException nsee) {
145 throw nsee;
146 }
147 catch (Exception e) {
148 throw processException(e);
149 }
150 finally {
151 closeSession(session);
152 }
153 }
154
155 public Image remove(Image image) throws SystemException {
156 for (ModelListener<Image> listener : listeners) {
157 listener.onBeforeRemove(image);
158 }
159
160 image = removeImpl(image);
161
162 for (ModelListener<Image> listener : listeners) {
163 listener.onAfterRemove(image);
164 }
165
166 return image;
167 }
168
169 protected Image removeImpl(Image image) throws SystemException {
170 image = toUnwrappedModel(image);
171
172 Session session = null;
173
174 try {
175 session = openSession();
176
177 if (image.isCachedModel() || BatchSessionUtil.isEnabled()) {
178 Object staleObject = session.get(ImageImpl.class,
179 image.getPrimaryKeyObj());
180
181 if (staleObject != null) {
182 session.evict(staleObject);
183 }
184 }
185
186 session.delete(image);
187
188 session.flush();
189 }
190 catch (Exception e) {
191 throw processException(e);
192 }
193 finally {
194 closeSession(session);
195 }
196
197 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
198
199 EntityCacheUtil.removeResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
200 ImageImpl.class, image.getPrimaryKey());
201
202 return image;
203 }
204
205
208 public Image update(Image image) throws SystemException {
209 if (_log.isWarnEnabled()) {
210 _log.warn(
211 "Using the deprecated update(Image image) method. Use update(Image image, boolean merge) instead.");
212 }
213
214 return update(image, false);
215 }
216
217 public Image updateImpl(com.liferay.portal.model.Image image, boolean merge)
218 throws SystemException {
219 image = toUnwrappedModel(image);
220
221 Session session = null;
222
223 try {
224 session = openSession();
225
226 BatchSessionUtil.update(session, image, merge);
227
228 image.setNew(false);
229 }
230 catch (Exception e) {
231 throw processException(e);
232 }
233 finally {
234 closeSession(session);
235 }
236
237 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
238
239 EntityCacheUtil.putResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
240 ImageImpl.class, image.getPrimaryKey(), image);
241
242 return image;
243 }
244
245 protected Image toUnwrappedModel(Image image) {
246 if (image instanceof ImageImpl) {
247 return image;
248 }
249
250 ImageImpl imageImpl = new ImageImpl();
251
252 imageImpl.setNew(image.isNew());
253 imageImpl.setPrimaryKey(image.getPrimaryKey());
254
255 imageImpl.setImageId(image.getImageId());
256 imageImpl.setModifiedDate(image.getModifiedDate());
257 imageImpl.setText(image.getText());
258 imageImpl.setType(image.getType());
259 imageImpl.setHeight(image.getHeight());
260 imageImpl.setWidth(image.getWidth());
261 imageImpl.setSize(image.getSize());
262
263 return imageImpl;
264 }
265
266 public Image findByPrimaryKey(Serializable primaryKey)
267 throws NoSuchModelException, SystemException {
268 return findByPrimaryKey(((Long)primaryKey).longValue());
269 }
270
271 public Image findByPrimaryKey(long imageId)
272 throws NoSuchImageException, SystemException {
273 Image image = fetchByPrimaryKey(imageId);
274
275 if (image == null) {
276 if (_log.isWarnEnabled()) {
277 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + imageId);
278 }
279
280 throw new NoSuchImageException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
281 imageId);
282 }
283
284 return image;
285 }
286
287 public Image fetchByPrimaryKey(Serializable primaryKey)
288 throws SystemException {
289 return fetchByPrimaryKey(((Long)primaryKey).longValue());
290 }
291
292 public Image fetchByPrimaryKey(long imageId) throws SystemException {
293 Image image = (Image)EntityCacheUtil.getResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
294 ImageImpl.class, imageId, this);
295
296 if (image == null) {
297 Session session = null;
298
299 try {
300 session = openSession();
301
302 image = (Image)session.get(ImageImpl.class, new Long(imageId));
303 }
304 catch (Exception e) {
305 throw processException(e);
306 }
307 finally {
308 if (image != null) {
309 cacheResult(image);
310 }
311
312 closeSession(session);
313 }
314 }
315
316 return image;
317 }
318
319 public List<Image> findBySize(int size) throws SystemException {
320 Object[] finderArgs = new Object[] { new Integer(size) };
321
322 List<Image> list = (List<Image>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_SIZE,
323 finderArgs, this);
324
325 if (list == null) {
326 Session session = null;
327
328 try {
329 session = openSession();
330
331 StringBundler query = new StringBundler(3);
332
333 query.append(_SQL_SELECT_IMAGE_WHERE);
334
335 query.append(_FINDER_COLUMN_SIZE_SIZE_2);
336
337 query.append(ImageModelImpl.ORDER_BY_JPQL);
338
339 String sql = query.toString();
340
341 Query q = session.createQuery(sql);
342
343 QueryPos qPos = QueryPos.getInstance(q);
344
345 qPos.add(size);
346
347 list = q.list();
348 }
349 catch (Exception e) {
350 throw processException(e);
351 }
352 finally {
353 if (list == null) {
354 list = new ArrayList<Image>();
355 }
356
357 cacheResult(list);
358
359 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_SIZE, finderArgs,
360 list);
361
362 closeSession(session);
363 }
364 }
365
366 return list;
367 }
368
369 public List<Image> findBySize(int size, int start, int end)
370 throws SystemException {
371 return findBySize(size, start, end, null);
372 }
373
374 public List<Image> findBySize(int size, int start, int end,
375 OrderByComparator obc) throws SystemException {
376 Object[] finderArgs = new Object[] {
377 new Integer(size),
378
379 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
380 };
381
382 List<Image> list = (List<Image>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_SIZE,
383 finderArgs, this);
384
385 if (list == null) {
386 Session session = null;
387
388 try {
389 session = openSession();
390
391 StringBundler query = null;
392
393 if (obc != null) {
394 query = new StringBundler(3 +
395 (obc.getOrderByFields().length * 3));
396 }
397 else {
398 query = new StringBundler(3);
399 }
400
401 query.append(_SQL_SELECT_IMAGE_WHERE);
402
403 query.append(_FINDER_COLUMN_SIZE_SIZE_2);
404
405 if (obc != null) {
406 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
407 }
408
409 else {
410 query.append(ImageModelImpl.ORDER_BY_JPQL);
411 }
412
413 String sql = query.toString();
414
415 Query q = session.createQuery(sql);
416
417 QueryPos qPos = QueryPos.getInstance(q);
418
419 qPos.add(size);
420
421 list = (List<Image>)QueryUtil.list(q, getDialect(), start, end);
422 }
423 catch (Exception e) {
424 throw processException(e);
425 }
426 finally {
427 if (list == null) {
428 list = new ArrayList<Image>();
429 }
430
431 cacheResult(list);
432
433 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_SIZE,
434 finderArgs, list);
435
436 closeSession(session);
437 }
438 }
439
440 return list;
441 }
442
443 public Image findBySize_First(int size, OrderByComparator obc)
444 throws NoSuchImageException, SystemException {
445 List<Image> list = findBySize(size, 0, 1, obc);
446
447 if (list.isEmpty()) {
448 StringBundler msg = new StringBundler(4);
449
450 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
451
452 msg.append("size=");
453 msg.append(size);
454
455 msg.append(StringPool.CLOSE_CURLY_BRACE);
456
457 throw new NoSuchImageException(msg.toString());
458 }
459 else {
460 return list.get(0);
461 }
462 }
463
464 public Image findBySize_Last(int size, OrderByComparator obc)
465 throws NoSuchImageException, SystemException {
466 int count = countBySize(size);
467
468 List<Image> list = findBySize(size, count - 1, count, obc);
469
470 if (list.isEmpty()) {
471 StringBundler msg = new StringBundler(4);
472
473 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
474
475 msg.append("size=");
476 msg.append(size);
477
478 msg.append(StringPool.CLOSE_CURLY_BRACE);
479
480 throw new NoSuchImageException(msg.toString());
481 }
482 else {
483 return list.get(0);
484 }
485 }
486
487 public Image[] findBySize_PrevAndNext(long imageId, int size,
488 OrderByComparator obc) throws NoSuchImageException, SystemException {
489 Image image = findByPrimaryKey(imageId);
490
491 int count = countBySize(size);
492
493 Session session = null;
494
495 try {
496 session = openSession();
497
498 StringBundler query = null;
499
500 if (obc != null) {
501 query = new StringBundler(3 +
502 (obc.getOrderByFields().length * 3));
503 }
504 else {
505 query = new StringBundler(3);
506 }
507
508 query.append(_SQL_SELECT_IMAGE_WHERE);
509
510 query.append(_FINDER_COLUMN_SIZE_SIZE_2);
511
512 if (obc != null) {
513 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
514 }
515
516 else {
517 query.append(ImageModelImpl.ORDER_BY_JPQL);
518 }
519
520 String sql = query.toString();
521
522 Query q = session.createQuery(sql);
523
524 QueryPos qPos = QueryPos.getInstance(q);
525
526 qPos.add(size);
527
528 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, image);
529
530 Image[] array = new ImageImpl[3];
531
532 array[0] = (Image)objArray[0];
533 array[1] = (Image)objArray[1];
534 array[2] = (Image)objArray[2];
535
536 return array;
537 }
538 catch (Exception e) {
539 throw processException(e);
540 }
541 finally {
542 closeSession(session);
543 }
544 }
545
546 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
547 throws SystemException {
548 Session session = null;
549
550 try {
551 session = openSession();
552
553 dynamicQuery.compile(session);
554
555 return dynamicQuery.list();
556 }
557 catch (Exception e) {
558 throw processException(e);
559 }
560 finally {
561 closeSession(session);
562 }
563 }
564
565 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
566 int start, int end) throws SystemException {
567 Session session = null;
568
569 try {
570 session = openSession();
571
572 dynamicQuery.setLimit(start, end);
573
574 dynamicQuery.compile(session);
575
576 return dynamicQuery.list();
577 }
578 catch (Exception e) {
579 throw processException(e);
580 }
581 finally {
582 closeSession(session);
583 }
584 }
585
586 public List<Image> findAll() throws SystemException {
587 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
588 }
589
590 public List<Image> findAll(int start, int end) throws SystemException {
591 return findAll(start, end, null);
592 }
593
594 public List<Image> findAll(int start, int end, OrderByComparator obc)
595 throws SystemException {
596 Object[] finderArgs = new Object[] {
597 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
598 };
599
600 List<Image> list = (List<Image>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
601 finderArgs, this);
602
603 if (list == null) {
604 Session session = null;
605
606 try {
607 session = openSession();
608
609 StringBundler query = null;
610 String sql = null;
611
612 if (obc != null) {
613 query = new StringBundler(2 +
614 (obc.getOrderByFields().length * 3));
615
616 query.append(_SQL_SELECT_IMAGE);
617
618 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
619
620 sql = query.toString();
621 }
622
623 else {
624 sql = _SQL_SELECT_IMAGE.concat(ImageModelImpl.ORDER_BY_JPQL);
625 }
626
627 Query q = session.createQuery(sql);
628
629 if (obc == null) {
630 list = (List<Image>)QueryUtil.list(q, getDialect(), start,
631 end, false);
632
633 Collections.sort(list);
634 }
635 else {
636 list = (List<Image>)QueryUtil.list(q, getDialect(), start,
637 end);
638 }
639 }
640 catch (Exception e) {
641 throw processException(e);
642 }
643 finally {
644 if (list == null) {
645 list = new ArrayList<Image>();
646 }
647
648 cacheResult(list);
649
650 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
651
652 closeSession(session);
653 }
654 }
655
656 return list;
657 }
658
659 public void removeBySize(int size) throws SystemException {
660 for (Image image : findBySize(size)) {
661 remove(image);
662 }
663 }
664
665 public void removeAll() throws SystemException {
666 for (Image image : findAll()) {
667 remove(image);
668 }
669 }
670
671 public int countBySize(int size) throws SystemException {
672 Object[] finderArgs = new Object[] { new Integer(size) };
673
674 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_SIZE,
675 finderArgs, this);
676
677 if (count == null) {
678 Session session = null;
679
680 try {
681 session = openSession();
682
683 StringBundler query = new StringBundler(2);
684
685 query.append(_SQL_COUNT_IMAGE_WHERE);
686
687 query.append(_FINDER_COLUMN_SIZE_SIZE_2);
688
689 String sql = query.toString();
690
691 Query q = session.createQuery(sql);
692
693 QueryPos qPos = QueryPos.getInstance(q);
694
695 qPos.add(size);
696
697 count = (Long)q.uniqueResult();
698 }
699 catch (Exception e) {
700 throw processException(e);
701 }
702 finally {
703 if (count == null) {
704 count = Long.valueOf(0);
705 }
706
707 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_SIZE,
708 finderArgs, count);
709
710 closeSession(session);
711 }
712 }
713
714 return count.intValue();
715 }
716
717 public int countAll() throws SystemException {
718 Object[] finderArgs = new Object[0];
719
720 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
721 finderArgs, this);
722
723 if (count == null) {
724 Session session = null;
725
726 try {
727 session = openSession();
728
729 Query q = session.createQuery(_SQL_COUNT_IMAGE);
730
731 count = (Long)q.uniqueResult();
732 }
733 catch (Exception e) {
734 throw processException(e);
735 }
736 finally {
737 if (count == null) {
738 count = Long.valueOf(0);
739 }
740
741 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
742 count);
743
744 closeSession(session);
745 }
746 }
747
748 return count.intValue();
749 }
750
751 public void afterPropertiesSet() {
752 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
753 com.liferay.portal.util.PropsUtil.get(
754 "value.object.listener.com.liferay.portal.model.Image")));
755
756 if (listenerClassNames.length > 0) {
757 try {
758 List<ModelListener<Image>> listenersList = new ArrayList<ModelListener<Image>>();
759
760 for (String listenerClassName : listenerClassNames) {
761 listenersList.add((ModelListener<Image>)Class.forName(
762 listenerClassName).newInstance());
763 }
764
765 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
766 }
767 catch (Exception e) {
768 _log.error(e);
769 }
770 }
771 }
772
773 @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence")
774 protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
775 @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence")
776 protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
777 @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence")
778 protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
779 @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence")
780 protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
781 @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence")
782 protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
783 @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence")
784 protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
785 @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence")
786 protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
787 @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence")
788 protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
789 @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence")
790 protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
791 @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence")
792 protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
793 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence")
794 protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
795 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence")
796 protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
797 @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence")
798 protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
799 @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence")
800 protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
801 @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence")
802 protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
803 @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence")
804 protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
805 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence")
806 protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
807 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence")
808 protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
809 @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence")
810 protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
811 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence")
812 protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
813 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence")
814 protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
815 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence")
816 protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
817 @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence")
818 protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
819 @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence")
820 protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
821 @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence")
822 protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
823 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence")
824 protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
825 @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence")
826 protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
827 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence")
828 protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
829 @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence")
830 protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
831 @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence")
832 protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
833 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence")
834 protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
835 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence")
836 protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
837 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence")
838 protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
839 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence")
840 protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
841 @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence")
842 protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
843 @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence")
844 protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
845 @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence")
846 protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
847 @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence")
848 protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
849 @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence")
850 protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
851 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence")
852 protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
853 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence")
854 protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
855 @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence")
856 protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
857 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence")
858 protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
859 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence")
860 protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
861 @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence")
862 protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
863 @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence")
864 protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
865 private static final String _SQL_SELECT_IMAGE = "SELECT image FROM Image image";
866 private static final String _SQL_SELECT_IMAGE_WHERE = "SELECT image FROM Image image WHERE ";
867 private static final String _SQL_COUNT_IMAGE = "SELECT COUNT(image) FROM Image image";
868 private static final String _SQL_COUNT_IMAGE_WHERE = "SELECT COUNT(image) FROM Image image WHERE ";
869 private static final String _FINDER_COLUMN_SIZE_SIZE_2 = "image.size < ?";
870 private static final String _ORDER_BY_ENTITY_ALIAS = "image.";
871 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Image exists with the primary key ";
872 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Image exists with the key {";
873 private static Log _log = LogFactoryUtil.getLog(ImagePersistenceImpl.class);
874 }