1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.NoSuchRegionException;
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.ModelListener;
44 import com.liferay.portal.model.Region;
45 import com.liferay.portal.model.impl.RegionImpl;
46 import com.liferay.portal.model.impl.RegionModelImpl;
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
66 public class RegionPersistenceImpl extends BasePersistenceImpl
67 implements RegionPersistence {
68 public static final String FINDER_CLASS_NAME_ENTITY = RegionImpl.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_COUNTRYID = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
72 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
73 "findByCountryId", new String[] { Long.class.getName() });
74 public static final FinderPath FINDER_PATH_FIND_BY_OBC_COUNTRYID = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
75 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
76 "findByCountryId",
77 new String[] {
78 Long.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_COUNTRYID = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
84 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
85 "countByCountryId", new String[] { Long.class.getName() });
86 public static final FinderPath FINDER_PATH_FIND_BY_ACTIVE = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
87 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
88 "findByActive", new String[] { Boolean.class.getName() });
89 public static final FinderPath FINDER_PATH_FIND_BY_OBC_ACTIVE = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
90 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
91 "findByActive",
92 new String[] {
93 Boolean.class.getName(),
94
95 "java.lang.Integer", "java.lang.Integer",
96 "com.liferay.portal.kernel.util.OrderByComparator"
97 });
98 public static final FinderPath FINDER_PATH_COUNT_BY_ACTIVE = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
99 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
100 "countByActive", new String[] { Boolean.class.getName() });
101 public static final FinderPath FINDER_PATH_FIND_BY_C_A = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
102 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
103 "findByC_A",
104 new String[] { Long.class.getName(), Boolean.class.getName() });
105 public static final FinderPath FINDER_PATH_FIND_BY_OBC_C_A = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
106 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
107 "findByC_A",
108 new String[] {
109 Long.class.getName(), Boolean.class.getName(),
110
111 "java.lang.Integer", "java.lang.Integer",
112 "com.liferay.portal.kernel.util.OrderByComparator"
113 });
114 public static final FinderPath FINDER_PATH_COUNT_BY_C_A = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
115 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
116 "countByC_A",
117 new String[] { Long.class.getName(), Boolean.class.getName() });
118 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
119 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
120 "findAll", new String[0]);
121 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(RegionModelImpl.ENTITY_CACHE_ENABLED,
122 RegionModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
123 "countAll", new String[0]);
124
125 public void cacheResult(Region region) {
126 EntityCacheUtil.putResult(RegionModelImpl.ENTITY_CACHE_ENABLED,
127 RegionImpl.class, region.getPrimaryKey(), region);
128 }
129
130 public void cacheResult(List<Region> regions) {
131 for (Region region : regions) {
132 if (EntityCacheUtil.getResult(
133 RegionModelImpl.ENTITY_CACHE_ENABLED, RegionImpl.class,
134 region.getPrimaryKey(), this) == null) {
135 cacheResult(region);
136 }
137 }
138 }
139
140 public void clearCache() {
141 CacheRegistry.clear(RegionImpl.class.getName());
142 EntityCacheUtil.clearCache(RegionImpl.class.getName());
143 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
144 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
145 }
146
147 public Region create(long regionId) {
148 Region region = new RegionImpl();
149
150 region.setNew(true);
151 region.setPrimaryKey(regionId);
152
153 return region;
154 }
155
156 public Region remove(long regionId)
157 throws NoSuchRegionException, SystemException {
158 Session session = null;
159
160 try {
161 session = openSession();
162
163 Region region = (Region)session.get(RegionImpl.class,
164 new Long(regionId));
165
166 if (region == null) {
167 if (_log.isWarnEnabled()) {
168 _log.warn("No Region exists with the primary key " +
169 regionId);
170 }
171
172 throw new NoSuchRegionException(
173 "No Region exists with the primary key " + regionId);
174 }
175
176 return remove(region);
177 }
178 catch (NoSuchRegionException nsee) {
179 throw nsee;
180 }
181 catch (Exception e) {
182 throw processException(e);
183 }
184 finally {
185 closeSession(session);
186 }
187 }
188
189 public Region remove(Region region) throws SystemException {
190 for (ModelListener<Region> listener : listeners) {
191 listener.onBeforeRemove(region);
192 }
193
194 region = removeImpl(region);
195
196 for (ModelListener<Region> listener : listeners) {
197 listener.onAfterRemove(region);
198 }
199
200 return region;
201 }
202
203 protected Region removeImpl(Region region) throws SystemException {
204 Session session = null;
205
206 try {
207 session = openSession();
208
209 if (region.isCachedModel() || BatchSessionUtil.isEnabled()) {
210 Object staleObject = session.get(RegionImpl.class,
211 region.getPrimaryKeyObj());
212
213 if (staleObject != null) {
214 session.evict(staleObject);
215 }
216 }
217
218 session.delete(region);
219
220 session.flush();
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.removeResult(RegionModelImpl.ENTITY_CACHE_ENABLED,
232 RegionImpl.class, region.getPrimaryKey());
233
234 return region;
235 }
236
237
240 public Region update(Region region) throws SystemException {
241 if (_log.isWarnEnabled()) {
242 _log.warn(
243 "Using the deprecated update(Region region) method. Use update(Region region, boolean merge) instead.");
244 }
245
246 return update(region, false);
247 }
248
249
261 public Region update(Region region, boolean merge)
262 throws SystemException {
263 boolean isNew = region.isNew();
264
265 for (ModelListener<Region> listener : listeners) {
266 if (isNew) {
267 listener.onBeforeCreate(region);
268 }
269 else {
270 listener.onBeforeUpdate(region);
271 }
272 }
273
274 region = updateImpl(region, merge);
275
276 for (ModelListener<Region> listener : listeners) {
277 if (isNew) {
278 listener.onAfterCreate(region);
279 }
280 else {
281 listener.onAfterUpdate(region);
282 }
283 }
284
285 return region;
286 }
287
288 public Region updateImpl(com.liferay.portal.model.Region region,
289 boolean merge) throws SystemException {
290 Session session = null;
291
292 try {
293 session = openSession();
294
295 BatchSessionUtil.update(session, region, merge);
296
297 region.setNew(false);
298 }
299 catch (Exception e) {
300 throw processException(e);
301 }
302 finally {
303 closeSession(session);
304 }
305
306 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
307
308 EntityCacheUtil.putResult(RegionModelImpl.ENTITY_CACHE_ENABLED,
309 RegionImpl.class, region.getPrimaryKey(), region);
310
311 return region;
312 }
313
314 public Region findByPrimaryKey(long regionId)
315 throws NoSuchRegionException, SystemException {
316 Region region = fetchByPrimaryKey(regionId);
317
318 if (region == null) {
319 if (_log.isWarnEnabled()) {
320 _log.warn("No Region exists with the primary key " + regionId);
321 }
322
323 throw new NoSuchRegionException(
324 "No Region exists with the primary key " + regionId);
325 }
326
327 return region;
328 }
329
330 public Region fetchByPrimaryKey(long regionId) throws SystemException {
331 Region region = (Region)EntityCacheUtil.getResult(RegionModelImpl.ENTITY_CACHE_ENABLED,
332 RegionImpl.class, regionId, this);
333
334 if (region == null) {
335 Session session = null;
336
337 try {
338 session = openSession();
339
340 region = (Region)session.get(RegionImpl.class,
341 new Long(regionId));
342 }
343 catch (Exception e) {
344 throw processException(e);
345 }
346 finally {
347 if (region != null) {
348 cacheResult(region);
349 }
350
351 closeSession(session);
352 }
353 }
354
355 return region;
356 }
357
358 public List<Region> findByCountryId(long countryId)
359 throws SystemException {
360 Object[] finderArgs = new Object[] { new Long(countryId) };
361
362 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COUNTRYID,
363 finderArgs, this);
364
365 if (list == null) {
366 Session session = null;
367
368 try {
369 session = openSession();
370
371 StringBuilder query = new StringBuilder();
372
373 query.append("SELECT region FROM Region region WHERE ");
374
375 query.append("region.countryId = ?");
376
377 query.append(" ");
378
379 query.append("ORDER BY ");
380
381 query.append("region.name ASC");
382
383 Query q = session.createQuery(query.toString());
384
385 QueryPos qPos = QueryPos.getInstance(q);
386
387 qPos.add(countryId);
388
389 list = q.list();
390 }
391 catch (Exception e) {
392 throw processException(e);
393 }
394 finally {
395 if (list == null) {
396 list = new ArrayList<Region>();
397 }
398
399 cacheResult(list);
400
401 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COUNTRYID,
402 finderArgs, list);
403
404 closeSession(session);
405 }
406 }
407
408 return list;
409 }
410
411 public List<Region> findByCountryId(long countryId, int start, int end)
412 throws SystemException {
413 return findByCountryId(countryId, start, end, null);
414 }
415
416 public List<Region> findByCountryId(long countryId, int start, int end,
417 OrderByComparator obc) throws SystemException {
418 Object[] finderArgs = new Object[] {
419 new Long(countryId),
420
421 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
422 };
423
424 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_COUNTRYID,
425 finderArgs, this);
426
427 if (list == null) {
428 Session session = null;
429
430 try {
431 session = openSession();
432
433 StringBuilder query = new StringBuilder();
434
435 query.append("SELECT region FROM Region region WHERE ");
436
437 query.append("region.countryId = ?");
438
439 query.append(" ");
440
441 if (obc != null) {
442 query.append("ORDER BY ");
443
444 String[] orderByFields = obc.getOrderByFields();
445
446 for (int i = 0; i < orderByFields.length; i++) {
447 query.append("region.");
448 query.append(orderByFields[i]);
449
450 if (obc.isAscending()) {
451 query.append(" ASC");
452 }
453 else {
454 query.append(" DESC");
455 }
456
457 if ((i + 1) < orderByFields.length) {
458 query.append(", ");
459 }
460 }
461 }
462
463 else {
464 query.append("ORDER BY ");
465
466 query.append("region.name ASC");
467 }
468
469 Query q = session.createQuery(query.toString());
470
471 QueryPos qPos = QueryPos.getInstance(q);
472
473 qPos.add(countryId);
474
475 list = (List<Region>)QueryUtil.list(q, getDialect(), start, end);
476 }
477 catch (Exception e) {
478 throw processException(e);
479 }
480 finally {
481 if (list == null) {
482 list = new ArrayList<Region>();
483 }
484
485 cacheResult(list);
486
487 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_COUNTRYID,
488 finderArgs, list);
489
490 closeSession(session);
491 }
492 }
493
494 return list;
495 }
496
497 public Region findByCountryId_First(long countryId, OrderByComparator obc)
498 throws NoSuchRegionException, SystemException {
499 List<Region> list = findByCountryId(countryId, 0, 1, obc);
500
501 if (list.isEmpty()) {
502 StringBuilder msg = new StringBuilder();
503
504 msg.append("No Region exists with the key {");
505
506 msg.append("countryId=" + countryId);
507
508 msg.append(StringPool.CLOSE_CURLY_BRACE);
509
510 throw new NoSuchRegionException(msg.toString());
511 }
512 else {
513 return list.get(0);
514 }
515 }
516
517 public Region findByCountryId_Last(long countryId, OrderByComparator obc)
518 throws NoSuchRegionException, SystemException {
519 int count = countByCountryId(countryId);
520
521 List<Region> list = findByCountryId(countryId, count - 1, count, obc);
522
523 if (list.isEmpty()) {
524 StringBuilder msg = new StringBuilder();
525
526 msg.append("No Region exists with the key {");
527
528 msg.append("countryId=" + countryId);
529
530 msg.append(StringPool.CLOSE_CURLY_BRACE);
531
532 throw new NoSuchRegionException(msg.toString());
533 }
534 else {
535 return list.get(0);
536 }
537 }
538
539 public Region[] findByCountryId_PrevAndNext(long regionId, long countryId,
540 OrderByComparator obc) throws NoSuchRegionException, SystemException {
541 Region region = findByPrimaryKey(regionId);
542
543 int count = countByCountryId(countryId);
544
545 Session session = null;
546
547 try {
548 session = openSession();
549
550 StringBuilder query = new StringBuilder();
551
552 query.append("SELECT region FROM Region region WHERE ");
553
554 query.append("region.countryId = ?");
555
556 query.append(" ");
557
558 if (obc != null) {
559 query.append("ORDER BY ");
560
561 String[] orderByFields = obc.getOrderByFields();
562
563 for (int i = 0; i < orderByFields.length; i++) {
564 query.append("region.");
565 query.append(orderByFields[i]);
566
567 if (obc.isAscending()) {
568 query.append(" ASC");
569 }
570 else {
571 query.append(" DESC");
572 }
573
574 if ((i + 1) < orderByFields.length) {
575 query.append(", ");
576 }
577 }
578 }
579
580 else {
581 query.append("ORDER BY ");
582
583 query.append("region.name ASC");
584 }
585
586 Query q = session.createQuery(query.toString());
587
588 QueryPos qPos = QueryPos.getInstance(q);
589
590 qPos.add(countryId);
591
592 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, region);
593
594 Region[] array = new RegionImpl[3];
595
596 array[0] = (Region)objArray[0];
597 array[1] = (Region)objArray[1];
598 array[2] = (Region)objArray[2];
599
600 return array;
601 }
602 catch (Exception e) {
603 throw processException(e);
604 }
605 finally {
606 closeSession(session);
607 }
608 }
609
610 public List<Region> findByActive(boolean active) throws SystemException {
611 Object[] finderArgs = new Object[] { Boolean.valueOf(active) };
612
613 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_ACTIVE,
614 finderArgs, this);
615
616 if (list == null) {
617 Session session = null;
618
619 try {
620 session = openSession();
621
622 StringBuilder query = new StringBuilder();
623
624 query.append("SELECT region FROM Region region WHERE ");
625
626 query.append("region.active = ?");
627
628 query.append(" ");
629
630 query.append("ORDER BY ");
631
632 query.append("region.name ASC");
633
634 Query q = session.createQuery(query.toString());
635
636 QueryPos qPos = QueryPos.getInstance(q);
637
638 qPos.add(active);
639
640 list = q.list();
641 }
642 catch (Exception e) {
643 throw processException(e);
644 }
645 finally {
646 if (list == null) {
647 list = new ArrayList<Region>();
648 }
649
650 cacheResult(list);
651
652 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_ACTIVE,
653 finderArgs, list);
654
655 closeSession(session);
656 }
657 }
658
659 return list;
660 }
661
662 public List<Region> findByActive(boolean active, int start, int end)
663 throws SystemException {
664 return findByActive(active, start, end, null);
665 }
666
667 public List<Region> findByActive(boolean active, int start, int end,
668 OrderByComparator obc) throws SystemException {
669 Object[] finderArgs = new Object[] {
670 Boolean.valueOf(active),
671
672 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
673 };
674
675 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_ACTIVE,
676 finderArgs, this);
677
678 if (list == null) {
679 Session session = null;
680
681 try {
682 session = openSession();
683
684 StringBuilder query = new StringBuilder();
685
686 query.append("SELECT region FROM Region region WHERE ");
687
688 query.append("region.active = ?");
689
690 query.append(" ");
691
692 if (obc != null) {
693 query.append("ORDER BY ");
694
695 String[] orderByFields = obc.getOrderByFields();
696
697 for (int i = 0; i < orderByFields.length; i++) {
698 query.append("region.");
699 query.append(orderByFields[i]);
700
701 if (obc.isAscending()) {
702 query.append(" ASC");
703 }
704 else {
705 query.append(" DESC");
706 }
707
708 if ((i + 1) < orderByFields.length) {
709 query.append(", ");
710 }
711 }
712 }
713
714 else {
715 query.append("ORDER BY ");
716
717 query.append("region.name ASC");
718 }
719
720 Query q = session.createQuery(query.toString());
721
722 QueryPos qPos = QueryPos.getInstance(q);
723
724 qPos.add(active);
725
726 list = (List<Region>)QueryUtil.list(q, getDialect(), start, end);
727 }
728 catch (Exception e) {
729 throw processException(e);
730 }
731 finally {
732 if (list == null) {
733 list = new ArrayList<Region>();
734 }
735
736 cacheResult(list);
737
738 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_ACTIVE,
739 finderArgs, list);
740
741 closeSession(session);
742 }
743 }
744
745 return list;
746 }
747
748 public Region findByActive_First(boolean active, OrderByComparator obc)
749 throws NoSuchRegionException, SystemException {
750 List<Region> list = findByActive(active, 0, 1, obc);
751
752 if (list.isEmpty()) {
753 StringBuilder msg = new StringBuilder();
754
755 msg.append("No Region exists with the key {");
756
757 msg.append("active=" + active);
758
759 msg.append(StringPool.CLOSE_CURLY_BRACE);
760
761 throw new NoSuchRegionException(msg.toString());
762 }
763 else {
764 return list.get(0);
765 }
766 }
767
768 public Region findByActive_Last(boolean active, OrderByComparator obc)
769 throws NoSuchRegionException, SystemException {
770 int count = countByActive(active);
771
772 List<Region> list = findByActive(active, count - 1, count, obc);
773
774 if (list.isEmpty()) {
775 StringBuilder msg = new StringBuilder();
776
777 msg.append("No Region exists with the key {");
778
779 msg.append("active=" + active);
780
781 msg.append(StringPool.CLOSE_CURLY_BRACE);
782
783 throw new NoSuchRegionException(msg.toString());
784 }
785 else {
786 return list.get(0);
787 }
788 }
789
790 public Region[] findByActive_PrevAndNext(long regionId, boolean active,
791 OrderByComparator obc) throws NoSuchRegionException, SystemException {
792 Region region = findByPrimaryKey(regionId);
793
794 int count = countByActive(active);
795
796 Session session = null;
797
798 try {
799 session = openSession();
800
801 StringBuilder query = new StringBuilder();
802
803 query.append("SELECT region FROM Region region WHERE ");
804
805 query.append("region.active = ?");
806
807 query.append(" ");
808
809 if (obc != null) {
810 query.append("ORDER BY ");
811
812 String[] orderByFields = obc.getOrderByFields();
813
814 for (int i = 0; i < orderByFields.length; i++) {
815 query.append("region.");
816 query.append(orderByFields[i]);
817
818 if (obc.isAscending()) {
819 query.append(" ASC");
820 }
821 else {
822 query.append(" DESC");
823 }
824
825 if ((i + 1) < orderByFields.length) {
826 query.append(", ");
827 }
828 }
829 }
830
831 else {
832 query.append("ORDER BY ");
833
834 query.append("region.name ASC");
835 }
836
837 Query q = session.createQuery(query.toString());
838
839 QueryPos qPos = QueryPos.getInstance(q);
840
841 qPos.add(active);
842
843 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, region);
844
845 Region[] array = new RegionImpl[3];
846
847 array[0] = (Region)objArray[0];
848 array[1] = (Region)objArray[1];
849 array[2] = (Region)objArray[2];
850
851 return array;
852 }
853 catch (Exception e) {
854 throw processException(e);
855 }
856 finally {
857 closeSession(session);
858 }
859 }
860
861 public List<Region> findByC_A(long countryId, boolean active)
862 throws SystemException {
863 Object[] finderArgs = new Object[] {
864 new Long(countryId), Boolean.valueOf(active)
865 };
866
867 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_C_A,
868 finderArgs, this);
869
870 if (list == null) {
871 Session session = null;
872
873 try {
874 session = openSession();
875
876 StringBuilder query = new StringBuilder();
877
878 query.append("SELECT region FROM Region region WHERE ");
879
880 query.append("region.countryId = ?");
881
882 query.append(" AND ");
883
884 query.append("region.active = ?");
885
886 query.append(" ");
887
888 query.append("ORDER BY ");
889
890 query.append("region.name ASC");
891
892 Query q = session.createQuery(query.toString());
893
894 QueryPos qPos = QueryPos.getInstance(q);
895
896 qPos.add(countryId);
897
898 qPos.add(active);
899
900 list = q.list();
901 }
902 catch (Exception e) {
903 throw processException(e);
904 }
905 finally {
906 if (list == null) {
907 list = new ArrayList<Region>();
908 }
909
910 cacheResult(list);
911
912 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_C_A, finderArgs,
913 list);
914
915 closeSession(session);
916 }
917 }
918
919 return list;
920 }
921
922 public List<Region> findByC_A(long countryId, boolean active, int start,
923 int end) throws SystemException {
924 return findByC_A(countryId, active, start, end, null);
925 }
926
927 public List<Region> findByC_A(long countryId, boolean active, int start,
928 int end, OrderByComparator obc) throws SystemException {
929 Object[] finderArgs = new Object[] {
930 new Long(countryId), Boolean.valueOf(active),
931
932 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
933 };
934
935 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_C_A,
936 finderArgs, this);
937
938 if (list == null) {
939 Session session = null;
940
941 try {
942 session = openSession();
943
944 StringBuilder query = new StringBuilder();
945
946 query.append("SELECT region FROM Region region WHERE ");
947
948 query.append("region.countryId = ?");
949
950 query.append(" AND ");
951
952 query.append("region.active = ?");
953
954 query.append(" ");
955
956 if (obc != null) {
957 query.append("ORDER BY ");
958
959 String[] orderByFields = obc.getOrderByFields();
960
961 for (int i = 0; i < orderByFields.length; i++) {
962 query.append("region.");
963 query.append(orderByFields[i]);
964
965 if (obc.isAscending()) {
966 query.append(" ASC");
967 }
968 else {
969 query.append(" DESC");
970 }
971
972 if ((i + 1) < orderByFields.length) {
973 query.append(", ");
974 }
975 }
976 }
977
978 else {
979 query.append("ORDER BY ");
980
981 query.append("region.name ASC");
982 }
983
984 Query q = session.createQuery(query.toString());
985
986 QueryPos qPos = QueryPos.getInstance(q);
987
988 qPos.add(countryId);
989
990 qPos.add(active);
991
992 list = (List<Region>)QueryUtil.list(q, getDialect(), start, end);
993 }
994 catch (Exception e) {
995 throw processException(e);
996 }
997 finally {
998 if (list == null) {
999 list = new ArrayList<Region>();
1000 }
1001
1002 cacheResult(list);
1003
1004 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_C_A,
1005 finderArgs, list);
1006
1007 closeSession(session);
1008 }
1009 }
1010
1011 return list;
1012 }
1013
1014 public Region findByC_A_First(long countryId, boolean active,
1015 OrderByComparator obc) throws NoSuchRegionException, SystemException {
1016 List<Region> list = findByC_A(countryId, active, 0, 1, obc);
1017
1018 if (list.isEmpty()) {
1019 StringBuilder msg = new StringBuilder();
1020
1021 msg.append("No Region exists with the key {");
1022
1023 msg.append("countryId=" + countryId);
1024
1025 msg.append(", ");
1026 msg.append("active=" + active);
1027
1028 msg.append(StringPool.CLOSE_CURLY_BRACE);
1029
1030 throw new NoSuchRegionException(msg.toString());
1031 }
1032 else {
1033 return list.get(0);
1034 }
1035 }
1036
1037 public Region findByC_A_Last(long countryId, boolean active,
1038 OrderByComparator obc) throws NoSuchRegionException, SystemException {
1039 int count = countByC_A(countryId, active);
1040
1041 List<Region> list = findByC_A(countryId, active, count - 1, count, obc);
1042
1043 if (list.isEmpty()) {
1044 StringBuilder msg = new StringBuilder();
1045
1046 msg.append("No Region exists with the key {");
1047
1048 msg.append("countryId=" + countryId);
1049
1050 msg.append(", ");
1051 msg.append("active=" + active);
1052
1053 msg.append(StringPool.CLOSE_CURLY_BRACE);
1054
1055 throw new NoSuchRegionException(msg.toString());
1056 }
1057 else {
1058 return list.get(0);
1059 }
1060 }
1061
1062 public Region[] findByC_A_PrevAndNext(long regionId, long countryId,
1063 boolean active, OrderByComparator obc)
1064 throws NoSuchRegionException, SystemException {
1065 Region region = findByPrimaryKey(regionId);
1066
1067 int count = countByC_A(countryId, active);
1068
1069 Session session = null;
1070
1071 try {
1072 session = openSession();
1073
1074 StringBuilder query = new StringBuilder();
1075
1076 query.append("SELECT region FROM Region region WHERE ");
1077
1078 query.append("region.countryId = ?");
1079
1080 query.append(" AND ");
1081
1082 query.append("region.active = ?");
1083
1084 query.append(" ");
1085
1086 if (obc != null) {
1087 query.append("ORDER BY ");
1088
1089 String[] orderByFields = obc.getOrderByFields();
1090
1091 for (int i = 0; i < orderByFields.length; i++) {
1092 query.append("region.");
1093 query.append(orderByFields[i]);
1094
1095 if (obc.isAscending()) {
1096 query.append(" ASC");
1097 }
1098 else {
1099 query.append(" DESC");
1100 }
1101
1102 if ((i + 1) < orderByFields.length) {
1103 query.append(", ");
1104 }
1105 }
1106 }
1107
1108 else {
1109 query.append("ORDER BY ");
1110
1111 query.append("region.name ASC");
1112 }
1113
1114 Query q = session.createQuery(query.toString());
1115
1116 QueryPos qPos = QueryPos.getInstance(q);
1117
1118 qPos.add(countryId);
1119
1120 qPos.add(active);
1121
1122 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, region);
1123
1124 Region[] array = new RegionImpl[3];
1125
1126 array[0] = (Region)objArray[0];
1127 array[1] = (Region)objArray[1];
1128 array[2] = (Region)objArray[2];
1129
1130 return array;
1131 }
1132 catch (Exception e) {
1133 throw processException(e);
1134 }
1135 finally {
1136 closeSession(session);
1137 }
1138 }
1139
1140 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
1141 throws SystemException {
1142 Session session = null;
1143
1144 try {
1145 session = openSession();
1146
1147 dynamicQuery.compile(session);
1148
1149 return dynamicQuery.list();
1150 }
1151 catch (Exception e) {
1152 throw processException(e);
1153 }
1154 finally {
1155 closeSession(session);
1156 }
1157 }
1158
1159 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
1160 int start, int end) throws SystemException {
1161 Session session = null;
1162
1163 try {
1164 session = openSession();
1165
1166 dynamicQuery.setLimit(start, end);
1167
1168 dynamicQuery.compile(session);
1169
1170 return dynamicQuery.list();
1171 }
1172 catch (Exception e) {
1173 throw processException(e);
1174 }
1175 finally {
1176 closeSession(session);
1177 }
1178 }
1179
1180 public List<Region> findAll() throws SystemException {
1181 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1182 }
1183
1184 public List<Region> findAll(int start, int end) throws SystemException {
1185 return findAll(start, end, null);
1186 }
1187
1188 public List<Region> findAll(int start, int end, OrderByComparator obc)
1189 throws SystemException {
1190 Object[] finderArgs = new Object[] {
1191 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
1192 };
1193
1194 List<Region> list = (List<Region>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1195 finderArgs, this);
1196
1197 if (list == null) {
1198 Session session = null;
1199
1200 try {
1201 session = openSession();
1202
1203 StringBuilder query = new StringBuilder();
1204
1205 query.append("SELECT region FROM Region region ");
1206
1207 if (obc != null) {
1208 query.append("ORDER BY ");
1209
1210 String[] orderByFields = obc.getOrderByFields();
1211
1212 for (int i = 0; i < orderByFields.length; i++) {
1213 query.append("region.");
1214 query.append(orderByFields[i]);
1215
1216 if (obc.isAscending()) {
1217 query.append(" ASC");
1218 }
1219 else {
1220 query.append(" DESC");
1221 }
1222
1223 if ((i + 1) < orderByFields.length) {
1224 query.append(", ");
1225 }
1226 }
1227 }
1228
1229 else {
1230 query.append("ORDER BY ");
1231
1232 query.append("region.name ASC");
1233 }
1234
1235 Query q = session.createQuery(query.toString());
1236
1237 if (obc == null) {
1238 list = (List<Region>)QueryUtil.list(q, getDialect(), start,
1239 end, false);
1240
1241 Collections.sort(list);
1242 }
1243 else {
1244 list = (List<Region>)QueryUtil.list(q, getDialect(), start,
1245 end);
1246 }
1247 }
1248 catch (Exception e) {
1249 throw processException(e);
1250 }
1251 finally {
1252 if (list == null) {
1253 list = new ArrayList<Region>();
1254 }
1255
1256 cacheResult(list);
1257
1258 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
1259
1260 closeSession(session);
1261 }
1262 }
1263
1264 return list;
1265 }
1266
1267 public void removeByCountryId(long countryId) throws SystemException {
1268 for (Region region : findByCountryId(countryId)) {
1269 remove(region);
1270 }
1271 }
1272
1273 public void removeByActive(boolean active) throws SystemException {
1274 for (Region region : findByActive(active)) {
1275 remove(region);
1276 }
1277 }
1278
1279 public void removeByC_A(long countryId, boolean active)
1280 throws SystemException {
1281 for (Region region : findByC_A(countryId, active)) {
1282 remove(region);
1283 }
1284 }
1285
1286 public void removeAll() throws SystemException {
1287 for (Region region : findAll()) {
1288 remove(region);
1289 }
1290 }
1291
1292 public int countByCountryId(long countryId) throws SystemException {
1293 Object[] finderArgs = new Object[] { new Long(countryId) };
1294
1295 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COUNTRYID,
1296 finderArgs, this);
1297
1298 if (count == null) {
1299 Session session = null;
1300
1301 try {
1302 session = openSession();
1303
1304 StringBuilder query = new StringBuilder();
1305
1306 query.append("SELECT COUNT(region) ");
1307 query.append("FROM Region region WHERE ");
1308
1309 query.append("region.countryId = ?");
1310
1311 query.append(" ");
1312
1313 Query q = session.createQuery(query.toString());
1314
1315 QueryPos qPos = QueryPos.getInstance(q);
1316
1317 qPos.add(countryId);
1318
1319 count = (Long)q.uniqueResult();
1320 }
1321 catch (Exception e) {
1322 throw processException(e);
1323 }
1324 finally {
1325 if (count == null) {
1326 count = Long.valueOf(0);
1327 }
1328
1329 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COUNTRYID,
1330 finderArgs, count);
1331
1332 closeSession(session);
1333 }
1334 }
1335
1336 return count.intValue();
1337 }
1338
1339 public int countByActive(boolean active) throws SystemException {
1340 Object[] finderArgs = new Object[] { Boolean.valueOf(active) };
1341
1342 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_ACTIVE,
1343 finderArgs, this);
1344
1345 if (count == null) {
1346 Session session = null;
1347
1348 try {
1349 session = openSession();
1350
1351 StringBuilder query = new StringBuilder();
1352
1353 query.append("SELECT COUNT(region) ");
1354 query.append("FROM Region region WHERE ");
1355
1356 query.append("region.active = ?");
1357
1358 query.append(" ");
1359
1360 Query q = session.createQuery(query.toString());
1361
1362 QueryPos qPos = QueryPos.getInstance(q);
1363
1364 qPos.add(active);
1365
1366 count = (Long)q.uniqueResult();
1367 }
1368 catch (Exception e) {
1369 throw processException(e);
1370 }
1371 finally {
1372 if (count == null) {
1373 count = Long.valueOf(0);
1374 }
1375
1376 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_ACTIVE,
1377 finderArgs, count);
1378
1379 closeSession(session);
1380 }
1381 }
1382
1383 return count.intValue();
1384 }
1385
1386 public int countByC_A(long countryId, boolean active)
1387 throws SystemException {
1388 Object[] finderArgs = new Object[] {
1389 new Long(countryId), Boolean.valueOf(active)
1390 };
1391
1392 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_A,
1393 finderArgs, this);
1394
1395 if (count == null) {
1396 Session session = null;
1397
1398 try {
1399 session = openSession();
1400
1401 StringBuilder query = new StringBuilder();
1402
1403 query.append("SELECT COUNT(region) ");
1404 query.append("FROM Region region WHERE ");
1405
1406 query.append("region.countryId = ?");
1407
1408 query.append(" AND ");
1409
1410 query.append("region.active = ?");
1411
1412 query.append(" ");
1413
1414 Query q = session.createQuery(query.toString());
1415
1416 QueryPos qPos = QueryPos.getInstance(q);
1417
1418 qPos.add(countryId);
1419
1420 qPos.add(active);
1421
1422 count = (Long)q.uniqueResult();
1423 }
1424 catch (Exception e) {
1425 throw processException(e);
1426 }
1427 finally {
1428 if (count == null) {
1429 count = Long.valueOf(0);
1430 }
1431
1432 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_A, finderArgs,
1433 count);
1434
1435 closeSession(session);
1436 }
1437 }
1438
1439 return count.intValue();
1440 }
1441
1442 public int countAll() throws SystemException {
1443 Object[] finderArgs = new Object[0];
1444
1445 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1446 finderArgs, this);
1447
1448 if (count == null) {
1449 Session session = null;
1450
1451 try {
1452 session = openSession();
1453
1454 Query q = session.createQuery(
1455 "SELECT COUNT(region) FROM Region region");
1456
1457 count = (Long)q.uniqueResult();
1458 }
1459 catch (Exception e) {
1460 throw processException(e);
1461 }
1462 finally {
1463 if (count == null) {
1464 count = Long.valueOf(0);
1465 }
1466
1467 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1468 count);
1469
1470 closeSession(session);
1471 }
1472 }
1473
1474 return count.intValue();
1475 }
1476
1477 public void afterPropertiesSet() {
1478 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1479 com.liferay.portal.util.PropsUtil.get(
1480 "value.object.listener.com.liferay.portal.model.Region")));
1481
1482 if (listenerClassNames.length > 0) {
1483 try {
1484 List<ModelListener<Region>> listenersList = new ArrayList<ModelListener<Region>>();
1485
1486 for (String listenerClassName : listenerClassNames) {
1487 listenersList.add((ModelListener<Region>)Class.forName(
1488 listenerClassName).newInstance());
1489 }
1490
1491 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1492 }
1493 catch (Exception e) {
1494 _log.error(e);
1495 }
1496 }
1497 }
1498
1499 @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence.impl")
1500 protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
1501 @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence.impl")
1502 protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
1503 @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence.impl")
1504 protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
1505 @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence.impl")
1506 protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
1507 @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence.impl")
1508 protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
1509 @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence.impl")
1510 protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
1511 @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence.impl")
1512 protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
1513 @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence.impl")
1514 protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
1515 @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence.impl")
1516 protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
1517 @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence.impl")
1518 protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
1519 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence.impl")
1520 protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
1521 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence.impl")
1522 protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
1523 @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence.impl")
1524 protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
1525 @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence.impl")
1526 protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
1527 @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence.impl")
1528 protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
1529 @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence.impl")
1530 protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
1531 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence.impl")
1532 protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1533 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence.impl")
1534 protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
1535 @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence.impl")
1536 protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
1537 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence.impl")
1538 protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
1539 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence.impl")
1540 protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1541 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence.impl")
1542 protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
1543 @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence.impl")
1544 protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
1545 @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence.impl")
1546 protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
1547 @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence.impl")
1548 protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
1549 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence.impl")
1550 protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
1551 @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence.impl")
1552 protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
1553 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence.impl")
1554 protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
1555 @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence.impl")
1556 protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
1557 @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence.impl")
1558 protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
1559 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
1560 protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
1561 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence.impl")
1562 protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
1563 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence.impl")
1564 protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
1565 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence.impl")
1566 protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
1567 @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence.impl")
1568 protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
1569 @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence.impl")
1570 protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
1571 @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence.impl")
1572 protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
1573 @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence.impl")
1574 protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
1575 @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
1576 protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
1577 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence.impl")
1578 protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
1579 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence.impl")
1580 protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
1581 @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence.impl")
1582 protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
1583 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence.impl")
1584 protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
1585 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence.impl")
1586 protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
1587 @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence.impl")
1588 protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
1589 @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence.impl")
1590 protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
1591 private static Log _log = LogFactoryUtil.getLog(RegionPersistenceImpl.class);
1592}