1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.NoSuchImageException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.BeanReference;
28  import com.liferay.portal.kernel.cache.CacheRegistry;
29  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
30  import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
31  import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
32  import com.liferay.portal.kernel.dao.orm.FinderPath;
33  import com.liferay.portal.kernel.dao.orm.Query;
34  import com.liferay.portal.kernel.dao.orm.QueryPos;
35  import com.liferay.portal.kernel.dao.orm.QueryUtil;
36  import com.liferay.portal.kernel.dao.orm.Session;
37  import com.liferay.portal.kernel.log.Log;
38  import com.liferay.portal.kernel.log.LogFactoryUtil;
39  import com.liferay.portal.kernel.util.GetterUtil;
40  import com.liferay.portal.kernel.util.OrderByComparator;
41  import com.liferay.portal.kernel.util.StringPool;
42  import com.liferay.portal.kernel.util.StringUtil;
43  import com.liferay.portal.model.Image;
44  import com.liferay.portal.model.ModelListener;
45  import com.liferay.portal.model.impl.ImageImpl;
46  import com.liferay.portal.model.impl.ImageModelImpl;
47  import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
48  
49  import java.util.ArrayList;
50  import java.util.Collections;
51  import java.util.List;
52  
53  /**
54   * <a href="ImagePersistenceImpl.java.html"><b><i>View Source</i></b></a>
55   *
56   * <p>
57   * ServiceBuilder generated this class. Modifications in this class will be
58   * overwritten the next time is generated.
59   * </p>
60   *
61   * @author    Brian Wing Shun Chan
62   * @see       ImagePersistence
63   * @see       ImageUtil
64   * @generated
65   */
66  public class ImagePersistenceImpl extends BasePersistenceImpl
67      implements ImagePersistence {
68      public static final String FINDER_CLASS_NAME_ENTITY = ImageImpl.class.getName();
69      public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
70          ".List";
71      public static final FinderPath FINDER_PATH_FIND_BY_SIZE = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
72              ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
73              "findBySize", new String[] { Integer.class.getName() });
74      public static final FinderPath FINDER_PATH_FIND_BY_OBC_SIZE = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
75              ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
76              "findBySize",
77              new String[] {
78                  Integer.class.getName(),
79                  
80              "java.lang.Integer", "java.lang.Integer",
81                  "com.liferay.portal.kernel.util.OrderByComparator"
82              });
83      public static final FinderPath FINDER_PATH_COUNT_BY_SIZE = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
84              ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
85              "countBySize", new String[] { Integer.class.getName() });
86      public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
87              ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
88              "findAll", new String[0]);
89      public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ImageModelImpl.ENTITY_CACHE_ENABLED,
90              ImageModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
91              "countAll", new String[0]);
92  
93      public void cacheResult(Image image) {
94          EntityCacheUtil.putResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
95              ImageImpl.class, image.getPrimaryKey(), image);
96      }
97  
98      public void cacheResult(List<Image> images) {
99          for (Image image : images) {
100             if (EntityCacheUtil.getResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
101                         ImageImpl.class, image.getPrimaryKey(), this) == null) {
102                 cacheResult(image);
103             }
104         }
105     }
106 
107     public void clearCache() {
108         CacheRegistry.clear(ImageImpl.class.getName());
109         EntityCacheUtil.clearCache(ImageImpl.class.getName());
110         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
111         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
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(long imageId)
124         throws NoSuchImageException, SystemException {
125         Session session = null;
126 
127         try {
128             session = openSession();
129 
130             Image image = (Image)session.get(ImageImpl.class, new Long(imageId));
131 
132             if (image == null) {
133                 if (_log.isWarnEnabled()) {
134                     _log.warn("No Image exists with the primary key " +
135                         imageId);
136                 }
137 
138                 throw new NoSuchImageException(
139                     "No Image exists with the primary key " + 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         Session session = null;
171 
172         try {
173             session = openSession();
174 
175             if (image.isCachedModel() || BatchSessionUtil.isEnabled()) {
176                 Object staleObject = session.get(ImageImpl.class,
177                         image.getPrimaryKeyObj());
178 
179                 if (staleObject != null) {
180                     session.evict(staleObject);
181                 }
182             }
183 
184             session.delete(image);
185 
186             session.flush();
187         }
188         catch (Exception e) {
189             throw processException(e);
190         }
191         finally {
192             closeSession(session);
193         }
194 
195         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
196 
197         EntityCacheUtil.removeResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
198             ImageImpl.class, image.getPrimaryKey());
199 
200         return image;
201     }
202 
203     /**
204      * @deprecated Use {@link #update(Image, boolean merge)}.
205      */
206     public Image update(Image image) throws SystemException {
207         if (_log.isWarnEnabled()) {
208             _log.warn(
209                 "Using the deprecated update(Image image) method. Use update(Image image, boolean merge) instead.");
210         }
211 
212         return update(image, false);
213     }
214 
215     /**
216      * Add, update, or merge, the entity. This method also calls the model
217      * listeners to trigger the proper events associated with adding, deleting,
218      * or updating an entity.
219      *
220      * @param  image the entity to add, update, or merge
221      * @param  merge boolean value for whether to merge the entity. The default
222      *         value is false. Setting merge to true is more expensive and
223      *         should only be true when image is transient. See
224      *         LEP-5473 for a detailed discussion of this method.
225      * @return the entity that was added, updated, or merged
226      */
227     public Image update(Image image, boolean merge) throws SystemException {
228         boolean isNew = image.isNew();
229 
230         for (ModelListener<Image> listener : listeners) {
231             if (isNew) {
232                 listener.onBeforeCreate(image);
233             }
234             else {
235                 listener.onBeforeUpdate(image);
236             }
237         }
238 
239         image = updateImpl(image, merge);
240 
241         for (ModelListener<Image> listener : listeners) {
242             if (isNew) {
243                 listener.onAfterCreate(image);
244             }
245             else {
246                 listener.onAfterUpdate(image);
247             }
248         }
249 
250         return image;
251     }
252 
253     public Image updateImpl(com.liferay.portal.model.Image image, boolean merge)
254         throws SystemException {
255         Session session = null;
256 
257         try {
258             session = openSession();
259 
260             BatchSessionUtil.update(session, image, merge);
261 
262             image.setNew(false);
263         }
264         catch (Exception e) {
265             throw processException(e);
266         }
267         finally {
268             closeSession(session);
269         }
270 
271         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
272 
273         EntityCacheUtil.putResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
274             ImageImpl.class, image.getPrimaryKey(), image);
275 
276         return image;
277     }
278 
279     public Image findByPrimaryKey(long imageId)
280         throws NoSuchImageException, SystemException {
281         Image image = fetchByPrimaryKey(imageId);
282 
283         if (image == null) {
284             if (_log.isWarnEnabled()) {
285                 _log.warn("No Image exists with the primary key " + imageId);
286             }
287 
288             throw new NoSuchImageException(
289                 "No Image exists with the primary key " + imageId);
290         }
291 
292         return image;
293     }
294 
295     public Image fetchByPrimaryKey(long imageId) throws SystemException {
296         Image image = (Image)EntityCacheUtil.getResult(ImageModelImpl.ENTITY_CACHE_ENABLED,
297                 ImageImpl.class, imageId, this);
298 
299         if (image == null) {
300             Session session = null;
301 
302             try {
303                 session = openSession();
304 
305                 image = (Image)session.get(ImageImpl.class, new Long(imageId));
306             }
307             catch (Exception e) {
308                 throw processException(e);
309             }
310             finally {
311                 if (image != null) {
312                     cacheResult(image);
313                 }
314 
315                 closeSession(session);
316             }
317         }
318 
319         return image;
320     }
321 
322     public List<Image> findBySize(int size) throws SystemException {
323         Object[] finderArgs = new Object[] { new Integer(size) };
324 
325         List<Image> list = (List<Image>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_SIZE,
326                 finderArgs, this);
327 
328         if (list == null) {
329             Session session = null;
330 
331             try {
332                 session = openSession();
333 
334                 StringBuilder query = new StringBuilder();
335 
336                 query.append("SELECT image FROM Image image WHERE ");
337 
338                 query.append("image.size < ?");
339 
340                 query.append(" ");
341 
342                 query.append("ORDER BY ");
343 
344                 query.append("image.imageId ASC");
345 
346                 Query q = session.createQuery(query.toString());
347 
348                 QueryPos qPos = QueryPos.getInstance(q);
349 
350                 qPos.add(size);
351 
352                 list = q.list();
353             }
354             catch (Exception e) {
355                 throw processException(e);
356             }
357             finally {
358                 if (list == null) {
359                     list = new ArrayList<Image>();
360                 }
361 
362                 cacheResult(list);
363 
364                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_SIZE, finderArgs,
365                     list);
366 
367                 closeSession(session);
368             }
369         }
370 
371         return list;
372     }
373 
374     public List<Image> findBySize(int size, int start, int end)
375         throws SystemException {
376         return findBySize(size, start, end, null);
377     }
378 
379     public List<Image> findBySize(int size, int start, int end,
380         OrderByComparator obc) throws SystemException {
381         Object[] finderArgs = new Object[] {
382                 new Integer(size),
383                 
384                 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
385             };
386 
387         List<Image> list = (List<Image>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_SIZE,
388                 finderArgs, this);
389 
390         if (list == null) {
391             Session session = null;
392 
393             try {
394                 session = openSession();
395 
396                 StringBuilder query = new StringBuilder();
397 
398                 query.append("SELECT image FROM Image image WHERE ");
399 
400                 query.append("image.size < ?");
401 
402                 query.append(" ");
403 
404                 if (obc != null) {
405                     query.append("ORDER BY ");
406 
407                     String[] orderByFields = obc.getOrderByFields();
408 
409                     for (int i = 0; i < orderByFields.length; i++) {
410                         query.append("image.");
411                         query.append(orderByFields[i]);
412 
413                         if (obc.isAscending()) {
414                             query.append(" ASC");
415                         }
416                         else {
417                             query.append(" DESC");
418                         }
419 
420                         if ((i + 1) < orderByFields.length) {
421                             query.append(", ");
422                         }
423                     }
424                 }
425 
426                 else {
427                     query.append("ORDER BY ");
428 
429                     query.append("image.imageId ASC");
430                 }
431 
432                 Query q = session.createQuery(query.toString());
433 
434                 QueryPos qPos = QueryPos.getInstance(q);
435 
436                 qPos.add(size);
437 
438                 list = (List<Image>)QueryUtil.list(q, getDialect(), start, end);
439             }
440             catch (Exception e) {
441                 throw processException(e);
442             }
443             finally {
444                 if (list == null) {
445                     list = new ArrayList<Image>();
446                 }
447 
448                 cacheResult(list);
449 
450                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_SIZE,
451                     finderArgs, list);
452 
453                 closeSession(session);
454             }
455         }
456 
457         return list;
458     }
459 
460     public Image findBySize_First(int size, OrderByComparator obc)
461         throws NoSuchImageException, SystemException {
462         List<Image> list = findBySize(size, 0, 1, obc);
463 
464         if (list.isEmpty()) {
465             StringBuilder msg = new StringBuilder();
466 
467             msg.append("No Image exists with the key {");
468 
469             msg.append("size=" + size);
470 
471             msg.append(StringPool.CLOSE_CURLY_BRACE);
472 
473             throw new NoSuchImageException(msg.toString());
474         }
475         else {
476             return list.get(0);
477         }
478     }
479 
480     public Image findBySize_Last(int size, OrderByComparator obc)
481         throws NoSuchImageException, SystemException {
482         int count = countBySize(size);
483 
484         List<Image> list = findBySize(size, count - 1, count, obc);
485 
486         if (list.isEmpty()) {
487             StringBuilder msg = new StringBuilder();
488 
489             msg.append("No Image exists with the key {");
490 
491             msg.append("size=" + size);
492 
493             msg.append(StringPool.CLOSE_CURLY_BRACE);
494 
495             throw new NoSuchImageException(msg.toString());
496         }
497         else {
498             return list.get(0);
499         }
500     }
501 
502     public Image[] findBySize_PrevAndNext(long imageId, int size,
503         OrderByComparator obc) throws NoSuchImageException, SystemException {
504         Image image = findByPrimaryKey(imageId);
505 
506         int count = countBySize(size);
507 
508         Session session = null;
509 
510         try {
511             session = openSession();
512 
513             StringBuilder query = new StringBuilder();
514 
515             query.append("SELECT image FROM Image image WHERE ");
516 
517             query.append("image.size < ?");
518 
519             query.append(" ");
520 
521             if (obc != null) {
522                 query.append("ORDER BY ");
523 
524                 String[] orderByFields = obc.getOrderByFields();
525 
526                 for (int i = 0; i < orderByFields.length; i++) {
527                     query.append("image.");
528                     query.append(orderByFields[i]);
529 
530                     if (obc.isAscending()) {
531                         query.append(" ASC");
532                     }
533                     else {
534                         query.append(" DESC");
535                     }
536 
537                     if ((i + 1) < orderByFields.length) {
538                         query.append(", ");
539                     }
540                 }
541             }
542 
543             else {
544                 query.append("ORDER BY ");
545 
546                 query.append("image.imageId ASC");
547             }
548 
549             Query q = session.createQuery(query.toString());
550 
551             QueryPos qPos = QueryPos.getInstance(q);
552 
553             qPos.add(size);
554 
555             Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, image);
556 
557             Image[] array = new ImageImpl[3];
558 
559             array[0] = (Image)objArray[0];
560             array[1] = (Image)objArray[1];
561             array[2] = (Image)objArray[2];
562 
563             return array;
564         }
565         catch (Exception e) {
566             throw processException(e);
567         }
568         finally {
569             closeSession(session);
570         }
571     }
572 
573     public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
574         throws SystemException {
575         Session session = null;
576 
577         try {
578             session = openSession();
579 
580             dynamicQuery.compile(session);
581 
582             return dynamicQuery.list();
583         }
584         catch (Exception e) {
585             throw processException(e);
586         }
587         finally {
588             closeSession(session);
589         }
590     }
591 
592     public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
593         int start, int end) throws SystemException {
594         Session session = null;
595 
596         try {
597             session = openSession();
598 
599             dynamicQuery.setLimit(start, end);
600 
601             dynamicQuery.compile(session);
602 
603             return dynamicQuery.list();
604         }
605         catch (Exception e) {
606             throw processException(e);
607         }
608         finally {
609             closeSession(session);
610         }
611     }
612 
613     public List<Image> findAll() throws SystemException {
614         return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
615     }
616 
617     public List<Image> findAll(int start, int end) throws SystemException {
618         return findAll(start, end, null);
619     }
620 
621     public List<Image> findAll(int start, int end, OrderByComparator obc)
622         throws SystemException {
623         Object[] finderArgs = new Object[] {
624                 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
625             };
626 
627         List<Image> list = (List<Image>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
628                 finderArgs, this);
629 
630         if (list == null) {
631             Session session = null;
632 
633             try {
634                 session = openSession();
635 
636                 StringBuilder query = new StringBuilder();
637 
638                 query.append("SELECT image FROM Image image ");
639 
640                 if (obc != null) {
641                     query.append("ORDER BY ");
642 
643                     String[] orderByFields = obc.getOrderByFields();
644 
645                     for (int i = 0; i < orderByFields.length; i++) {
646                         query.append("image.");
647                         query.append(orderByFields[i]);
648 
649                         if (obc.isAscending()) {
650                             query.append(" ASC");
651                         }
652                         else {
653                             query.append(" DESC");
654                         }
655 
656                         if ((i + 1) < orderByFields.length) {
657                             query.append(", ");
658                         }
659                     }
660                 }
661 
662                 else {
663                     query.append("ORDER BY ");
664 
665                     query.append("image.imageId ASC");
666                 }
667 
668                 Query q = session.createQuery(query.toString());
669 
670                 if (obc == null) {
671                     list = (List<Image>)QueryUtil.list(q, getDialect(), start,
672                             end, false);
673 
674                     Collections.sort(list);
675                 }
676                 else {
677                     list = (List<Image>)QueryUtil.list(q, getDialect(), start,
678                             end);
679                 }
680             }
681             catch (Exception e) {
682                 throw processException(e);
683             }
684             finally {
685                 if (list == null) {
686                     list = new ArrayList<Image>();
687                 }
688 
689                 cacheResult(list);
690 
691                 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
692 
693                 closeSession(session);
694             }
695         }
696 
697         return list;
698     }
699 
700     public void removeBySize(int size) throws SystemException {
701         for (Image image : findBySize(size)) {
702             remove(image);
703         }
704     }
705 
706     public void removeAll() throws SystemException {
707         for (Image image : findAll()) {
708             remove(image);
709         }
710     }
711 
712     public int countBySize(int size) throws SystemException {
713         Object[] finderArgs = new Object[] { new Integer(size) };
714 
715         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_SIZE,
716                 finderArgs, this);
717 
718         if (count == null) {
719             Session session = null;
720 
721             try {
722                 session = openSession();
723 
724                 StringBuilder query = new StringBuilder();
725 
726                 query.append("SELECT COUNT(image) ");
727                 query.append("FROM Image image WHERE ");
728 
729                 query.append("image.size < ?");
730 
731                 query.append(" ");
732 
733                 Query q = session.createQuery(query.toString());
734 
735                 QueryPos qPos = QueryPos.getInstance(q);
736 
737                 qPos.add(size);
738 
739                 count = (Long)q.uniqueResult();
740             }
741             catch (Exception e) {
742                 throw processException(e);
743             }
744             finally {
745                 if (count == null) {
746                     count = Long.valueOf(0);
747                 }
748 
749                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_SIZE,
750                     finderArgs, count);
751 
752                 closeSession(session);
753             }
754         }
755 
756         return count.intValue();
757     }
758 
759     public int countAll() throws SystemException {
760         Object[] finderArgs = new Object[0];
761 
762         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
763                 finderArgs, this);
764 
765         if (count == null) {
766             Session session = null;
767 
768             try {
769                 session = openSession();
770 
771                 Query q = session.createQuery(
772                         "SELECT COUNT(image) FROM Image image");
773 
774                 count = (Long)q.uniqueResult();
775             }
776             catch (Exception e) {
777                 throw processException(e);
778             }
779             finally {
780                 if (count == null) {
781                     count = Long.valueOf(0);
782                 }
783 
784                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
785                     count);
786 
787                 closeSession(session);
788             }
789         }
790 
791         return count.intValue();
792     }
793 
794     public void afterPropertiesSet() {
795         String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
796                     com.liferay.portal.util.PropsUtil.get(
797                         "value.object.listener.com.liferay.portal.model.Image")));
798 
799         if (listenerClassNames.length > 0) {
800             try {
801                 List<ModelListener<Image>> listenersList = new ArrayList<ModelListener<Image>>();
802 
803                 for (String listenerClassName : listenerClassNames) {
804                     listenersList.add((ModelListener<Image>)Class.forName(
805                             listenerClassName).newInstance());
806                 }
807 
808                 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
809             }
810             catch (Exception e) {
811                 _log.error(e);
812             }
813         }
814     }
815 
816     @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence.impl")
817     protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
818     @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence.impl")
819     protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
820     @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence.impl")
821     protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
822     @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence.impl")
823     protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
824     @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence.impl")
825     protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
826     @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence.impl")
827     protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
828     @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence.impl")
829     protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
830     @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence.impl")
831     protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
832     @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence.impl")
833     protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
834     @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence.impl")
835     protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
836     @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence.impl")
837     protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
838     @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence.impl")
839     protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
840     @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence.impl")
841     protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
842     @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence.impl")
843     protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
844     @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence.impl")
845     protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
846     @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence.impl")
847     protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
848     @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence.impl")
849     protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
850     @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence.impl")
851     protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
852     @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence.impl")
853     protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
854     @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence.impl")
855     protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
856     @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence.impl")
857     protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
858     @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence.impl")
859     protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
860     @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence.impl")
861     protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
862     @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence.impl")
863     protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
864     @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence.impl")
865     protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
866     @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence.impl")
867     protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
868     @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence.impl")
869     protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
870     @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence.impl")
871     protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
872     @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence.impl")
873     protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
874     @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence.impl")
875     protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
876     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
877     protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
878     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence.impl")
879     protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
880     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence.impl")
881     protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
882     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence.impl")
883     protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
884     @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence.impl")
885     protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
886     @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence.impl")
887     protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
888     @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence.impl")
889     protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
890     @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence.impl")
891     protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
892     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
893     protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
894     @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence.impl")
895     protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
896     @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence.impl")
897     protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
898     @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence.impl")
899     protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
900     @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence.impl")
901     protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
902     @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence.impl")
903     protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
904     @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence.impl")
905     protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
906     @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence.impl")
907     protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
908     private static Log _log = LogFactoryUtil.getLog(ImagePersistenceImpl.class);
909 }