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 StringBundler query = null;
448
449 if (orderByComparator != null) {
450 query = new StringBundler(3 +
451 (orderByComparator.getOrderByFields().length * 3));
452 }
453 else {
454 query = new StringBundler(2);
455 }
456
457 query.append(_SQL_SELECT_CONTACT_WHERE);
458
459 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
460
461 if (orderByComparator != null) {
462 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
463 orderByComparator);
464 }
465
466 String sql = query.toString();
467
468 Session session = null;
469
470 try {
471 session = openSession();
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 FinderCacheUtil.removeResult(FINDER_PATH_FIND_BY_COMPANYID,
487 finderArgs);
488 }
489 else {
490 cacheResult(list);
491
492 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
493 finderArgs, list);
494 }
495
496 closeSession(session);
497 }
498 }
499
500 return list;
501 }
502
503
516 public Contact findByCompanyId_First(long companyId,
517 OrderByComparator orderByComparator)
518 throws NoSuchContactException, SystemException {
519 List<Contact> list = findByCompanyId(companyId, 0, 1, orderByComparator);
520
521 if (list.isEmpty()) {
522 StringBundler msg = new StringBundler(4);
523
524 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
525
526 msg.append("companyId=");
527 msg.append(companyId);
528
529 msg.append(StringPool.CLOSE_CURLY_BRACE);
530
531 throw new NoSuchContactException(msg.toString());
532 }
533 else {
534 return list.get(0);
535 }
536 }
537
538
551 public Contact findByCompanyId_Last(long companyId,
552 OrderByComparator orderByComparator)
553 throws NoSuchContactException, SystemException {
554 int count = countByCompanyId(companyId);
555
556 List<Contact> list = findByCompanyId(companyId, count - 1, count,
557 orderByComparator);
558
559 if (list.isEmpty()) {
560 StringBundler msg = new StringBundler(4);
561
562 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
563
564 msg.append("companyId=");
565 msg.append(companyId);
566
567 msg.append(StringPool.CLOSE_CURLY_BRACE);
568
569 throw new NoSuchContactException(msg.toString());
570 }
571 else {
572 return list.get(0);
573 }
574 }
575
576
590 public Contact[] findByCompanyId_PrevAndNext(long contactId,
591 long companyId, OrderByComparator orderByComparator)
592 throws NoSuchContactException, SystemException {
593 Contact contact = findByPrimaryKey(contactId);
594
595 Session session = null;
596
597 try {
598 session = openSession();
599
600 Contact[] array = new ContactImpl[3];
601
602 array[0] = getByCompanyId_PrevAndNext(session, contact, companyId,
603 orderByComparator, true);
604
605 array[1] = contact;
606
607 array[2] = getByCompanyId_PrevAndNext(session, contact, companyId,
608 orderByComparator, false);
609
610 return array;
611 }
612 catch (Exception e) {
613 throw processException(e);
614 }
615 finally {
616 closeSession(session);
617 }
618 }
619
620 protected Contact getByCompanyId_PrevAndNext(Session session,
621 Contact contact, long companyId, OrderByComparator orderByComparator,
622 boolean previous) {
623 StringBundler query = null;
624
625 if (orderByComparator != null) {
626 query = new StringBundler(6 +
627 (orderByComparator.getOrderByFields().length * 6));
628 }
629 else {
630 query = new StringBundler(3);
631 }
632
633 query.append(_SQL_SELECT_CONTACT_WHERE);
634
635 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
636
637 if (orderByComparator != null) {
638 String[] orderByFields = orderByComparator.getOrderByFields();
639
640 if (orderByFields.length > 0) {
641 query.append(WHERE_AND);
642 }
643
644 for (int i = 0; i < orderByFields.length; i++) {
645 query.append(_ORDER_BY_ENTITY_ALIAS);
646 query.append(orderByFields[i]);
647
648 if ((i + 1) < orderByFields.length) {
649 if (orderByComparator.isAscending() ^ previous) {
650 query.append(WHERE_GREATER_THAN_HAS_NEXT);
651 }
652 else {
653 query.append(WHERE_LESSER_THAN_HAS_NEXT);
654 }
655 }
656 else {
657 if (orderByComparator.isAscending() ^ previous) {
658 query.append(WHERE_GREATER_THAN);
659 }
660 else {
661 query.append(WHERE_LESSER_THAN);
662 }
663 }
664 }
665
666 query.append(ORDER_BY_CLAUSE);
667
668 for (int i = 0; i < orderByFields.length; i++) {
669 query.append(_ORDER_BY_ENTITY_ALIAS);
670 query.append(orderByFields[i]);
671
672 if ((i + 1) < orderByFields.length) {
673 if (orderByComparator.isAscending() ^ previous) {
674 query.append(ORDER_BY_ASC_HAS_NEXT);
675 }
676 else {
677 query.append(ORDER_BY_DESC_HAS_NEXT);
678 }
679 }
680 else {
681 if (orderByComparator.isAscending() ^ previous) {
682 query.append(ORDER_BY_ASC);
683 }
684 else {
685 query.append(ORDER_BY_DESC);
686 }
687 }
688 }
689 }
690
691 String sql = query.toString();
692
693 Query q = session.createQuery(sql);
694
695 q.setFirstResult(0);
696 q.setMaxResults(2);
697
698 QueryPos qPos = QueryPos.getInstance(q);
699
700 qPos.add(companyId);
701
702 if (orderByComparator != null) {
703 Object[] values = orderByComparator.getOrderByValues(contact);
704
705 for (Object value : values) {
706 qPos.add(value);
707 }
708 }
709
710 List<Contact> list = q.list();
711
712 if (list.size() == 2) {
713 return list.get(1);
714 }
715 else {
716 return null;
717 }
718 }
719
720
726 public List<Contact> findAll() throws SystemException {
727 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
728 }
729
730
742 public List<Contact> findAll(int start, int end) throws SystemException {
743 return findAll(start, end, null);
744 }
745
746
759 public List<Contact> findAll(int start, int end,
760 OrderByComparator orderByComparator) throws SystemException {
761 Object[] finderArgs = new Object[] {
762 String.valueOf(start), String.valueOf(end),
763 String.valueOf(orderByComparator)
764 };
765
766 List<Contact> list = (List<Contact>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
767 finderArgs, this);
768
769 if (list == null) {
770 StringBundler query = null;
771 String sql = null;
772
773 if (orderByComparator != null) {
774 query = new StringBundler(2 +
775 (orderByComparator.getOrderByFields().length * 3));
776
777 query.append(_SQL_SELECT_CONTACT);
778
779 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
780 orderByComparator);
781
782 sql = query.toString();
783 }
784 else {
785 sql = _SQL_SELECT_CONTACT;
786 }
787
788 Session session = null;
789
790 try {
791 session = openSession();
792
793 Query q = session.createQuery(sql);
794
795 if (orderByComparator == null) {
796 list = (List<Contact>)QueryUtil.list(q, getDialect(),
797 start, end, false);
798
799 Collections.sort(list);
800 }
801 else {
802 list = (List<Contact>)QueryUtil.list(q, getDialect(),
803 start, end);
804 }
805 }
806 catch (Exception e) {
807 throw processException(e);
808 }
809 finally {
810 if (list == null) {
811 FinderCacheUtil.removeResult(FINDER_PATH_FIND_ALL,
812 finderArgs);
813 }
814 else {
815 cacheResult(list);
816
817 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs,
818 list);
819 }
820
821 closeSession(session);
822 }
823 }
824
825 return list;
826 }
827
828
834 public void removeByCompanyId(long companyId) throws SystemException {
835 for (Contact contact : findByCompanyId(companyId)) {
836 remove(contact);
837 }
838 }
839
840
845 public void removeAll() throws SystemException {
846 for (Contact contact : findAll()) {
847 remove(contact);
848 }
849 }
850
851
858 public int countByCompanyId(long companyId) throws SystemException {
859 Object[] finderArgs = new Object[] { companyId };
860
861 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
862 finderArgs, this);
863
864 if (count == null) {
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 Session session = null;
874
875 try {
876 session = openSession();
877
878 Query q = session.createQuery(sql);
879
880 QueryPos qPos = QueryPos.getInstance(q);
881
882 qPos.add(companyId);
883
884 count = (Long)q.uniqueResult();
885 }
886 catch (Exception e) {
887 throw processException(e);
888 }
889 finally {
890 if (count == null) {
891 count = Long.valueOf(0);
892 }
893
894 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
895 finderArgs, count);
896
897 closeSession(session);
898 }
899 }
900
901 return count.intValue();
902 }
903
904
910 public int countAll() throws SystemException {
911 Object[] finderArgs = new Object[0];
912
913 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
914 finderArgs, this);
915
916 if (count == null) {
917 Session session = null;
918
919 try {
920 session = openSession();
921
922 Query q = session.createQuery(_SQL_COUNT_CONTACT);
923
924 count = (Long)q.uniqueResult();
925 }
926 catch (Exception e) {
927 throw processException(e);
928 }
929 finally {
930 if (count == null) {
931 count = Long.valueOf(0);
932 }
933
934 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
935 count);
936
937 closeSession(session);
938 }
939 }
940
941 return count.intValue();
942 }
943
944
947 public void afterPropertiesSet() {
948 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
949 com.liferay.portal.util.PropsUtil.get(
950 "value.object.listener.com.liferay.portal.model.Contact")));
951
952 if (listenerClassNames.length > 0) {
953 try {
954 List<ModelListener<Contact>> listenersList = new ArrayList<ModelListener<Contact>>();
955
956 for (String listenerClassName : listenerClassNames) {
957 listenersList.add((ModelListener<Contact>)InstanceFactory.newInstance(
958 listenerClassName));
959 }
960
961 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
962 }
963 catch (Exception e) {
964 _log.error(e);
965 }
966 }
967 }
968
969 public void destroy() {
970 EntityCacheUtil.removeCache(ContactImpl.class.getName());
971 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
972 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
973 }
974
975 @BeanReference(type = AccountPersistence.class)
976 protected AccountPersistence accountPersistence;
977 @BeanReference(type = AddressPersistence.class)
978 protected AddressPersistence addressPersistence;
979 @BeanReference(type = BrowserTrackerPersistence.class)
980 protected BrowserTrackerPersistence browserTrackerPersistence;
981 @BeanReference(type = ClassNamePersistence.class)
982 protected ClassNamePersistence classNamePersistence;
983 @BeanReference(type = ClusterGroupPersistence.class)
984 protected ClusterGroupPersistence clusterGroupPersistence;
985 @BeanReference(type = CompanyPersistence.class)
986 protected CompanyPersistence companyPersistence;
987 @BeanReference(type = ContactPersistence.class)
988 protected ContactPersistence contactPersistence;
989 @BeanReference(type = CountryPersistence.class)
990 protected CountryPersistence countryPersistence;
991 @BeanReference(type = EmailAddressPersistence.class)
992 protected EmailAddressPersistence emailAddressPersistence;
993 @BeanReference(type = GroupPersistence.class)
994 protected GroupPersistence groupPersistence;
995 @BeanReference(type = ImagePersistence.class)
996 protected ImagePersistence imagePersistence;
997 @BeanReference(type = LayoutPersistence.class)
998 protected LayoutPersistence layoutPersistence;
999 @BeanReference(type = LayoutPrototypePersistence.class)
1000 protected LayoutPrototypePersistence layoutPrototypePersistence;
1001 @BeanReference(type = LayoutSetPersistence.class)
1002 protected LayoutSetPersistence layoutSetPersistence;
1003 @BeanReference(type = LayoutSetPrototypePersistence.class)
1004 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1005 @BeanReference(type = ListTypePersistence.class)
1006 protected ListTypePersistence listTypePersistence;
1007 @BeanReference(type = LockPersistence.class)
1008 protected LockPersistence lockPersistence;
1009 @BeanReference(type = MembershipRequestPersistence.class)
1010 protected MembershipRequestPersistence membershipRequestPersistence;
1011 @BeanReference(type = OrganizationPersistence.class)
1012 protected OrganizationPersistence organizationPersistence;
1013 @BeanReference(type = OrgGroupPermissionPersistence.class)
1014 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1015 @BeanReference(type = OrgGroupRolePersistence.class)
1016 protected OrgGroupRolePersistence orgGroupRolePersistence;
1017 @BeanReference(type = OrgLaborPersistence.class)
1018 protected OrgLaborPersistence orgLaborPersistence;
1019 @BeanReference(type = PasswordPolicyPersistence.class)
1020 protected PasswordPolicyPersistence passwordPolicyPersistence;
1021 @BeanReference(type = PasswordPolicyRelPersistence.class)
1022 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1023 @BeanReference(type = PasswordTrackerPersistence.class)
1024 protected PasswordTrackerPersistence passwordTrackerPersistence;
1025 @BeanReference(type = PermissionPersistence.class)
1026 protected PermissionPersistence permissionPersistence;
1027 @BeanReference(type = PhonePersistence.class)
1028 protected PhonePersistence phonePersistence;
1029 @BeanReference(type = PluginSettingPersistence.class)
1030 protected PluginSettingPersistence pluginSettingPersistence;
1031 @BeanReference(type = PortletPersistence.class)
1032 protected PortletPersistence portletPersistence;
1033 @BeanReference(type = PortletItemPersistence.class)
1034 protected PortletItemPersistence portletItemPersistence;
1035 @BeanReference(type = PortletPreferencesPersistence.class)
1036 protected PortletPreferencesPersistence portletPreferencesPersistence;
1037 @BeanReference(type = RegionPersistence.class)
1038 protected RegionPersistence regionPersistence;
1039 @BeanReference(type = ReleasePersistence.class)
1040 protected ReleasePersistence releasePersistence;
1041 @BeanReference(type = ResourcePersistence.class)
1042 protected ResourcePersistence resourcePersistence;
1043 @BeanReference(type = ResourceActionPersistence.class)
1044 protected ResourceActionPersistence resourceActionPersistence;
1045 @BeanReference(type = ResourceCodePersistence.class)
1046 protected ResourceCodePersistence resourceCodePersistence;
1047 @BeanReference(type = ResourcePermissionPersistence.class)
1048 protected ResourcePermissionPersistence resourcePermissionPersistence;
1049 @BeanReference(type = RolePersistence.class)
1050 protected RolePersistence rolePersistence;
1051 @BeanReference(type = ServiceComponentPersistence.class)
1052 protected ServiceComponentPersistence serviceComponentPersistence;
1053 @BeanReference(type = ShardPersistence.class)
1054 protected ShardPersistence shardPersistence;
1055 @BeanReference(type = SubscriptionPersistence.class)
1056 protected SubscriptionPersistence subscriptionPersistence;
1057 @BeanReference(type = TicketPersistence.class)
1058 protected TicketPersistence ticketPersistence;
1059 @BeanReference(type = TeamPersistence.class)
1060 protected TeamPersistence teamPersistence;
1061 @BeanReference(type = UserPersistence.class)
1062 protected UserPersistence userPersistence;
1063 @BeanReference(type = UserGroupPersistence.class)
1064 protected UserGroupPersistence userGroupPersistence;
1065 @BeanReference(type = UserGroupGroupRolePersistence.class)
1066 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1067 @BeanReference(type = UserGroupRolePersistence.class)
1068 protected UserGroupRolePersistence userGroupRolePersistence;
1069 @BeanReference(type = UserIdMapperPersistence.class)
1070 protected UserIdMapperPersistence userIdMapperPersistence;
1071 @BeanReference(type = UserTrackerPersistence.class)
1072 protected UserTrackerPersistence userTrackerPersistence;
1073 @BeanReference(type = UserTrackerPathPersistence.class)
1074 protected UserTrackerPathPersistence userTrackerPathPersistence;
1075 @BeanReference(type = WebDAVPropsPersistence.class)
1076 protected WebDAVPropsPersistence webDAVPropsPersistence;
1077 @BeanReference(type = WebsitePersistence.class)
1078 protected WebsitePersistence websitePersistence;
1079 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1080 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1081 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1082 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1083 private static final String _SQL_SELECT_CONTACT = "SELECT contact FROM Contact contact";
1084 private static final String _SQL_SELECT_CONTACT_WHERE = "SELECT contact FROM Contact contact WHERE ";
1085 private static final String _SQL_COUNT_CONTACT = "SELECT COUNT(contact) FROM Contact contact";
1086 private static final String _SQL_COUNT_CONTACT_WHERE = "SELECT COUNT(contact) FROM Contact contact WHERE ";
1087 private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "contact.companyId = ?";
1088 private static final String _ORDER_BY_ENTITY_ALIAS = "contact.";
1089 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Contact exists with the primary key ";
1090 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Contact exists with the key {";
1091 private static Log _log = LogFactoryUtil.getLog(ContactPersistenceImpl.class);
1092 }