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