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