001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.NoSuchContactException;
018 import com.liferay.portal.NoSuchModelException;
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.cache.CacheRegistryUtil;
021 import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
022 import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
023 import com.liferay.portal.kernel.dao.orm.FinderPath;
024 import com.liferay.portal.kernel.dao.orm.Query;
025 import com.liferay.portal.kernel.dao.orm.QueryPos;
026 import com.liferay.portal.kernel.dao.orm.QueryUtil;
027 import com.liferay.portal.kernel.dao.orm.Session;
028 import com.liferay.portal.kernel.exception.SystemException;
029 import com.liferay.portal.kernel.log.Log;
030 import com.liferay.portal.kernel.log.LogFactoryUtil;
031 import com.liferay.portal.kernel.util.GetterUtil;
032 import com.liferay.portal.kernel.util.InstanceFactory;
033 import com.liferay.portal.kernel.util.OrderByComparator;
034 import com.liferay.portal.kernel.util.StringBundler;
035 import com.liferay.portal.kernel.util.StringPool;
036 import com.liferay.portal.kernel.util.StringUtil;
037 import com.liferay.portal.model.Contact;
038 import com.liferay.portal.model.ModelListener;
039 import com.liferay.portal.model.impl.ContactImpl;
040 import com.liferay.portal.model.impl.ContactModelImpl;
041 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
042
043 import java.io.Serializable;
044
045 import java.util.ArrayList;
046 import java.util.Collections;
047 import java.util.List;
048
049
065 public class ContactPersistenceImpl extends BasePersistenceImpl<Contact>
066 implements ContactPersistence {
067 public static final String FINDER_CLASS_NAME_ENTITY = ContactImpl.class.getName();
068 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
069 ".List";
070 public static final FinderPath FINDER_PATH_FIND_BY_COMPANYID = new FinderPath(ContactModelImpl.ENTITY_CACHE_ENABLED,
071 ContactModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
072 "findByCompanyId",
073 new String[] {
074 Long.class.getName(),
075
076 "java.lang.Integer", "java.lang.Integer",
077 "com.liferay.portal.kernel.util.OrderByComparator"
078 });
079 public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(ContactModelImpl.ENTITY_CACHE_ENABLED,
080 ContactModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
081 "countByCompanyId", new String[] { Long.class.getName() });
082 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ContactModelImpl.ENTITY_CACHE_ENABLED,
083 ContactModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
084 "findAll", new String[0]);
085 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ContactModelImpl.ENTITY_CACHE_ENABLED,
086 ContactModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
087 "countAll", new String[0]);
088
089
094 public void cacheResult(Contact contact) {
095 EntityCacheUtil.putResult(ContactModelImpl.ENTITY_CACHE_ENABLED,
096 ContactImpl.class, contact.getPrimaryKey(), contact);
097 }
098
099
104 public void cacheResult(List<Contact> contacts) {
105 for (Contact contact : contacts) {
106 if (EntityCacheUtil.getResult(
107 ContactModelImpl.ENTITY_CACHE_ENABLED,
108 ContactImpl.class, contact.getPrimaryKey(), this) == null) {
109 cacheResult(contact);
110 }
111 }
112 }
113
114
121 public void clearCache() {
122 CacheRegistryUtil.clear(ContactImpl.class.getName());
123 EntityCacheUtil.clearCache(ContactImpl.class.getName());
124 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
125 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
126 }
127
128
135 public void clearCache(Contact contact) {
136 EntityCacheUtil.removeResult(ContactModelImpl.ENTITY_CACHE_ENABLED,
137 ContactImpl.class, contact.getPrimaryKey());
138 }
139
140
146 public Contact create(long contactId) {
147 Contact contact = new ContactImpl();
148
149 contact.setNew(true);
150 contact.setPrimaryKey(contactId);
151
152 return contact;
153 }
154
155
163 public Contact remove(Serializable primaryKey)
164 throws NoSuchModelException, SystemException {
165 return remove(((Long)primaryKey).longValue());
166 }
167
168
176 public Contact remove(long contactId)
177 throws NoSuchContactException, SystemException {
178 Session session = null;
179
180 try {
181 session = openSession();
182
183 Contact contact = (Contact)session.get(ContactImpl.class,
184 new Long(contactId));
185
186 if (contact == null) {
187 if (_log.isWarnEnabled()) {
188 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + contactId);
189 }
190
191 throw new NoSuchContactException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
192 contactId);
193 }
194
195 return remove(contact);
196 }
197 catch (NoSuchContactException nsee) {
198 throw nsee;
199 }
200 catch (Exception e) {
201 throw processException(e);
202 }
203 finally {
204 closeSession(session);
205 }
206 }
207
208 protected Contact removeImpl(Contact contact) throws SystemException {
209 contact = toUnwrappedModel(contact);
210
211 Session session = null;
212
213 try {
214 session = openSession();
215
216 BatchSessionUtil.delete(session, contact);
217 }
218 catch (Exception e) {
219 throw processException(e);
220 }
221 finally {
222 closeSession(session);
223 }
224
225 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
226
227 EntityCacheUtil.removeResult(ContactModelImpl.ENTITY_CACHE_ENABLED,
228 ContactImpl.class, contact.getPrimaryKey());
229
230 return contact;
231 }
232
233 public Contact updateImpl(com.liferay.portal.model.Contact contact,
234 boolean merge) throws SystemException {
235 contact = toUnwrappedModel(contact);
236
237 Session session = null;
238
239 try {
240 session = openSession();
241
242 BatchSessionUtil.update(session, contact, merge);
243
244 contact.setNew(false);
245 }
246 catch (Exception e) {
247 throw processException(e);
248 }
249 finally {
250 closeSession(session);
251 }
252
253 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
254
255 EntityCacheUtil.putResult(ContactModelImpl.ENTITY_CACHE_ENABLED,
256 ContactImpl.class, contact.getPrimaryKey(), contact);
257
258 return contact;
259 }
260
261 protected Contact toUnwrappedModel(Contact contact) {
262 if (contact instanceof ContactImpl) {
263 return contact;
264 }
265
266 ContactImpl contactImpl = new ContactImpl();
267
268 contactImpl.setNew(contact.isNew());
269 contactImpl.setPrimaryKey(contact.getPrimaryKey());
270
271 contactImpl.setContactId(contact.getContactId());
272 contactImpl.setCompanyId(contact.getCompanyId());
273 contactImpl.setUserId(contact.getUserId());
274 contactImpl.setUserName(contact.getUserName());
275 contactImpl.setCreateDate(contact.getCreateDate());
276 contactImpl.setModifiedDate(contact.getModifiedDate());
277 contactImpl.setAccountId(contact.getAccountId());
278 contactImpl.setParentContactId(contact.getParentContactId());
279 contactImpl.setFirstName(contact.getFirstName());
280 contactImpl.setMiddleName(contact.getMiddleName());
281 contactImpl.setLastName(contact.getLastName());
282 contactImpl.setPrefixId(contact.getPrefixId());
283 contactImpl.setSuffixId(contact.getSuffixId());
284 contactImpl.setMale(contact.isMale());
285 contactImpl.setBirthday(contact.getBirthday());
286 contactImpl.setSmsSn(contact.getSmsSn());
287 contactImpl.setAimSn(contact.getAimSn());
288 contactImpl.setFacebookSn(contact.getFacebookSn());
289 contactImpl.setIcqSn(contact.getIcqSn());
290 contactImpl.setJabberSn(contact.getJabberSn());
291 contactImpl.setMsnSn(contact.getMsnSn());
292 contactImpl.setMySpaceSn(contact.getMySpaceSn());
293 contactImpl.setSkypeSn(contact.getSkypeSn());
294 contactImpl.setTwitterSn(contact.getTwitterSn());
295 contactImpl.setYmSn(contact.getYmSn());
296 contactImpl.setEmployeeStatusId(contact.getEmployeeStatusId());
297 contactImpl.setEmployeeNumber(contact.getEmployeeNumber());
298 contactImpl.setJobTitle(contact.getJobTitle());
299 contactImpl.setJobClass(contact.getJobClass());
300 contactImpl.setHoursOfOperation(contact.getHoursOfOperation());
301
302 return contactImpl;
303 }
304
305
313 public Contact findByPrimaryKey(Serializable primaryKey)
314 throws NoSuchModelException, SystemException {
315 return findByPrimaryKey(((Long)primaryKey).longValue());
316 }
317
318
326 public Contact findByPrimaryKey(long contactId)
327 throws NoSuchContactException, SystemException {
328 Contact contact = fetchByPrimaryKey(contactId);
329
330 if (contact == null) {
331 if (_log.isWarnEnabled()) {
332 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + contactId);
333 }
334
335 throw new NoSuchContactException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
336 contactId);
337 }
338
339 return contact;
340 }
341
342
349 public Contact fetchByPrimaryKey(Serializable primaryKey)
350 throws SystemException {
351 return fetchByPrimaryKey(((Long)primaryKey).longValue());
352 }
353
354
361 public Contact fetchByPrimaryKey(long contactId) throws SystemException {
362 Contact contact = (Contact)EntityCacheUtil.getResult(ContactModelImpl.ENTITY_CACHE_ENABLED,
363 ContactImpl.class, contactId, this);
364
365 if (contact == null) {
366 Session session = null;
367
368 try {
369 session = openSession();
370
371 contact = (Contact)session.get(ContactImpl.class,
372 new Long(contactId));
373 }
374 catch (Exception e) {
375 throw processException(e);
376 }
377 finally {
378 if (contact != null) {
379 cacheResult(contact);
380 }
381
382 closeSession(session);
383 }
384 }
385
386 return contact;
387 }
388
389
396 public List<Contact> findByCompanyId(long companyId)
397 throws SystemException {
398 return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
399 null);
400 }
401
402
415 public List<Contact> findByCompanyId(long companyId, int start, int end)
416 throws SystemException {
417 return findByCompanyId(companyId, start, end, null);
418 }
419
420
434 public List<Contact> findByCompanyId(long companyId, int start, int end,
435 OrderByComparator orderByComparator) throws SystemException {
436 Object[] finderArgs = new Object[] {
437 companyId,
438
439 String.valueOf(start), String.valueOf(end),
440 String.valueOf(orderByComparator)
441 };
442
443 List<Contact> list = (List<Contact>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COMPANYID,
444 finderArgs, this);
445
446 if (list == null) {
447 Session session = null;
448
449 try {
450 session = openSession();
451
452 StringBundler query = null;
453
454 if (orderByComparator != null) {
455 query = new StringBundler(3 +
456 (orderByComparator.getOrderByFields().length * 3));
457 }
458 else {
459 query = new StringBundler(2);
460 }
461
462 query.append(_SQL_SELECT_CONTACT_WHERE);
463
464 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
465
466 if (orderByComparator != null) {
467 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
468 orderByComparator);
469 }
470
471 String sql = query.toString();
472
473 Query q = session.createQuery(sql);
474
475 QueryPos qPos = QueryPos.getInstance(q);
476
477 qPos.add(companyId);
478
479 list = (List<Contact>)QueryUtil.list(q, getDialect(), start, end);
480 }
481 catch (Exception e) {
482 throw processException(e);
483 }
484 finally {
485 if (list == null) {
486 list = new ArrayList<Contact>();
487 }
488
489 cacheResult(list);
490
491 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
492 finderArgs, list);
493
494 closeSession(session);
495 }
496 }
497
498 return list;
499 }
500
501
514 public Contact findByCompanyId_First(long companyId,
515 OrderByComparator orderByComparator)
516 throws NoSuchContactException, SystemException {
517 List<Contact> list = findByCompanyId(companyId, 0, 1, orderByComparator);
518
519 if (list.isEmpty()) {
520 StringBundler msg = new StringBundler(4);
521
522 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
523
524 msg.append("companyId=");
525 msg.append(companyId);
526
527 msg.append(StringPool.CLOSE_CURLY_BRACE);
528
529 throw new NoSuchContactException(msg.toString());
530 }
531 else {
532 return list.get(0);
533 }
534 }
535
536
549 public Contact findByCompanyId_Last(long companyId,
550 OrderByComparator orderByComparator)
551 throws NoSuchContactException, SystemException {
552 int count = countByCompanyId(companyId);
553
554 List<Contact> list = findByCompanyId(companyId, count - 1, count,
555 orderByComparator);
556
557 if (list.isEmpty()) {
558 StringBundler msg = new StringBundler(4);
559
560 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
561
562 msg.append("companyId=");
563 msg.append(companyId);
564
565 msg.append(StringPool.CLOSE_CURLY_BRACE);
566
567 throw new NoSuchContactException(msg.toString());
568 }
569 else {
570 return list.get(0);
571 }
572 }
573
574
588 public Contact[] findByCompanyId_PrevAndNext(long contactId,
589 long companyId, OrderByComparator orderByComparator)
590 throws NoSuchContactException, SystemException {
591 Contact contact = findByPrimaryKey(contactId);
592
593 Session session = null;
594
595 try {
596 session = openSession();
597
598 Contact[] array = new ContactImpl[3];
599
600 array[0] = getByCompanyId_PrevAndNext(session, contact, companyId,
601 orderByComparator, true);
602
603 array[1] = contact;
604
605 array[2] = getByCompanyId_PrevAndNext(session, contact, companyId,
606 orderByComparator, false);
607
608 return array;
609 }
610 catch (Exception e) {
611 throw processException(e);
612 }
613 finally {
614 closeSession(session);
615 }
616 }
617
618 protected Contact getByCompanyId_PrevAndNext(Session session,
619 Contact contact, long companyId, OrderByComparator orderByComparator,
620 boolean previous) {
621 StringBundler query = null;
622
623 if (orderByComparator != null) {
624 query = new StringBundler(6 +
625 (orderByComparator.getOrderByFields().length * 6));
626 }
627 else {
628 query = new StringBundler(3);
629 }
630
631 query.append(_SQL_SELECT_CONTACT_WHERE);
632
633 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
634
635 if (orderByComparator != null) {
636 String[] orderByFields = orderByComparator.getOrderByFields();
637
638 if (orderByFields.length > 0) {
639 query.append(WHERE_AND);
640 }
641
642 for (int i = 0; i < orderByFields.length; i++) {
643 query.append(_ORDER_BY_ENTITY_ALIAS);
644 query.append(orderByFields[i]);
645
646 if ((i + 1) < orderByFields.length) {
647 if (orderByComparator.isAscending() ^ previous) {
648 query.append(WHERE_GREATER_THAN_HAS_NEXT);
649 }
650 else {
651 query.append(WHERE_LESSER_THAN_HAS_NEXT);
652 }
653 }
654 else {
655 if (orderByComparator.isAscending() ^ previous) {
656 query.append(WHERE_GREATER_THAN);
657 }
658 else {
659 query.append(WHERE_LESSER_THAN);
660 }
661 }
662 }
663
664 query.append(ORDER_BY_CLAUSE);
665
666 for (int i = 0; i < orderByFields.length; i++) {
667 query.append(_ORDER_BY_ENTITY_ALIAS);
668 query.append(orderByFields[i]);
669
670 if ((i + 1) < orderByFields.length) {
671 if (orderByComparator.isAscending() ^ previous) {
672 query.append(ORDER_BY_ASC_HAS_NEXT);
673 }
674 else {
675 query.append(ORDER_BY_DESC_HAS_NEXT);
676 }
677 }
678 else {
679 if (orderByComparator.isAscending() ^ previous) {
680 query.append(ORDER_BY_ASC);
681 }
682 else {
683 query.append(ORDER_BY_DESC);
684 }
685 }
686 }
687 }
688
689 String sql = query.toString();
690
691 Query q = session.createQuery(sql);
692
693 q.setFirstResult(0);
694 q.setMaxResults(2);
695
696 QueryPos qPos = QueryPos.getInstance(q);
697
698 qPos.add(companyId);
699
700 if (orderByComparator != null) {
701 Object[] values = orderByComparator.getOrderByValues(contact);
702
703 for (Object value : values) {
704 qPos.add(value);
705 }
706 }
707
708 List<Contact> list = q.list();
709
710 if (list.size() == 2) {
711 return list.get(1);
712 }
713 else {
714 return null;
715 }
716 }
717
718
724 public List<Contact> findAll() throws SystemException {
725 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
726 }
727
728
740 public List<Contact> findAll(int start, int end) throws SystemException {
741 return findAll(start, end, null);
742 }
743
744
757 public List<Contact> findAll(int start, int end,
758 OrderByComparator orderByComparator) throws SystemException {
759 Object[] finderArgs = new Object[] {
760 String.valueOf(start), String.valueOf(end),
761 String.valueOf(orderByComparator)
762 };
763
764 List<Contact> list = (List<Contact>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
765 finderArgs, this);
766
767 if (list == null) {
768 Session session = null;
769
770 try {
771 session = openSession();
772
773 StringBundler query = null;
774 String sql = null;
775
776 if (orderByComparator != null) {
777 query = new StringBundler(2 +
778 (orderByComparator.getOrderByFields().length * 3));
779
780 query.append(_SQL_SELECT_CONTACT);
781
782 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
783 orderByComparator);
784
785 sql = query.toString();
786 }
787 else {
788 sql = _SQL_SELECT_CONTACT;
789 }
790
791 Query q = session.createQuery(sql);
792
793 if (orderByComparator == null) {
794 list = (List<Contact>)QueryUtil.list(q, getDialect(),
795 start, end, false);
796
797 Collections.sort(list);
798 }
799 else {
800 list = (List<Contact>)QueryUtil.list(q, getDialect(),
801 start, end);
802 }
803 }
804 catch (Exception e) {
805 throw processException(e);
806 }
807 finally {
808 if (list == null) {
809 list = new ArrayList<Contact>();
810 }
811
812 cacheResult(list);
813
814 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
815
816 closeSession(session);
817 }
818 }
819
820 return list;
821 }
822
823
829 public void removeByCompanyId(long companyId) throws SystemException {
830 for (Contact contact : findByCompanyId(companyId)) {
831 remove(contact);
832 }
833 }
834
835
840 public void removeAll() throws SystemException {
841 for (Contact contact : findAll()) {
842 remove(contact);
843 }
844 }
845
846
853 public int countByCompanyId(long companyId) throws SystemException {
854 Object[] finderArgs = new Object[] { companyId };
855
856 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
857 finderArgs, this);
858
859 if (count == null) {
860 Session session = null;
861
862 try {
863 session = openSession();
864
865 StringBundler query = new StringBundler(2);
866
867 query.append(_SQL_COUNT_CONTACT_WHERE);
868
869 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
870
871 String sql = query.toString();
872
873 Query q = session.createQuery(sql);
874
875 QueryPos qPos = QueryPos.getInstance(q);
876
877 qPos.add(companyId);
878
879 count = (Long)q.uniqueResult();
880 }
881 catch (Exception e) {
882 throw processException(e);
883 }
884 finally {
885 if (count == null) {
886 count = Long.valueOf(0);
887 }
888
889 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
890 finderArgs, count);
891
892 closeSession(session);
893 }
894 }
895
896 return count.intValue();
897 }
898
899
905 public int countAll() throws SystemException {
906 Object[] finderArgs = new Object[0];
907
908 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
909 finderArgs, this);
910
911 if (count == null) {
912 Session session = null;
913
914 try {
915 session = openSession();
916
917 Query q = session.createQuery(_SQL_COUNT_CONTACT);
918
919 count = (Long)q.uniqueResult();
920 }
921 catch (Exception e) {
922 throw processException(e);
923 }
924 finally {
925 if (count == null) {
926 count = Long.valueOf(0);
927 }
928
929 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
930 count);
931
932 closeSession(session);
933 }
934 }
935
936 return count.intValue();
937 }
938
939
942 public void afterPropertiesSet() {
943 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
944 com.liferay.portal.util.PropsUtil.get(
945 "value.object.listener.com.liferay.portal.model.Contact")));
946
947 if (listenerClassNames.length > 0) {
948 try {
949 List<ModelListener<Contact>> listenersList = new ArrayList<ModelListener<Contact>>();
950
951 for (String listenerClassName : listenerClassNames) {
952 listenersList.add((ModelListener<Contact>)InstanceFactory.newInstance(
953 listenerClassName));
954 }
955
956 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
957 }
958 catch (Exception e) {
959 _log.error(e);
960 }
961 }
962 }
963
964 public void destroy() {
965 EntityCacheUtil.removeCache(ContactImpl.class.getName());
966 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
967 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
968 }
969
970 @BeanReference(type = AccountPersistence.class)
971 protected AccountPersistence accountPersistence;
972 @BeanReference(type = AddressPersistence.class)
973 protected AddressPersistence addressPersistence;
974 @BeanReference(type = BrowserTrackerPersistence.class)
975 protected BrowserTrackerPersistence browserTrackerPersistence;
976 @BeanReference(type = ClassNamePersistence.class)
977 protected ClassNamePersistence classNamePersistence;
978 @BeanReference(type = ClusterGroupPersistence.class)
979 protected ClusterGroupPersistence clusterGroupPersistence;
980 @BeanReference(type = CompanyPersistence.class)
981 protected CompanyPersistence companyPersistence;
982 @BeanReference(type = ContactPersistence.class)
983 protected ContactPersistence contactPersistence;
984 @BeanReference(type = CountryPersistence.class)
985 protected CountryPersistence countryPersistence;
986 @BeanReference(type = EmailAddressPersistence.class)
987 protected EmailAddressPersistence emailAddressPersistence;
988 @BeanReference(type = GroupPersistence.class)
989 protected GroupPersistence groupPersistence;
990 @BeanReference(type = ImagePersistence.class)
991 protected ImagePersistence imagePersistence;
992 @BeanReference(type = LayoutPersistence.class)
993 protected LayoutPersistence layoutPersistence;
994 @BeanReference(type = LayoutPrototypePersistence.class)
995 protected LayoutPrototypePersistence layoutPrototypePersistence;
996 @BeanReference(type = LayoutSetPersistence.class)
997 protected LayoutSetPersistence layoutSetPersistence;
998 @BeanReference(type = LayoutSetPrototypePersistence.class)
999 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1000 @BeanReference(type = ListTypePersistence.class)
1001 protected ListTypePersistence listTypePersistence;
1002 @BeanReference(type = LockPersistence.class)
1003 protected LockPersistence lockPersistence;
1004 @BeanReference(type = MembershipRequestPersistence.class)
1005 protected MembershipRequestPersistence membershipRequestPersistence;
1006 @BeanReference(type = OrganizationPersistence.class)
1007 protected OrganizationPersistence organizationPersistence;
1008 @BeanReference(type = OrgGroupPermissionPersistence.class)
1009 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1010 @BeanReference(type = OrgGroupRolePersistence.class)
1011 protected OrgGroupRolePersistence orgGroupRolePersistence;
1012 @BeanReference(type = OrgLaborPersistence.class)
1013 protected OrgLaborPersistence orgLaborPersistence;
1014 @BeanReference(type = PasswordPolicyPersistence.class)
1015 protected PasswordPolicyPersistence passwordPolicyPersistence;
1016 @BeanReference(type = PasswordPolicyRelPersistence.class)
1017 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1018 @BeanReference(type = PasswordTrackerPersistence.class)
1019 protected PasswordTrackerPersistence passwordTrackerPersistence;
1020 @BeanReference(type = PermissionPersistence.class)
1021 protected PermissionPersistence permissionPersistence;
1022 @BeanReference(type = PhonePersistence.class)
1023 protected PhonePersistence phonePersistence;
1024 @BeanReference(type = PluginSettingPersistence.class)
1025 protected PluginSettingPersistence pluginSettingPersistence;
1026 @BeanReference(type = PortletPersistence.class)
1027 protected PortletPersistence portletPersistence;
1028 @BeanReference(type = PortletItemPersistence.class)
1029 protected PortletItemPersistence portletItemPersistence;
1030 @BeanReference(type = PortletPreferencesPersistence.class)
1031 protected PortletPreferencesPersistence portletPreferencesPersistence;
1032 @BeanReference(type = RegionPersistence.class)
1033 protected RegionPersistence regionPersistence;
1034 @BeanReference(type = ReleasePersistence.class)
1035 protected ReleasePersistence releasePersistence;
1036 @BeanReference(type = ResourcePersistence.class)
1037 protected ResourcePersistence resourcePersistence;
1038 @BeanReference(type = ResourceActionPersistence.class)
1039 protected ResourceActionPersistence resourceActionPersistence;
1040 @BeanReference(type = ResourceCodePersistence.class)
1041 protected ResourceCodePersistence resourceCodePersistence;
1042 @BeanReference(type = ResourcePermissionPersistence.class)
1043 protected ResourcePermissionPersistence resourcePermissionPersistence;
1044 @BeanReference(type = RolePersistence.class)
1045 protected RolePersistence rolePersistence;
1046 @BeanReference(type = ServiceComponentPersistence.class)
1047 protected ServiceComponentPersistence serviceComponentPersistence;
1048 @BeanReference(type = ShardPersistence.class)
1049 protected ShardPersistence shardPersistence;
1050 @BeanReference(type = SubscriptionPersistence.class)
1051 protected SubscriptionPersistence subscriptionPersistence;
1052 @BeanReference(type = TicketPersistence.class)
1053 protected TicketPersistence ticketPersistence;
1054 @BeanReference(type = TeamPersistence.class)
1055 protected TeamPersistence teamPersistence;
1056 @BeanReference(type = UserPersistence.class)
1057 protected UserPersistence userPersistence;
1058 @BeanReference(type = UserGroupPersistence.class)
1059 protected UserGroupPersistence userGroupPersistence;
1060 @BeanReference(type = UserGroupGroupRolePersistence.class)
1061 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1062 @BeanReference(type = UserGroupRolePersistence.class)
1063 protected UserGroupRolePersistence userGroupRolePersistence;
1064 @BeanReference(type = UserIdMapperPersistence.class)
1065 protected UserIdMapperPersistence userIdMapperPersistence;
1066 @BeanReference(type = UserTrackerPersistence.class)
1067 protected UserTrackerPersistence userTrackerPersistence;
1068 @BeanReference(type = UserTrackerPathPersistence.class)
1069 protected UserTrackerPathPersistence userTrackerPathPersistence;
1070 @BeanReference(type = WebDAVPropsPersistence.class)
1071 protected WebDAVPropsPersistence webDAVPropsPersistence;
1072 @BeanReference(type = WebsitePersistence.class)
1073 protected WebsitePersistence websitePersistence;
1074 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1075 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1076 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1077 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1078 private static final String _SQL_SELECT_CONTACT = "SELECT contact FROM Contact contact";
1079 private static final String _SQL_SELECT_CONTACT_WHERE = "SELECT contact FROM Contact contact WHERE ";
1080 private static final String _SQL_COUNT_CONTACT = "SELECT COUNT(contact) FROM Contact contact";
1081 private static final String _SQL_COUNT_CONTACT_WHERE = "SELECT COUNT(contact) FROM Contact contact WHERE ";
1082 private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "contact.companyId = ?";
1083 private static final String _ORDER_BY_ENTITY_ALIAS = "contact.";
1084 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Contact exists with the primary key ";
1085 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Contact exists with the key {";
1086 private static Log _log = LogFactoryUtil.getLog(ContactPersistenceImpl.class);
1087 }