001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.NoSuchModelException;
018 import com.liferay.portal.NoSuchUserTrackerException;
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.ModelListener;
038 import com.liferay.portal.model.UserTracker;
039 import com.liferay.portal.model.impl.UserTrackerImpl;
040 import com.liferay.portal.model.impl.UserTrackerModelImpl;
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 UserTrackerPersistenceImpl extends BasePersistenceImpl<UserTracker>
066 implements UserTrackerPersistence {
067 public static final String FINDER_CLASS_NAME_ENTITY = UserTrackerImpl.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(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
071 UserTrackerModelImpl.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(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
080 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
081 "countByCompanyId", new String[] { Long.class.getName() });
082 public static final FinderPath FINDER_PATH_FIND_BY_USERID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
083 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
084 "findByUserId",
085 new String[] {
086 Long.class.getName(),
087
088 "java.lang.Integer", "java.lang.Integer",
089 "com.liferay.portal.kernel.util.OrderByComparator"
090 });
091 public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
092 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
093 "countByUserId", new String[] { Long.class.getName() });
094 public static final FinderPath FINDER_PATH_FIND_BY_SESSIONID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
095 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
096 "findBySessionId",
097 new String[] {
098 String.class.getName(),
099
100 "java.lang.Integer", "java.lang.Integer",
101 "com.liferay.portal.kernel.util.OrderByComparator"
102 });
103 public static final FinderPath FINDER_PATH_COUNT_BY_SESSIONID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
104 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
105 "countBySessionId", new String[] { String.class.getName() });
106 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
107 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
108 "findAll", new String[0]);
109 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
110 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
111 "countAll", new String[0]);
112
113
118 public void cacheResult(UserTracker userTracker) {
119 EntityCacheUtil.putResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
120 UserTrackerImpl.class, userTracker.getPrimaryKey(), userTracker);
121 }
122
123
128 public void cacheResult(List<UserTracker> userTrackers) {
129 for (UserTracker userTracker : userTrackers) {
130 if (EntityCacheUtil.getResult(
131 UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
132 UserTrackerImpl.class, userTracker.getPrimaryKey(), this) == null) {
133 cacheResult(userTracker);
134 }
135 }
136 }
137
138
145 public void clearCache() {
146 CacheRegistryUtil.clear(UserTrackerImpl.class.getName());
147 EntityCacheUtil.clearCache(UserTrackerImpl.class.getName());
148 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
149 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
150 }
151
152
159 public void clearCache(UserTracker userTracker) {
160 EntityCacheUtil.removeResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
161 UserTrackerImpl.class, userTracker.getPrimaryKey());
162 }
163
164
170 public UserTracker create(long userTrackerId) {
171 UserTracker userTracker = new UserTrackerImpl();
172
173 userTracker.setNew(true);
174 userTracker.setPrimaryKey(userTrackerId);
175
176 return userTracker;
177 }
178
179
187 public UserTracker remove(Serializable primaryKey)
188 throws NoSuchModelException, SystemException {
189 return remove(((Long)primaryKey).longValue());
190 }
191
192
200 public UserTracker remove(long userTrackerId)
201 throws NoSuchUserTrackerException, SystemException {
202 Session session = null;
203
204 try {
205 session = openSession();
206
207 UserTracker userTracker = (UserTracker)session.get(UserTrackerImpl.class,
208 new Long(userTrackerId));
209
210 if (userTracker == null) {
211 if (_log.isWarnEnabled()) {
212 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + userTrackerId);
213 }
214
215 throw new NoSuchUserTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
216 userTrackerId);
217 }
218
219 return remove(userTracker);
220 }
221 catch (NoSuchUserTrackerException nsee) {
222 throw nsee;
223 }
224 catch (Exception e) {
225 throw processException(e);
226 }
227 finally {
228 closeSession(session);
229 }
230 }
231
232 protected UserTracker removeImpl(UserTracker userTracker)
233 throws SystemException {
234 userTracker = toUnwrappedModel(userTracker);
235
236 Session session = null;
237
238 try {
239 session = openSession();
240
241 BatchSessionUtil.delete(session, userTracker);
242 }
243 catch (Exception e) {
244 throw processException(e);
245 }
246 finally {
247 closeSession(session);
248 }
249
250 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
251
252 EntityCacheUtil.removeResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
253 UserTrackerImpl.class, userTracker.getPrimaryKey());
254
255 return userTracker;
256 }
257
258 public UserTracker updateImpl(
259 com.liferay.portal.model.UserTracker userTracker, boolean merge)
260 throws SystemException {
261 userTracker = toUnwrappedModel(userTracker);
262
263 Session session = null;
264
265 try {
266 session = openSession();
267
268 BatchSessionUtil.update(session, userTracker, merge);
269
270 userTracker.setNew(false);
271 }
272 catch (Exception e) {
273 throw processException(e);
274 }
275 finally {
276 closeSession(session);
277 }
278
279 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
280
281 EntityCacheUtil.putResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
282 UserTrackerImpl.class, userTracker.getPrimaryKey(), userTracker);
283
284 return userTracker;
285 }
286
287 protected UserTracker toUnwrappedModel(UserTracker userTracker) {
288 if (userTracker instanceof UserTrackerImpl) {
289 return userTracker;
290 }
291
292 UserTrackerImpl userTrackerImpl = new UserTrackerImpl();
293
294 userTrackerImpl.setNew(userTracker.isNew());
295 userTrackerImpl.setPrimaryKey(userTracker.getPrimaryKey());
296
297 userTrackerImpl.setUserTrackerId(userTracker.getUserTrackerId());
298 userTrackerImpl.setCompanyId(userTracker.getCompanyId());
299 userTrackerImpl.setUserId(userTracker.getUserId());
300 userTrackerImpl.setModifiedDate(userTracker.getModifiedDate());
301 userTrackerImpl.setSessionId(userTracker.getSessionId());
302 userTrackerImpl.setRemoteAddr(userTracker.getRemoteAddr());
303 userTrackerImpl.setRemoteHost(userTracker.getRemoteHost());
304 userTrackerImpl.setUserAgent(userTracker.getUserAgent());
305
306 return userTrackerImpl;
307 }
308
309
317 public UserTracker findByPrimaryKey(Serializable primaryKey)
318 throws NoSuchModelException, SystemException {
319 return findByPrimaryKey(((Long)primaryKey).longValue());
320 }
321
322
330 public UserTracker findByPrimaryKey(long userTrackerId)
331 throws NoSuchUserTrackerException, SystemException {
332 UserTracker userTracker = fetchByPrimaryKey(userTrackerId);
333
334 if (userTracker == null) {
335 if (_log.isWarnEnabled()) {
336 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + userTrackerId);
337 }
338
339 throw new NoSuchUserTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
340 userTrackerId);
341 }
342
343 return userTracker;
344 }
345
346
353 public UserTracker fetchByPrimaryKey(Serializable primaryKey)
354 throws SystemException {
355 return fetchByPrimaryKey(((Long)primaryKey).longValue());
356 }
357
358
365 public UserTracker fetchByPrimaryKey(long userTrackerId)
366 throws SystemException {
367 UserTracker userTracker = (UserTracker)EntityCacheUtil.getResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
368 UserTrackerImpl.class, userTrackerId, this);
369
370 if (userTracker == null) {
371 Session session = null;
372
373 try {
374 session = openSession();
375
376 userTracker = (UserTracker)session.get(UserTrackerImpl.class,
377 new Long(userTrackerId));
378 }
379 catch (Exception e) {
380 throw processException(e);
381 }
382 finally {
383 if (userTracker != null) {
384 cacheResult(userTracker);
385 }
386
387 closeSession(session);
388 }
389 }
390
391 return userTracker;
392 }
393
394
401 public List<UserTracker> findByCompanyId(long companyId)
402 throws SystemException {
403 return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
404 null);
405 }
406
407
420 public List<UserTracker> findByCompanyId(long companyId, int start, int end)
421 throws SystemException {
422 return findByCompanyId(companyId, start, end, null);
423 }
424
425
439 public List<UserTracker> findByCompanyId(long companyId, int start,
440 int end, OrderByComparator orderByComparator) throws SystemException {
441 Object[] finderArgs = new Object[] {
442 companyId,
443
444 String.valueOf(start), String.valueOf(end),
445 String.valueOf(orderByComparator)
446 };
447
448 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COMPANYID,
449 finderArgs, this);
450
451 if (list == null) {
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_USERTRACKER_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 Session session = null;
474
475 try {
476 session = openSession();
477
478 Query q = session.createQuery(sql);
479
480 QueryPos qPos = QueryPos.getInstance(q);
481
482 qPos.add(companyId);
483
484 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
485 start, end);
486 }
487 catch (Exception e) {
488 throw processException(e);
489 }
490 finally {
491 if (list == null) {
492 FinderCacheUtil.removeResult(FINDER_PATH_FIND_BY_COMPANYID,
493 finderArgs);
494 }
495 else {
496 cacheResult(list);
497
498 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
499 finderArgs, list);
500 }
501
502 closeSession(session);
503 }
504 }
505
506 return list;
507 }
508
509
522 public UserTracker findByCompanyId_First(long companyId,
523 OrderByComparator orderByComparator)
524 throws NoSuchUserTrackerException, SystemException {
525 List<UserTracker> list = findByCompanyId(companyId, 0, 1,
526 orderByComparator);
527
528 if (list.isEmpty()) {
529 StringBundler msg = new StringBundler(4);
530
531 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
532
533 msg.append("companyId=");
534 msg.append(companyId);
535
536 msg.append(StringPool.CLOSE_CURLY_BRACE);
537
538 throw new NoSuchUserTrackerException(msg.toString());
539 }
540 else {
541 return list.get(0);
542 }
543 }
544
545
558 public UserTracker findByCompanyId_Last(long companyId,
559 OrderByComparator orderByComparator)
560 throws NoSuchUserTrackerException, SystemException {
561 int count = countByCompanyId(companyId);
562
563 List<UserTracker> list = findByCompanyId(companyId, count - 1, count,
564 orderByComparator);
565
566 if (list.isEmpty()) {
567 StringBundler msg = new StringBundler(4);
568
569 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
570
571 msg.append("companyId=");
572 msg.append(companyId);
573
574 msg.append(StringPool.CLOSE_CURLY_BRACE);
575
576 throw new NoSuchUserTrackerException(msg.toString());
577 }
578 else {
579 return list.get(0);
580 }
581 }
582
583
597 public UserTracker[] findByCompanyId_PrevAndNext(long userTrackerId,
598 long companyId, OrderByComparator orderByComparator)
599 throws NoSuchUserTrackerException, SystemException {
600 UserTracker userTracker = findByPrimaryKey(userTrackerId);
601
602 Session session = null;
603
604 try {
605 session = openSession();
606
607 UserTracker[] array = new UserTrackerImpl[3];
608
609 array[0] = getByCompanyId_PrevAndNext(session, userTracker,
610 companyId, orderByComparator, true);
611
612 array[1] = userTracker;
613
614 array[2] = getByCompanyId_PrevAndNext(session, userTracker,
615 companyId, orderByComparator, false);
616
617 return array;
618 }
619 catch (Exception e) {
620 throw processException(e);
621 }
622 finally {
623 closeSession(session);
624 }
625 }
626
627 protected UserTracker getByCompanyId_PrevAndNext(Session session,
628 UserTracker userTracker, long companyId,
629 OrderByComparator orderByComparator, boolean previous) {
630 StringBundler query = null;
631
632 if (orderByComparator != null) {
633 query = new StringBundler(6 +
634 (orderByComparator.getOrderByFields().length * 6));
635 }
636 else {
637 query = new StringBundler(3);
638 }
639
640 query.append(_SQL_SELECT_USERTRACKER_WHERE);
641
642 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
643
644 if (orderByComparator != null) {
645 String[] orderByFields = orderByComparator.getOrderByFields();
646
647 if (orderByFields.length > 0) {
648 query.append(WHERE_AND);
649 }
650
651 for (int i = 0; i < orderByFields.length; i++) {
652 query.append(_ORDER_BY_ENTITY_ALIAS);
653 query.append(orderByFields[i]);
654
655 if ((i + 1) < orderByFields.length) {
656 if (orderByComparator.isAscending() ^ previous) {
657 query.append(WHERE_GREATER_THAN_HAS_NEXT);
658 }
659 else {
660 query.append(WHERE_LESSER_THAN_HAS_NEXT);
661 }
662 }
663 else {
664 if (orderByComparator.isAscending() ^ previous) {
665 query.append(WHERE_GREATER_THAN);
666 }
667 else {
668 query.append(WHERE_LESSER_THAN);
669 }
670 }
671 }
672
673 query.append(ORDER_BY_CLAUSE);
674
675 for (int i = 0; i < orderByFields.length; i++) {
676 query.append(_ORDER_BY_ENTITY_ALIAS);
677 query.append(orderByFields[i]);
678
679 if ((i + 1) < orderByFields.length) {
680 if (orderByComparator.isAscending() ^ previous) {
681 query.append(ORDER_BY_ASC_HAS_NEXT);
682 }
683 else {
684 query.append(ORDER_BY_DESC_HAS_NEXT);
685 }
686 }
687 else {
688 if (orderByComparator.isAscending() ^ previous) {
689 query.append(ORDER_BY_ASC);
690 }
691 else {
692 query.append(ORDER_BY_DESC);
693 }
694 }
695 }
696 }
697
698 String sql = query.toString();
699
700 Query q = session.createQuery(sql);
701
702 q.setFirstResult(0);
703 q.setMaxResults(2);
704
705 QueryPos qPos = QueryPos.getInstance(q);
706
707 qPos.add(companyId);
708
709 if (orderByComparator != null) {
710 Object[] values = orderByComparator.getOrderByValues(userTracker);
711
712 for (Object value : values) {
713 qPos.add(value);
714 }
715 }
716
717 List<UserTracker> list = q.list();
718
719 if (list.size() == 2) {
720 return list.get(1);
721 }
722 else {
723 return null;
724 }
725 }
726
727
734 public List<UserTracker> findByUserId(long userId)
735 throws SystemException {
736 return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
737 }
738
739
752 public List<UserTracker> findByUserId(long userId, int start, int end)
753 throws SystemException {
754 return findByUserId(userId, start, end, null);
755 }
756
757
771 public List<UserTracker> findByUserId(long userId, int start, int end,
772 OrderByComparator orderByComparator) throws SystemException {
773 Object[] finderArgs = new Object[] {
774 userId,
775
776 String.valueOf(start), String.valueOf(end),
777 String.valueOf(orderByComparator)
778 };
779
780 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_USERID,
781 finderArgs, this);
782
783 if (list == null) {
784 StringBundler query = null;
785
786 if (orderByComparator != null) {
787 query = new StringBundler(3 +
788 (orderByComparator.getOrderByFields().length * 3));
789 }
790 else {
791 query = new StringBundler(2);
792 }
793
794 query.append(_SQL_SELECT_USERTRACKER_WHERE);
795
796 query.append(_FINDER_COLUMN_USERID_USERID_2);
797
798 if (orderByComparator != null) {
799 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
800 orderByComparator);
801 }
802
803 String sql = query.toString();
804
805 Session session = null;
806
807 try {
808 session = openSession();
809
810 Query q = session.createQuery(sql);
811
812 QueryPos qPos = QueryPos.getInstance(q);
813
814 qPos.add(userId);
815
816 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
817 start, end);
818 }
819 catch (Exception e) {
820 throw processException(e);
821 }
822 finally {
823 if (list == null) {
824 FinderCacheUtil.removeResult(FINDER_PATH_FIND_BY_USERID,
825 finderArgs);
826 }
827 else {
828 cacheResult(list);
829
830 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_USERID,
831 finderArgs, list);
832 }
833
834 closeSession(session);
835 }
836 }
837
838 return list;
839 }
840
841
854 public UserTracker findByUserId_First(long userId,
855 OrderByComparator orderByComparator)
856 throws NoSuchUserTrackerException, SystemException {
857 List<UserTracker> list = findByUserId(userId, 0, 1, orderByComparator);
858
859 if (list.isEmpty()) {
860 StringBundler msg = new StringBundler(4);
861
862 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
863
864 msg.append("userId=");
865 msg.append(userId);
866
867 msg.append(StringPool.CLOSE_CURLY_BRACE);
868
869 throw new NoSuchUserTrackerException(msg.toString());
870 }
871 else {
872 return list.get(0);
873 }
874 }
875
876
889 public UserTracker findByUserId_Last(long userId,
890 OrderByComparator orderByComparator)
891 throws NoSuchUserTrackerException, SystemException {
892 int count = countByUserId(userId);
893
894 List<UserTracker> list = findByUserId(userId, count - 1, count,
895 orderByComparator);
896
897 if (list.isEmpty()) {
898 StringBundler msg = new StringBundler(4);
899
900 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
901
902 msg.append("userId=");
903 msg.append(userId);
904
905 msg.append(StringPool.CLOSE_CURLY_BRACE);
906
907 throw new NoSuchUserTrackerException(msg.toString());
908 }
909 else {
910 return list.get(0);
911 }
912 }
913
914
928 public UserTracker[] findByUserId_PrevAndNext(long userTrackerId,
929 long userId, OrderByComparator orderByComparator)
930 throws NoSuchUserTrackerException, SystemException {
931 UserTracker userTracker = findByPrimaryKey(userTrackerId);
932
933 Session session = null;
934
935 try {
936 session = openSession();
937
938 UserTracker[] array = new UserTrackerImpl[3];
939
940 array[0] = getByUserId_PrevAndNext(session, userTracker, userId,
941 orderByComparator, true);
942
943 array[1] = userTracker;
944
945 array[2] = getByUserId_PrevAndNext(session, userTracker, userId,
946 orderByComparator, false);
947
948 return array;
949 }
950 catch (Exception e) {
951 throw processException(e);
952 }
953 finally {
954 closeSession(session);
955 }
956 }
957
958 protected UserTracker getByUserId_PrevAndNext(Session session,
959 UserTracker userTracker, long userId,
960 OrderByComparator orderByComparator, boolean previous) {
961 StringBundler query = null;
962
963 if (orderByComparator != null) {
964 query = new StringBundler(6 +
965 (orderByComparator.getOrderByFields().length * 6));
966 }
967 else {
968 query = new StringBundler(3);
969 }
970
971 query.append(_SQL_SELECT_USERTRACKER_WHERE);
972
973 query.append(_FINDER_COLUMN_USERID_USERID_2);
974
975 if (orderByComparator != null) {
976 String[] orderByFields = orderByComparator.getOrderByFields();
977
978 if (orderByFields.length > 0) {
979 query.append(WHERE_AND);
980 }
981
982 for (int i = 0; i < orderByFields.length; i++) {
983 query.append(_ORDER_BY_ENTITY_ALIAS);
984 query.append(orderByFields[i]);
985
986 if ((i + 1) < orderByFields.length) {
987 if (orderByComparator.isAscending() ^ previous) {
988 query.append(WHERE_GREATER_THAN_HAS_NEXT);
989 }
990 else {
991 query.append(WHERE_LESSER_THAN_HAS_NEXT);
992 }
993 }
994 else {
995 if (orderByComparator.isAscending() ^ previous) {
996 query.append(WHERE_GREATER_THAN);
997 }
998 else {
999 query.append(WHERE_LESSER_THAN);
1000 }
1001 }
1002 }
1003
1004 query.append(ORDER_BY_CLAUSE);
1005
1006 for (int i = 0; i < orderByFields.length; i++) {
1007 query.append(_ORDER_BY_ENTITY_ALIAS);
1008 query.append(orderByFields[i]);
1009
1010 if ((i + 1) < orderByFields.length) {
1011 if (orderByComparator.isAscending() ^ previous) {
1012 query.append(ORDER_BY_ASC_HAS_NEXT);
1013 }
1014 else {
1015 query.append(ORDER_BY_DESC_HAS_NEXT);
1016 }
1017 }
1018 else {
1019 if (orderByComparator.isAscending() ^ previous) {
1020 query.append(ORDER_BY_ASC);
1021 }
1022 else {
1023 query.append(ORDER_BY_DESC);
1024 }
1025 }
1026 }
1027 }
1028
1029 String sql = query.toString();
1030
1031 Query q = session.createQuery(sql);
1032
1033 q.setFirstResult(0);
1034 q.setMaxResults(2);
1035
1036 QueryPos qPos = QueryPos.getInstance(q);
1037
1038 qPos.add(userId);
1039
1040 if (orderByComparator != null) {
1041 Object[] values = orderByComparator.getOrderByValues(userTracker);
1042
1043 for (Object value : values) {
1044 qPos.add(value);
1045 }
1046 }
1047
1048 List<UserTracker> list = q.list();
1049
1050 if (list.size() == 2) {
1051 return list.get(1);
1052 }
1053 else {
1054 return null;
1055 }
1056 }
1057
1058
1065 public List<UserTracker> findBySessionId(String sessionId)
1066 throws SystemException {
1067 return findBySessionId(sessionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
1068 null);
1069 }
1070
1071
1084 public List<UserTracker> findBySessionId(String sessionId, int start,
1085 int end) throws SystemException {
1086 return findBySessionId(sessionId, start, end, null);
1087 }
1088
1089
1103 public List<UserTracker> findBySessionId(String sessionId, int start,
1104 int end, OrderByComparator orderByComparator) throws SystemException {
1105 Object[] finderArgs = new Object[] {
1106 sessionId,
1107
1108 String.valueOf(start), String.valueOf(end),
1109 String.valueOf(orderByComparator)
1110 };
1111
1112 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_SESSIONID,
1113 finderArgs, this);
1114
1115 if (list == null) {
1116 StringBundler query = null;
1117
1118 if (orderByComparator != null) {
1119 query = new StringBundler(3 +
1120 (orderByComparator.getOrderByFields().length * 3));
1121 }
1122 else {
1123 query = new StringBundler(2);
1124 }
1125
1126 query.append(_SQL_SELECT_USERTRACKER_WHERE);
1127
1128 if (sessionId == null) {
1129 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1130 }
1131 else {
1132 if (sessionId.equals(StringPool.BLANK)) {
1133 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1134 }
1135 else {
1136 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1137 }
1138 }
1139
1140 if (orderByComparator != null) {
1141 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1142 orderByComparator);
1143 }
1144
1145 String sql = query.toString();
1146
1147 Session session = null;
1148
1149 try {
1150 session = openSession();
1151
1152 Query q = session.createQuery(sql);
1153
1154 QueryPos qPos = QueryPos.getInstance(q);
1155
1156 if (sessionId != null) {
1157 qPos.add(sessionId);
1158 }
1159
1160 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1161 start, end);
1162 }
1163 catch (Exception e) {
1164 throw processException(e);
1165 }
1166 finally {
1167 if (list == null) {
1168 FinderCacheUtil.removeResult(FINDER_PATH_FIND_BY_SESSIONID,
1169 finderArgs);
1170 }
1171 else {
1172 cacheResult(list);
1173
1174 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_SESSIONID,
1175 finderArgs, list);
1176 }
1177
1178 closeSession(session);
1179 }
1180 }
1181
1182 return list;
1183 }
1184
1185
1198 public UserTracker findBySessionId_First(String sessionId,
1199 OrderByComparator orderByComparator)
1200 throws NoSuchUserTrackerException, SystemException {
1201 List<UserTracker> list = findBySessionId(sessionId, 0, 1,
1202 orderByComparator);
1203
1204 if (list.isEmpty()) {
1205 StringBundler msg = new StringBundler(4);
1206
1207 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
1208
1209 msg.append("sessionId=");
1210 msg.append(sessionId);
1211
1212 msg.append(StringPool.CLOSE_CURLY_BRACE);
1213
1214 throw new NoSuchUserTrackerException(msg.toString());
1215 }
1216 else {
1217 return list.get(0);
1218 }
1219 }
1220
1221
1234 public UserTracker findBySessionId_Last(String sessionId,
1235 OrderByComparator orderByComparator)
1236 throws NoSuchUserTrackerException, SystemException {
1237 int count = countBySessionId(sessionId);
1238
1239 List<UserTracker> list = findBySessionId(sessionId, count - 1, count,
1240 orderByComparator);
1241
1242 if (list.isEmpty()) {
1243 StringBundler msg = new StringBundler(4);
1244
1245 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
1246
1247 msg.append("sessionId=");
1248 msg.append(sessionId);
1249
1250 msg.append(StringPool.CLOSE_CURLY_BRACE);
1251
1252 throw new NoSuchUserTrackerException(msg.toString());
1253 }
1254 else {
1255 return list.get(0);
1256 }
1257 }
1258
1259
1273 public UserTracker[] findBySessionId_PrevAndNext(long userTrackerId,
1274 String sessionId, OrderByComparator orderByComparator)
1275 throws NoSuchUserTrackerException, SystemException {
1276 UserTracker userTracker = findByPrimaryKey(userTrackerId);
1277
1278 Session session = null;
1279
1280 try {
1281 session = openSession();
1282
1283 UserTracker[] array = new UserTrackerImpl[3];
1284
1285 array[0] = getBySessionId_PrevAndNext(session, userTracker,
1286 sessionId, orderByComparator, true);
1287
1288 array[1] = userTracker;
1289
1290 array[2] = getBySessionId_PrevAndNext(session, userTracker,
1291 sessionId, orderByComparator, false);
1292
1293 return array;
1294 }
1295 catch (Exception e) {
1296 throw processException(e);
1297 }
1298 finally {
1299 closeSession(session);
1300 }
1301 }
1302
1303 protected UserTracker getBySessionId_PrevAndNext(Session session,
1304 UserTracker userTracker, String sessionId,
1305 OrderByComparator orderByComparator, boolean previous) {
1306 StringBundler query = null;
1307
1308 if (orderByComparator != null) {
1309 query = new StringBundler(6 +
1310 (orderByComparator.getOrderByFields().length * 6));
1311 }
1312 else {
1313 query = new StringBundler(3);
1314 }
1315
1316 query.append(_SQL_SELECT_USERTRACKER_WHERE);
1317
1318 if (sessionId == null) {
1319 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1320 }
1321 else {
1322 if (sessionId.equals(StringPool.BLANK)) {
1323 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1324 }
1325 else {
1326 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1327 }
1328 }
1329
1330 if (orderByComparator != null) {
1331 String[] orderByFields = orderByComparator.getOrderByFields();
1332
1333 if (orderByFields.length > 0) {
1334 query.append(WHERE_AND);
1335 }
1336
1337 for (int i = 0; i < orderByFields.length; i++) {
1338 query.append(_ORDER_BY_ENTITY_ALIAS);
1339 query.append(orderByFields[i]);
1340
1341 if ((i + 1) < orderByFields.length) {
1342 if (orderByComparator.isAscending() ^ previous) {
1343 query.append(WHERE_GREATER_THAN_HAS_NEXT);
1344 }
1345 else {
1346 query.append(WHERE_LESSER_THAN_HAS_NEXT);
1347 }
1348 }
1349 else {
1350 if (orderByComparator.isAscending() ^ previous) {
1351 query.append(WHERE_GREATER_THAN);
1352 }
1353 else {
1354 query.append(WHERE_LESSER_THAN);
1355 }
1356 }
1357 }
1358
1359 query.append(ORDER_BY_CLAUSE);
1360
1361 for (int i = 0; i < orderByFields.length; i++) {
1362 query.append(_ORDER_BY_ENTITY_ALIAS);
1363 query.append(orderByFields[i]);
1364
1365 if ((i + 1) < orderByFields.length) {
1366 if (orderByComparator.isAscending() ^ previous) {
1367 query.append(ORDER_BY_ASC_HAS_NEXT);
1368 }
1369 else {
1370 query.append(ORDER_BY_DESC_HAS_NEXT);
1371 }
1372 }
1373 else {
1374 if (orderByComparator.isAscending() ^ previous) {
1375 query.append(ORDER_BY_ASC);
1376 }
1377 else {
1378 query.append(ORDER_BY_DESC);
1379 }
1380 }
1381 }
1382 }
1383
1384 String sql = query.toString();
1385
1386 Query q = session.createQuery(sql);
1387
1388 q.setFirstResult(0);
1389 q.setMaxResults(2);
1390
1391 QueryPos qPos = QueryPos.getInstance(q);
1392
1393 if (sessionId != null) {
1394 qPos.add(sessionId);
1395 }
1396
1397 if (orderByComparator != null) {
1398 Object[] values = orderByComparator.getOrderByValues(userTracker);
1399
1400 for (Object value : values) {
1401 qPos.add(value);
1402 }
1403 }
1404
1405 List<UserTracker> list = q.list();
1406
1407 if (list.size() == 2) {
1408 return list.get(1);
1409 }
1410 else {
1411 return null;
1412 }
1413 }
1414
1415
1421 public List<UserTracker> findAll() throws SystemException {
1422 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1423 }
1424
1425
1437 public List<UserTracker> findAll(int start, int end)
1438 throws SystemException {
1439 return findAll(start, end, null);
1440 }
1441
1442
1455 public List<UserTracker> findAll(int start, int end,
1456 OrderByComparator orderByComparator) throws SystemException {
1457 Object[] finderArgs = new Object[] {
1458 String.valueOf(start), String.valueOf(end),
1459 String.valueOf(orderByComparator)
1460 };
1461
1462 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1463 finderArgs, this);
1464
1465 if (list == null) {
1466 StringBundler query = null;
1467 String sql = null;
1468
1469 if (orderByComparator != null) {
1470 query = new StringBundler(2 +
1471 (orderByComparator.getOrderByFields().length * 3));
1472
1473 query.append(_SQL_SELECT_USERTRACKER);
1474
1475 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1476 orderByComparator);
1477
1478 sql = query.toString();
1479 }
1480 else {
1481 sql = _SQL_SELECT_USERTRACKER;
1482 }
1483
1484 Session session = null;
1485
1486 try {
1487 session = openSession();
1488
1489 Query q = session.createQuery(sql);
1490
1491 if (orderByComparator == null) {
1492 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1493 start, end, false);
1494
1495 Collections.sort(list);
1496 }
1497 else {
1498 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1499 start, end);
1500 }
1501 }
1502 catch (Exception e) {
1503 throw processException(e);
1504 }
1505 finally {
1506 if (list == null) {
1507 FinderCacheUtil.removeResult(FINDER_PATH_FIND_ALL,
1508 finderArgs);
1509 }
1510 else {
1511 cacheResult(list);
1512
1513 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs,
1514 list);
1515 }
1516
1517 closeSession(session);
1518 }
1519 }
1520
1521 return list;
1522 }
1523
1524
1530 public void removeByCompanyId(long companyId) throws SystemException {
1531 for (UserTracker userTracker : findByCompanyId(companyId)) {
1532 remove(userTracker);
1533 }
1534 }
1535
1536
1542 public void removeByUserId(long userId) throws SystemException {
1543 for (UserTracker userTracker : findByUserId(userId)) {
1544 remove(userTracker);
1545 }
1546 }
1547
1548
1554 public void removeBySessionId(String sessionId) throws SystemException {
1555 for (UserTracker userTracker : findBySessionId(sessionId)) {
1556 remove(userTracker);
1557 }
1558 }
1559
1560
1565 public void removeAll() throws SystemException {
1566 for (UserTracker userTracker : findAll()) {
1567 remove(userTracker);
1568 }
1569 }
1570
1571
1578 public int countByCompanyId(long companyId) throws SystemException {
1579 Object[] finderArgs = new Object[] { companyId };
1580
1581 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
1582 finderArgs, this);
1583
1584 if (count == null) {
1585 StringBundler query = new StringBundler(2);
1586
1587 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1588
1589 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
1590
1591 String sql = query.toString();
1592
1593 Session session = null;
1594
1595 try {
1596 session = openSession();
1597
1598 Query q = session.createQuery(sql);
1599
1600 QueryPos qPos = QueryPos.getInstance(q);
1601
1602 qPos.add(companyId);
1603
1604 count = (Long)q.uniqueResult();
1605 }
1606 catch (Exception e) {
1607 throw processException(e);
1608 }
1609 finally {
1610 if (count == null) {
1611 count = Long.valueOf(0);
1612 }
1613
1614 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
1615 finderArgs, count);
1616
1617 closeSession(session);
1618 }
1619 }
1620
1621 return count.intValue();
1622 }
1623
1624
1631 public int countByUserId(long userId) throws SystemException {
1632 Object[] finderArgs = new Object[] { userId };
1633
1634 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERID,
1635 finderArgs, this);
1636
1637 if (count == null) {
1638 StringBundler query = new StringBundler(2);
1639
1640 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1641
1642 query.append(_FINDER_COLUMN_USERID_USERID_2);
1643
1644 String sql = query.toString();
1645
1646 Session session = null;
1647
1648 try {
1649 session = openSession();
1650
1651 Query q = session.createQuery(sql);
1652
1653 QueryPos qPos = QueryPos.getInstance(q);
1654
1655 qPos.add(userId);
1656
1657 count = (Long)q.uniqueResult();
1658 }
1659 catch (Exception e) {
1660 throw processException(e);
1661 }
1662 finally {
1663 if (count == null) {
1664 count = Long.valueOf(0);
1665 }
1666
1667 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERID,
1668 finderArgs, count);
1669
1670 closeSession(session);
1671 }
1672 }
1673
1674 return count.intValue();
1675 }
1676
1677
1684 public int countBySessionId(String sessionId) throws SystemException {
1685 Object[] finderArgs = new Object[] { sessionId };
1686
1687 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_SESSIONID,
1688 finderArgs, this);
1689
1690 if (count == null) {
1691 StringBundler query = new StringBundler(2);
1692
1693 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1694
1695 if (sessionId == null) {
1696 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1697 }
1698 else {
1699 if (sessionId.equals(StringPool.BLANK)) {
1700 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1701 }
1702 else {
1703 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1704 }
1705 }
1706
1707 String sql = query.toString();
1708
1709 Session session = null;
1710
1711 try {
1712 session = openSession();
1713
1714 Query q = session.createQuery(sql);
1715
1716 QueryPos qPos = QueryPos.getInstance(q);
1717
1718 if (sessionId != null) {
1719 qPos.add(sessionId);
1720 }
1721
1722 count = (Long)q.uniqueResult();
1723 }
1724 catch (Exception e) {
1725 throw processException(e);
1726 }
1727 finally {
1728 if (count == null) {
1729 count = Long.valueOf(0);
1730 }
1731
1732 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_SESSIONID,
1733 finderArgs, count);
1734
1735 closeSession(session);
1736 }
1737 }
1738
1739 return count.intValue();
1740 }
1741
1742
1748 public int countAll() throws SystemException {
1749 Object[] finderArgs = new Object[0];
1750
1751 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1752 finderArgs, this);
1753
1754 if (count == null) {
1755 Session session = null;
1756
1757 try {
1758 session = openSession();
1759
1760 Query q = session.createQuery(_SQL_COUNT_USERTRACKER);
1761
1762 count = (Long)q.uniqueResult();
1763 }
1764 catch (Exception e) {
1765 throw processException(e);
1766 }
1767 finally {
1768 if (count == null) {
1769 count = Long.valueOf(0);
1770 }
1771
1772 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1773 count);
1774
1775 closeSession(session);
1776 }
1777 }
1778
1779 return count.intValue();
1780 }
1781
1782
1785 public void afterPropertiesSet() {
1786 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1787 com.liferay.portal.util.PropsUtil.get(
1788 "value.object.listener.com.liferay.portal.model.UserTracker")));
1789
1790 if (listenerClassNames.length > 0) {
1791 try {
1792 List<ModelListener<UserTracker>> listenersList = new ArrayList<ModelListener<UserTracker>>();
1793
1794 for (String listenerClassName : listenerClassNames) {
1795 listenersList.add((ModelListener<UserTracker>)InstanceFactory.newInstance(
1796 listenerClassName));
1797 }
1798
1799 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1800 }
1801 catch (Exception e) {
1802 _log.error(e);
1803 }
1804 }
1805 }
1806
1807 public void destroy() {
1808 EntityCacheUtil.removeCache(UserTrackerImpl.class.getName());
1809 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
1810 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
1811 }
1812
1813 @BeanReference(type = AccountPersistence.class)
1814 protected AccountPersistence accountPersistence;
1815 @BeanReference(type = AddressPersistence.class)
1816 protected AddressPersistence addressPersistence;
1817 @BeanReference(type = BrowserTrackerPersistence.class)
1818 protected BrowserTrackerPersistence browserTrackerPersistence;
1819 @BeanReference(type = ClassNamePersistence.class)
1820 protected ClassNamePersistence classNamePersistence;
1821 @BeanReference(type = ClusterGroupPersistence.class)
1822 protected ClusterGroupPersistence clusterGroupPersistence;
1823 @BeanReference(type = CompanyPersistence.class)
1824 protected CompanyPersistence companyPersistence;
1825 @BeanReference(type = ContactPersistence.class)
1826 protected ContactPersistence contactPersistence;
1827 @BeanReference(type = CountryPersistence.class)
1828 protected CountryPersistence countryPersistence;
1829 @BeanReference(type = EmailAddressPersistence.class)
1830 protected EmailAddressPersistence emailAddressPersistence;
1831 @BeanReference(type = GroupPersistence.class)
1832 protected GroupPersistence groupPersistence;
1833 @BeanReference(type = ImagePersistence.class)
1834 protected ImagePersistence imagePersistence;
1835 @BeanReference(type = LayoutPersistence.class)
1836 protected LayoutPersistence layoutPersistence;
1837 @BeanReference(type = LayoutPrototypePersistence.class)
1838 protected LayoutPrototypePersistence layoutPrototypePersistence;
1839 @BeanReference(type = LayoutSetPersistence.class)
1840 protected LayoutSetPersistence layoutSetPersistence;
1841 @BeanReference(type = LayoutSetPrototypePersistence.class)
1842 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1843 @BeanReference(type = ListTypePersistence.class)
1844 protected ListTypePersistence listTypePersistence;
1845 @BeanReference(type = LockPersistence.class)
1846 protected LockPersistence lockPersistence;
1847 @BeanReference(type = MembershipRequestPersistence.class)
1848 protected MembershipRequestPersistence membershipRequestPersistence;
1849 @BeanReference(type = OrganizationPersistence.class)
1850 protected OrganizationPersistence organizationPersistence;
1851 @BeanReference(type = OrgGroupPermissionPersistence.class)
1852 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1853 @BeanReference(type = OrgGroupRolePersistence.class)
1854 protected OrgGroupRolePersistence orgGroupRolePersistence;
1855 @BeanReference(type = OrgLaborPersistence.class)
1856 protected OrgLaborPersistence orgLaborPersistence;
1857 @BeanReference(type = PasswordPolicyPersistence.class)
1858 protected PasswordPolicyPersistence passwordPolicyPersistence;
1859 @BeanReference(type = PasswordPolicyRelPersistence.class)
1860 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1861 @BeanReference(type = PasswordTrackerPersistence.class)
1862 protected PasswordTrackerPersistence passwordTrackerPersistence;
1863 @BeanReference(type = PermissionPersistence.class)
1864 protected PermissionPersistence permissionPersistence;
1865 @BeanReference(type = PhonePersistence.class)
1866 protected PhonePersistence phonePersistence;
1867 @BeanReference(type = PluginSettingPersistence.class)
1868 protected PluginSettingPersistence pluginSettingPersistence;
1869 @BeanReference(type = PortletPersistence.class)
1870 protected PortletPersistence portletPersistence;
1871 @BeanReference(type = PortletItemPersistence.class)
1872 protected PortletItemPersistence portletItemPersistence;
1873 @BeanReference(type = PortletPreferencesPersistence.class)
1874 protected PortletPreferencesPersistence portletPreferencesPersistence;
1875 @BeanReference(type = RegionPersistence.class)
1876 protected RegionPersistence regionPersistence;
1877 @BeanReference(type = ReleasePersistence.class)
1878 protected ReleasePersistence releasePersistence;
1879 @BeanReference(type = ResourcePersistence.class)
1880 protected ResourcePersistence resourcePersistence;
1881 @BeanReference(type = ResourceActionPersistence.class)
1882 protected ResourceActionPersistence resourceActionPersistence;
1883 @BeanReference(type = ResourceCodePersistence.class)
1884 protected ResourceCodePersistence resourceCodePersistence;
1885 @BeanReference(type = ResourcePermissionPersistence.class)
1886 protected ResourcePermissionPersistence resourcePermissionPersistence;
1887 @BeanReference(type = RolePersistence.class)
1888 protected RolePersistence rolePersistence;
1889 @BeanReference(type = ServiceComponentPersistence.class)
1890 protected ServiceComponentPersistence serviceComponentPersistence;
1891 @BeanReference(type = ShardPersistence.class)
1892 protected ShardPersistence shardPersistence;
1893 @BeanReference(type = SubscriptionPersistence.class)
1894 protected SubscriptionPersistence subscriptionPersistence;
1895 @BeanReference(type = TicketPersistence.class)
1896 protected TicketPersistence ticketPersistence;
1897 @BeanReference(type = TeamPersistence.class)
1898 protected TeamPersistence teamPersistence;
1899 @BeanReference(type = UserPersistence.class)
1900 protected UserPersistence userPersistence;
1901 @BeanReference(type = UserGroupPersistence.class)
1902 protected UserGroupPersistence userGroupPersistence;
1903 @BeanReference(type = UserGroupGroupRolePersistence.class)
1904 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1905 @BeanReference(type = UserGroupRolePersistence.class)
1906 protected UserGroupRolePersistence userGroupRolePersistence;
1907 @BeanReference(type = UserIdMapperPersistence.class)
1908 protected UserIdMapperPersistence userIdMapperPersistence;
1909 @BeanReference(type = UserTrackerPersistence.class)
1910 protected UserTrackerPersistence userTrackerPersistence;
1911 @BeanReference(type = UserTrackerPathPersistence.class)
1912 protected UserTrackerPathPersistence userTrackerPathPersistence;
1913 @BeanReference(type = WebDAVPropsPersistence.class)
1914 protected WebDAVPropsPersistence webDAVPropsPersistence;
1915 @BeanReference(type = WebsitePersistence.class)
1916 protected WebsitePersistence websitePersistence;
1917 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1918 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1919 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1920 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1921 private static final String _SQL_SELECT_USERTRACKER = "SELECT userTracker FROM UserTracker userTracker";
1922 private static final String _SQL_SELECT_USERTRACKER_WHERE = "SELECT userTracker FROM UserTracker userTracker WHERE ";
1923 private static final String _SQL_COUNT_USERTRACKER = "SELECT COUNT(userTracker) FROM UserTracker userTracker";
1924 private static final String _SQL_COUNT_USERTRACKER_WHERE = "SELECT COUNT(userTracker) FROM UserTracker userTracker WHERE ";
1925 private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "userTracker.companyId = ?";
1926 private static final String _FINDER_COLUMN_USERID_USERID_2 = "userTracker.userId = ?";
1927 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_1 = "userTracker.sessionId IS NULL";
1928 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_2 = "userTracker.sessionId = ?";
1929 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_3 = "(userTracker.sessionId IS NULL OR userTracker.sessionId = ?)";
1930 private static final String _ORDER_BY_ENTITY_ALIAS = "userTracker.";
1931 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No UserTracker exists with the primary key ";
1932 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No UserTracker exists with the key {";
1933 private static Log _log = LogFactoryUtil.getLog(UserTrackerPersistenceImpl.class);
1934 }