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