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 Session session = null;
453
454 try {
455 session = openSession();
456
457 StringBundler query = null;
458
459 if (orderByComparator != null) {
460 query = new StringBundler(3 +
461 (orderByComparator.getOrderByFields().length * 3));
462 }
463 else {
464 query = new StringBundler(2);
465 }
466
467 query.append(_SQL_SELECT_USERTRACKER_WHERE);
468
469 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
470
471 if (orderByComparator != null) {
472 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
473 orderByComparator);
474 }
475
476 String sql = query.toString();
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 list = new ArrayList<UserTracker>();
493 }
494
495 cacheResult(list);
496
497 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
498 finderArgs, list);
499
500 closeSession(session);
501 }
502 }
503
504 return list;
505 }
506
507
520 public UserTracker findByCompanyId_First(long companyId,
521 OrderByComparator orderByComparator)
522 throws NoSuchUserTrackerException, SystemException {
523 List<UserTracker> list = findByCompanyId(companyId, 0, 1,
524 orderByComparator);
525
526 if (list.isEmpty()) {
527 StringBundler msg = new StringBundler(4);
528
529 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
530
531 msg.append("companyId=");
532 msg.append(companyId);
533
534 msg.append(StringPool.CLOSE_CURLY_BRACE);
535
536 throw new NoSuchUserTrackerException(msg.toString());
537 }
538 else {
539 return list.get(0);
540 }
541 }
542
543
556 public UserTracker findByCompanyId_Last(long companyId,
557 OrderByComparator orderByComparator)
558 throws NoSuchUserTrackerException, SystemException {
559 int count = countByCompanyId(companyId);
560
561 List<UserTracker> list = findByCompanyId(companyId, count - 1, count,
562 orderByComparator);
563
564 if (list.isEmpty()) {
565 StringBundler msg = new StringBundler(4);
566
567 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
568
569 msg.append("companyId=");
570 msg.append(companyId);
571
572 msg.append(StringPool.CLOSE_CURLY_BRACE);
573
574 throw new NoSuchUserTrackerException(msg.toString());
575 }
576 else {
577 return list.get(0);
578 }
579 }
580
581
595 public UserTracker[] findByCompanyId_PrevAndNext(long userTrackerId,
596 long companyId, OrderByComparator orderByComparator)
597 throws NoSuchUserTrackerException, SystemException {
598 UserTracker userTracker = findByPrimaryKey(userTrackerId);
599
600 Session session = null;
601
602 try {
603 session = openSession();
604
605 UserTracker[] array = new UserTrackerImpl[3];
606
607 array[0] = getByCompanyId_PrevAndNext(session, userTracker,
608 companyId, orderByComparator, true);
609
610 array[1] = userTracker;
611
612 array[2] = getByCompanyId_PrevAndNext(session, userTracker,
613 companyId, orderByComparator, false);
614
615 return array;
616 }
617 catch (Exception e) {
618 throw processException(e);
619 }
620 finally {
621 closeSession(session);
622 }
623 }
624
625 protected UserTracker getByCompanyId_PrevAndNext(Session session,
626 UserTracker userTracker, long companyId,
627 OrderByComparator orderByComparator, boolean previous) {
628 StringBundler query = null;
629
630 if (orderByComparator != null) {
631 query = new StringBundler(6 +
632 (orderByComparator.getOrderByFields().length * 6));
633 }
634 else {
635 query = new StringBundler(3);
636 }
637
638 query.append(_SQL_SELECT_USERTRACKER_WHERE);
639
640 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
641
642 if (orderByComparator != null) {
643 String[] orderByFields = orderByComparator.getOrderByFields();
644
645 if (orderByFields.length > 0) {
646 query.append(WHERE_AND);
647 }
648
649 for (int i = 0; i < orderByFields.length; i++) {
650 query.append(_ORDER_BY_ENTITY_ALIAS);
651 query.append(orderByFields[i]);
652
653 if ((i + 1) < orderByFields.length) {
654 if (orderByComparator.isAscending() ^ previous) {
655 query.append(WHERE_GREATER_THAN_HAS_NEXT);
656 }
657 else {
658 query.append(WHERE_LESSER_THAN_HAS_NEXT);
659 }
660 }
661 else {
662 if (orderByComparator.isAscending() ^ previous) {
663 query.append(WHERE_GREATER_THAN);
664 }
665 else {
666 query.append(WHERE_LESSER_THAN);
667 }
668 }
669 }
670
671 query.append(ORDER_BY_CLAUSE);
672
673 for (int i = 0; i < orderByFields.length; i++) {
674 query.append(_ORDER_BY_ENTITY_ALIAS);
675 query.append(orderByFields[i]);
676
677 if ((i + 1) < orderByFields.length) {
678 if (orderByComparator.isAscending() ^ previous) {
679 query.append(ORDER_BY_ASC_HAS_NEXT);
680 }
681 else {
682 query.append(ORDER_BY_DESC_HAS_NEXT);
683 }
684 }
685 else {
686 if (orderByComparator.isAscending() ^ previous) {
687 query.append(ORDER_BY_ASC);
688 }
689 else {
690 query.append(ORDER_BY_DESC);
691 }
692 }
693 }
694 }
695
696 String sql = query.toString();
697
698 Query q = session.createQuery(sql);
699
700 q.setFirstResult(0);
701 q.setMaxResults(2);
702
703 QueryPos qPos = QueryPos.getInstance(q);
704
705 qPos.add(companyId);
706
707 if (orderByComparator != null) {
708 Object[] values = orderByComparator.getOrderByValues(userTracker);
709
710 for (Object value : values) {
711 qPos.add(value);
712 }
713 }
714
715 List<UserTracker> list = q.list();
716
717 if (list.size() == 2) {
718 return list.get(1);
719 }
720 else {
721 return null;
722 }
723 }
724
725
732 public List<UserTracker> findByUserId(long userId)
733 throws SystemException {
734 return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
735 }
736
737
750 public List<UserTracker> findByUserId(long userId, int start, int end)
751 throws SystemException {
752 return findByUserId(userId, start, end, null);
753 }
754
755
769 public List<UserTracker> findByUserId(long userId, int start, int end,
770 OrderByComparator orderByComparator) throws SystemException {
771 Object[] finderArgs = new Object[] {
772 userId,
773
774 String.valueOf(start), String.valueOf(end),
775 String.valueOf(orderByComparator)
776 };
777
778 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_USERID,
779 finderArgs, this);
780
781 if (list == null) {
782 Session session = null;
783
784 try {
785 session = openSession();
786
787 StringBundler query = null;
788
789 if (orderByComparator != null) {
790 query = new StringBundler(3 +
791 (orderByComparator.getOrderByFields().length * 3));
792 }
793 else {
794 query = new StringBundler(2);
795 }
796
797 query.append(_SQL_SELECT_USERTRACKER_WHERE);
798
799 query.append(_FINDER_COLUMN_USERID_USERID_2);
800
801 if (orderByComparator != null) {
802 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
803 orderByComparator);
804 }
805
806 String sql = query.toString();
807
808 Query q = session.createQuery(sql);
809
810 QueryPos qPos = QueryPos.getInstance(q);
811
812 qPos.add(userId);
813
814 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
815 start, end);
816 }
817 catch (Exception e) {
818 throw processException(e);
819 }
820 finally {
821 if (list == null) {
822 list = new ArrayList<UserTracker>();
823 }
824
825 cacheResult(list);
826
827 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_USERID,
828 finderArgs, list);
829
830 closeSession(session);
831 }
832 }
833
834 return list;
835 }
836
837
850 public UserTracker findByUserId_First(long userId,
851 OrderByComparator orderByComparator)
852 throws NoSuchUserTrackerException, SystemException {
853 List<UserTracker> list = findByUserId(userId, 0, 1, orderByComparator);
854
855 if (list.isEmpty()) {
856 StringBundler msg = new StringBundler(4);
857
858 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
859
860 msg.append("userId=");
861 msg.append(userId);
862
863 msg.append(StringPool.CLOSE_CURLY_BRACE);
864
865 throw new NoSuchUserTrackerException(msg.toString());
866 }
867 else {
868 return list.get(0);
869 }
870 }
871
872
885 public UserTracker findByUserId_Last(long userId,
886 OrderByComparator orderByComparator)
887 throws NoSuchUserTrackerException, SystemException {
888 int count = countByUserId(userId);
889
890 List<UserTracker> list = findByUserId(userId, count - 1, count,
891 orderByComparator);
892
893 if (list.isEmpty()) {
894 StringBundler msg = new StringBundler(4);
895
896 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
897
898 msg.append("userId=");
899 msg.append(userId);
900
901 msg.append(StringPool.CLOSE_CURLY_BRACE);
902
903 throw new NoSuchUserTrackerException(msg.toString());
904 }
905 else {
906 return list.get(0);
907 }
908 }
909
910
924 public UserTracker[] findByUserId_PrevAndNext(long userTrackerId,
925 long userId, OrderByComparator orderByComparator)
926 throws NoSuchUserTrackerException, SystemException {
927 UserTracker userTracker = findByPrimaryKey(userTrackerId);
928
929 Session session = null;
930
931 try {
932 session = openSession();
933
934 UserTracker[] array = new UserTrackerImpl[3];
935
936 array[0] = getByUserId_PrevAndNext(session, userTracker, userId,
937 orderByComparator, true);
938
939 array[1] = userTracker;
940
941 array[2] = getByUserId_PrevAndNext(session, userTracker, userId,
942 orderByComparator, false);
943
944 return array;
945 }
946 catch (Exception e) {
947 throw processException(e);
948 }
949 finally {
950 closeSession(session);
951 }
952 }
953
954 protected UserTracker getByUserId_PrevAndNext(Session session,
955 UserTracker userTracker, long userId,
956 OrderByComparator orderByComparator, boolean previous) {
957 StringBundler query = null;
958
959 if (orderByComparator != null) {
960 query = new StringBundler(6 +
961 (orderByComparator.getOrderByFields().length * 6));
962 }
963 else {
964 query = new StringBundler(3);
965 }
966
967 query.append(_SQL_SELECT_USERTRACKER_WHERE);
968
969 query.append(_FINDER_COLUMN_USERID_USERID_2);
970
971 if (orderByComparator != null) {
972 String[] orderByFields = orderByComparator.getOrderByFields();
973
974 if (orderByFields.length > 0) {
975 query.append(WHERE_AND);
976 }
977
978 for (int i = 0; i < orderByFields.length; i++) {
979 query.append(_ORDER_BY_ENTITY_ALIAS);
980 query.append(orderByFields[i]);
981
982 if ((i + 1) < orderByFields.length) {
983 if (orderByComparator.isAscending() ^ previous) {
984 query.append(WHERE_GREATER_THAN_HAS_NEXT);
985 }
986 else {
987 query.append(WHERE_LESSER_THAN_HAS_NEXT);
988 }
989 }
990 else {
991 if (orderByComparator.isAscending() ^ previous) {
992 query.append(WHERE_GREATER_THAN);
993 }
994 else {
995 query.append(WHERE_LESSER_THAN);
996 }
997 }
998 }
999
1000 query.append(ORDER_BY_CLAUSE);
1001
1002 for (int i = 0; i < orderByFields.length; i++) {
1003 query.append(_ORDER_BY_ENTITY_ALIAS);
1004 query.append(orderByFields[i]);
1005
1006 if ((i + 1) < orderByFields.length) {
1007 if (orderByComparator.isAscending() ^ previous) {
1008 query.append(ORDER_BY_ASC_HAS_NEXT);
1009 }
1010 else {
1011 query.append(ORDER_BY_DESC_HAS_NEXT);
1012 }
1013 }
1014 else {
1015 if (orderByComparator.isAscending() ^ previous) {
1016 query.append(ORDER_BY_ASC);
1017 }
1018 else {
1019 query.append(ORDER_BY_DESC);
1020 }
1021 }
1022 }
1023 }
1024
1025 String sql = query.toString();
1026
1027 Query q = session.createQuery(sql);
1028
1029 q.setFirstResult(0);
1030 q.setMaxResults(2);
1031
1032 QueryPos qPos = QueryPos.getInstance(q);
1033
1034 qPos.add(userId);
1035
1036 if (orderByComparator != null) {
1037 Object[] values = orderByComparator.getOrderByValues(userTracker);
1038
1039 for (Object value : values) {
1040 qPos.add(value);
1041 }
1042 }
1043
1044 List<UserTracker> list = q.list();
1045
1046 if (list.size() == 2) {
1047 return list.get(1);
1048 }
1049 else {
1050 return null;
1051 }
1052 }
1053
1054
1061 public List<UserTracker> findBySessionId(String sessionId)
1062 throws SystemException {
1063 return findBySessionId(sessionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
1064 null);
1065 }
1066
1067
1080 public List<UserTracker> findBySessionId(String sessionId, int start,
1081 int end) throws SystemException {
1082 return findBySessionId(sessionId, start, end, null);
1083 }
1084
1085
1099 public List<UserTracker> findBySessionId(String sessionId, int start,
1100 int end, OrderByComparator orderByComparator) throws SystemException {
1101 Object[] finderArgs = new Object[] {
1102 sessionId,
1103
1104 String.valueOf(start), String.valueOf(end),
1105 String.valueOf(orderByComparator)
1106 };
1107
1108 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_SESSIONID,
1109 finderArgs, this);
1110
1111 if (list == null) {
1112 Session session = null;
1113
1114 try {
1115 session = openSession();
1116
1117 StringBundler query = null;
1118
1119 if (orderByComparator != null) {
1120 query = new StringBundler(3 +
1121 (orderByComparator.getOrderByFields().length * 3));
1122 }
1123 else {
1124 query = new StringBundler(2);
1125 }
1126
1127 query.append(_SQL_SELECT_USERTRACKER_WHERE);
1128
1129 if (sessionId == null) {
1130 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1131 }
1132 else {
1133 if (sessionId.equals(StringPool.BLANK)) {
1134 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1135 }
1136 else {
1137 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1138 }
1139 }
1140
1141 if (orderByComparator != null) {
1142 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1143 orderByComparator);
1144 }
1145
1146 String sql = query.toString();
1147
1148 Query q = session.createQuery(sql);
1149
1150 QueryPos qPos = QueryPos.getInstance(q);
1151
1152 if (sessionId != null) {
1153 qPos.add(sessionId);
1154 }
1155
1156 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1157 start, end);
1158 }
1159 catch (Exception e) {
1160 throw processException(e);
1161 }
1162 finally {
1163 if (list == null) {
1164 list = new ArrayList<UserTracker>();
1165 }
1166
1167 cacheResult(list);
1168
1169 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_SESSIONID,
1170 finderArgs, list);
1171
1172 closeSession(session);
1173 }
1174 }
1175
1176 return list;
1177 }
1178
1179
1192 public UserTracker findBySessionId_First(String sessionId,
1193 OrderByComparator orderByComparator)
1194 throws NoSuchUserTrackerException, SystemException {
1195 List<UserTracker> list = findBySessionId(sessionId, 0, 1,
1196 orderByComparator);
1197
1198 if (list.isEmpty()) {
1199 StringBundler msg = new StringBundler(4);
1200
1201 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
1202
1203 msg.append("sessionId=");
1204 msg.append(sessionId);
1205
1206 msg.append(StringPool.CLOSE_CURLY_BRACE);
1207
1208 throw new NoSuchUserTrackerException(msg.toString());
1209 }
1210 else {
1211 return list.get(0);
1212 }
1213 }
1214
1215
1228 public UserTracker findBySessionId_Last(String sessionId,
1229 OrderByComparator orderByComparator)
1230 throws NoSuchUserTrackerException, SystemException {
1231 int count = countBySessionId(sessionId);
1232
1233 List<UserTracker> list = findBySessionId(sessionId, count - 1, count,
1234 orderByComparator);
1235
1236 if (list.isEmpty()) {
1237 StringBundler msg = new StringBundler(4);
1238
1239 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
1240
1241 msg.append("sessionId=");
1242 msg.append(sessionId);
1243
1244 msg.append(StringPool.CLOSE_CURLY_BRACE);
1245
1246 throw new NoSuchUserTrackerException(msg.toString());
1247 }
1248 else {
1249 return list.get(0);
1250 }
1251 }
1252
1253
1267 public UserTracker[] findBySessionId_PrevAndNext(long userTrackerId,
1268 String sessionId, OrderByComparator orderByComparator)
1269 throws NoSuchUserTrackerException, SystemException {
1270 UserTracker userTracker = findByPrimaryKey(userTrackerId);
1271
1272 Session session = null;
1273
1274 try {
1275 session = openSession();
1276
1277 UserTracker[] array = new UserTrackerImpl[3];
1278
1279 array[0] = getBySessionId_PrevAndNext(session, userTracker,
1280 sessionId, orderByComparator, true);
1281
1282 array[1] = userTracker;
1283
1284 array[2] = getBySessionId_PrevAndNext(session, userTracker,
1285 sessionId, orderByComparator, false);
1286
1287 return array;
1288 }
1289 catch (Exception e) {
1290 throw processException(e);
1291 }
1292 finally {
1293 closeSession(session);
1294 }
1295 }
1296
1297 protected UserTracker getBySessionId_PrevAndNext(Session session,
1298 UserTracker userTracker, String sessionId,
1299 OrderByComparator orderByComparator, boolean previous) {
1300 StringBundler query = null;
1301
1302 if (orderByComparator != null) {
1303 query = new StringBundler(6 +
1304 (orderByComparator.getOrderByFields().length * 6));
1305 }
1306 else {
1307 query = new StringBundler(3);
1308 }
1309
1310 query.append(_SQL_SELECT_USERTRACKER_WHERE);
1311
1312 if (sessionId == null) {
1313 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1314 }
1315 else {
1316 if (sessionId.equals(StringPool.BLANK)) {
1317 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1318 }
1319 else {
1320 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1321 }
1322 }
1323
1324 if (orderByComparator != null) {
1325 String[] orderByFields = orderByComparator.getOrderByFields();
1326
1327 if (orderByFields.length > 0) {
1328 query.append(WHERE_AND);
1329 }
1330
1331 for (int i = 0; i < orderByFields.length; i++) {
1332 query.append(_ORDER_BY_ENTITY_ALIAS);
1333 query.append(orderByFields[i]);
1334
1335 if ((i + 1) < orderByFields.length) {
1336 if (orderByComparator.isAscending() ^ previous) {
1337 query.append(WHERE_GREATER_THAN_HAS_NEXT);
1338 }
1339 else {
1340 query.append(WHERE_LESSER_THAN_HAS_NEXT);
1341 }
1342 }
1343 else {
1344 if (orderByComparator.isAscending() ^ previous) {
1345 query.append(WHERE_GREATER_THAN);
1346 }
1347 else {
1348 query.append(WHERE_LESSER_THAN);
1349 }
1350 }
1351 }
1352
1353 query.append(ORDER_BY_CLAUSE);
1354
1355 for (int i = 0; i < orderByFields.length; i++) {
1356 query.append(_ORDER_BY_ENTITY_ALIAS);
1357 query.append(orderByFields[i]);
1358
1359 if ((i + 1) < orderByFields.length) {
1360 if (orderByComparator.isAscending() ^ previous) {
1361 query.append(ORDER_BY_ASC_HAS_NEXT);
1362 }
1363 else {
1364 query.append(ORDER_BY_DESC_HAS_NEXT);
1365 }
1366 }
1367 else {
1368 if (orderByComparator.isAscending() ^ previous) {
1369 query.append(ORDER_BY_ASC);
1370 }
1371 else {
1372 query.append(ORDER_BY_DESC);
1373 }
1374 }
1375 }
1376 }
1377
1378 String sql = query.toString();
1379
1380 Query q = session.createQuery(sql);
1381
1382 q.setFirstResult(0);
1383 q.setMaxResults(2);
1384
1385 QueryPos qPos = QueryPos.getInstance(q);
1386
1387 if (sessionId != null) {
1388 qPos.add(sessionId);
1389 }
1390
1391 if (orderByComparator != null) {
1392 Object[] values = orderByComparator.getOrderByValues(userTracker);
1393
1394 for (Object value : values) {
1395 qPos.add(value);
1396 }
1397 }
1398
1399 List<UserTracker> list = q.list();
1400
1401 if (list.size() == 2) {
1402 return list.get(1);
1403 }
1404 else {
1405 return null;
1406 }
1407 }
1408
1409
1415 public List<UserTracker> findAll() throws SystemException {
1416 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1417 }
1418
1419
1431 public List<UserTracker> findAll(int start, int end)
1432 throws SystemException {
1433 return findAll(start, end, null);
1434 }
1435
1436
1449 public List<UserTracker> findAll(int start, int end,
1450 OrderByComparator orderByComparator) throws SystemException {
1451 Object[] finderArgs = new Object[] {
1452 String.valueOf(start), String.valueOf(end),
1453 String.valueOf(orderByComparator)
1454 };
1455
1456 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1457 finderArgs, this);
1458
1459 if (list == null) {
1460 Session session = null;
1461
1462 try {
1463 session = openSession();
1464
1465 StringBundler query = null;
1466 String sql = null;
1467
1468 if (orderByComparator != null) {
1469 query = new StringBundler(2 +
1470 (orderByComparator.getOrderByFields().length * 3));
1471
1472 query.append(_SQL_SELECT_USERTRACKER);
1473
1474 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1475 orderByComparator);
1476
1477 sql = query.toString();
1478 }
1479 else {
1480 sql = _SQL_SELECT_USERTRACKER;
1481 }
1482
1483 Query q = session.createQuery(sql);
1484
1485 if (orderByComparator == null) {
1486 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1487 start, end, false);
1488
1489 Collections.sort(list);
1490 }
1491 else {
1492 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1493 start, end);
1494 }
1495 }
1496 catch (Exception e) {
1497 throw processException(e);
1498 }
1499 finally {
1500 if (list == null) {
1501 list = new ArrayList<UserTracker>();
1502 }
1503
1504 cacheResult(list);
1505
1506 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
1507
1508 closeSession(session);
1509 }
1510 }
1511
1512 return list;
1513 }
1514
1515
1521 public void removeByCompanyId(long companyId) throws SystemException {
1522 for (UserTracker userTracker : findByCompanyId(companyId)) {
1523 remove(userTracker);
1524 }
1525 }
1526
1527
1533 public void removeByUserId(long userId) throws SystemException {
1534 for (UserTracker userTracker : findByUserId(userId)) {
1535 remove(userTracker);
1536 }
1537 }
1538
1539
1545 public void removeBySessionId(String sessionId) throws SystemException {
1546 for (UserTracker userTracker : findBySessionId(sessionId)) {
1547 remove(userTracker);
1548 }
1549 }
1550
1551
1556 public void removeAll() throws SystemException {
1557 for (UserTracker userTracker : findAll()) {
1558 remove(userTracker);
1559 }
1560 }
1561
1562
1569 public int countByCompanyId(long companyId) throws SystemException {
1570 Object[] finderArgs = new Object[] { companyId };
1571
1572 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
1573 finderArgs, this);
1574
1575 if (count == null) {
1576 Session session = null;
1577
1578 try {
1579 session = openSession();
1580
1581 StringBundler query = new StringBundler(2);
1582
1583 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1584
1585 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
1586
1587 String sql = query.toString();
1588
1589 Query q = session.createQuery(sql);
1590
1591 QueryPos qPos = QueryPos.getInstance(q);
1592
1593 qPos.add(companyId);
1594
1595 count = (Long)q.uniqueResult();
1596 }
1597 catch (Exception e) {
1598 throw processException(e);
1599 }
1600 finally {
1601 if (count == null) {
1602 count = Long.valueOf(0);
1603 }
1604
1605 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
1606 finderArgs, count);
1607
1608 closeSession(session);
1609 }
1610 }
1611
1612 return count.intValue();
1613 }
1614
1615
1622 public int countByUserId(long userId) throws SystemException {
1623 Object[] finderArgs = new Object[] { userId };
1624
1625 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERID,
1626 finderArgs, this);
1627
1628 if (count == null) {
1629 Session session = null;
1630
1631 try {
1632 session = openSession();
1633
1634 StringBundler query = new StringBundler(2);
1635
1636 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1637
1638 query.append(_FINDER_COLUMN_USERID_USERID_2);
1639
1640 String sql = query.toString();
1641
1642 Query q = session.createQuery(sql);
1643
1644 QueryPos qPos = QueryPos.getInstance(q);
1645
1646 qPos.add(userId);
1647
1648 count = (Long)q.uniqueResult();
1649 }
1650 catch (Exception e) {
1651 throw processException(e);
1652 }
1653 finally {
1654 if (count == null) {
1655 count = Long.valueOf(0);
1656 }
1657
1658 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERID,
1659 finderArgs, count);
1660
1661 closeSession(session);
1662 }
1663 }
1664
1665 return count.intValue();
1666 }
1667
1668
1675 public int countBySessionId(String sessionId) throws SystemException {
1676 Object[] finderArgs = new Object[] { sessionId };
1677
1678 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_SESSIONID,
1679 finderArgs, this);
1680
1681 if (count == null) {
1682 Session session = null;
1683
1684 try {
1685 session = openSession();
1686
1687 StringBundler query = new StringBundler(2);
1688
1689 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1690
1691 if (sessionId == null) {
1692 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1693 }
1694 else {
1695 if (sessionId.equals(StringPool.BLANK)) {
1696 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1697 }
1698 else {
1699 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1700 }
1701 }
1702
1703 String sql = query.toString();
1704
1705 Query q = session.createQuery(sql);
1706
1707 QueryPos qPos = QueryPos.getInstance(q);
1708
1709 if (sessionId != null) {
1710 qPos.add(sessionId);
1711 }
1712
1713 count = (Long)q.uniqueResult();
1714 }
1715 catch (Exception e) {
1716 throw processException(e);
1717 }
1718 finally {
1719 if (count == null) {
1720 count = Long.valueOf(0);
1721 }
1722
1723 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_SESSIONID,
1724 finderArgs, count);
1725
1726 closeSession(session);
1727 }
1728 }
1729
1730 return count.intValue();
1731 }
1732
1733
1739 public int countAll() throws SystemException {
1740 Object[] finderArgs = new Object[0];
1741
1742 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1743 finderArgs, this);
1744
1745 if (count == null) {
1746 Session session = null;
1747
1748 try {
1749 session = openSession();
1750
1751 Query q = session.createQuery(_SQL_COUNT_USERTRACKER);
1752
1753 count = (Long)q.uniqueResult();
1754 }
1755 catch (Exception e) {
1756 throw processException(e);
1757 }
1758 finally {
1759 if (count == null) {
1760 count = Long.valueOf(0);
1761 }
1762
1763 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1764 count);
1765
1766 closeSession(session);
1767 }
1768 }
1769
1770 return count.intValue();
1771 }
1772
1773
1776 public void afterPropertiesSet() {
1777 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1778 com.liferay.portal.util.PropsUtil.get(
1779 "value.object.listener.com.liferay.portal.model.UserTracker")));
1780
1781 if (listenerClassNames.length > 0) {
1782 try {
1783 List<ModelListener<UserTracker>> listenersList = new ArrayList<ModelListener<UserTracker>>();
1784
1785 for (String listenerClassName : listenerClassNames) {
1786 listenersList.add((ModelListener<UserTracker>)InstanceFactory.newInstance(
1787 listenerClassName));
1788 }
1789
1790 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1791 }
1792 catch (Exception e) {
1793 _log.error(e);
1794 }
1795 }
1796 }
1797
1798 public void destroy() {
1799 EntityCacheUtil.removeCache(UserTrackerImpl.class.getName());
1800 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
1801 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
1802 }
1803
1804 @BeanReference(type = AccountPersistence.class)
1805 protected AccountPersistence accountPersistence;
1806 @BeanReference(type = AddressPersistence.class)
1807 protected AddressPersistence addressPersistence;
1808 @BeanReference(type = BrowserTrackerPersistence.class)
1809 protected BrowserTrackerPersistence browserTrackerPersistence;
1810 @BeanReference(type = ClassNamePersistence.class)
1811 protected ClassNamePersistence classNamePersistence;
1812 @BeanReference(type = ClusterGroupPersistence.class)
1813 protected ClusterGroupPersistence clusterGroupPersistence;
1814 @BeanReference(type = CompanyPersistence.class)
1815 protected CompanyPersistence companyPersistence;
1816 @BeanReference(type = ContactPersistence.class)
1817 protected ContactPersistence contactPersistence;
1818 @BeanReference(type = CountryPersistence.class)
1819 protected CountryPersistence countryPersistence;
1820 @BeanReference(type = EmailAddressPersistence.class)
1821 protected EmailAddressPersistence emailAddressPersistence;
1822 @BeanReference(type = GroupPersistence.class)
1823 protected GroupPersistence groupPersistence;
1824 @BeanReference(type = ImagePersistence.class)
1825 protected ImagePersistence imagePersistence;
1826 @BeanReference(type = LayoutPersistence.class)
1827 protected LayoutPersistence layoutPersistence;
1828 @BeanReference(type = LayoutPrototypePersistence.class)
1829 protected LayoutPrototypePersistence layoutPrototypePersistence;
1830 @BeanReference(type = LayoutSetPersistence.class)
1831 protected LayoutSetPersistence layoutSetPersistence;
1832 @BeanReference(type = LayoutSetPrototypePersistence.class)
1833 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1834 @BeanReference(type = ListTypePersistence.class)
1835 protected ListTypePersistence listTypePersistence;
1836 @BeanReference(type = LockPersistence.class)
1837 protected LockPersistence lockPersistence;
1838 @BeanReference(type = MembershipRequestPersistence.class)
1839 protected MembershipRequestPersistence membershipRequestPersistence;
1840 @BeanReference(type = OrganizationPersistence.class)
1841 protected OrganizationPersistence organizationPersistence;
1842 @BeanReference(type = OrgGroupPermissionPersistence.class)
1843 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1844 @BeanReference(type = OrgGroupRolePersistence.class)
1845 protected OrgGroupRolePersistence orgGroupRolePersistence;
1846 @BeanReference(type = OrgLaborPersistence.class)
1847 protected OrgLaborPersistence orgLaborPersistence;
1848 @BeanReference(type = PasswordPolicyPersistence.class)
1849 protected PasswordPolicyPersistence passwordPolicyPersistence;
1850 @BeanReference(type = PasswordPolicyRelPersistence.class)
1851 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1852 @BeanReference(type = PasswordTrackerPersistence.class)
1853 protected PasswordTrackerPersistence passwordTrackerPersistence;
1854 @BeanReference(type = PermissionPersistence.class)
1855 protected PermissionPersistence permissionPersistence;
1856 @BeanReference(type = PhonePersistence.class)
1857 protected PhonePersistence phonePersistence;
1858 @BeanReference(type = PluginSettingPersistence.class)
1859 protected PluginSettingPersistence pluginSettingPersistence;
1860 @BeanReference(type = PortletPersistence.class)
1861 protected PortletPersistence portletPersistence;
1862 @BeanReference(type = PortletItemPersistence.class)
1863 protected PortletItemPersistence portletItemPersistence;
1864 @BeanReference(type = PortletPreferencesPersistence.class)
1865 protected PortletPreferencesPersistence portletPreferencesPersistence;
1866 @BeanReference(type = RegionPersistence.class)
1867 protected RegionPersistence regionPersistence;
1868 @BeanReference(type = ReleasePersistence.class)
1869 protected ReleasePersistence releasePersistence;
1870 @BeanReference(type = ResourcePersistence.class)
1871 protected ResourcePersistence resourcePersistence;
1872 @BeanReference(type = ResourceActionPersistence.class)
1873 protected ResourceActionPersistence resourceActionPersistence;
1874 @BeanReference(type = ResourceCodePersistence.class)
1875 protected ResourceCodePersistence resourceCodePersistence;
1876 @BeanReference(type = ResourcePermissionPersistence.class)
1877 protected ResourcePermissionPersistence resourcePermissionPersistence;
1878 @BeanReference(type = RolePersistence.class)
1879 protected RolePersistence rolePersistence;
1880 @BeanReference(type = ServiceComponentPersistence.class)
1881 protected ServiceComponentPersistence serviceComponentPersistence;
1882 @BeanReference(type = ShardPersistence.class)
1883 protected ShardPersistence shardPersistence;
1884 @BeanReference(type = SubscriptionPersistence.class)
1885 protected SubscriptionPersistence subscriptionPersistence;
1886 @BeanReference(type = TicketPersistence.class)
1887 protected TicketPersistence ticketPersistence;
1888 @BeanReference(type = TeamPersistence.class)
1889 protected TeamPersistence teamPersistence;
1890 @BeanReference(type = UserPersistence.class)
1891 protected UserPersistence userPersistence;
1892 @BeanReference(type = UserGroupPersistence.class)
1893 protected UserGroupPersistence userGroupPersistence;
1894 @BeanReference(type = UserGroupGroupRolePersistence.class)
1895 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1896 @BeanReference(type = UserGroupRolePersistence.class)
1897 protected UserGroupRolePersistence userGroupRolePersistence;
1898 @BeanReference(type = UserIdMapperPersistence.class)
1899 protected UserIdMapperPersistence userIdMapperPersistence;
1900 @BeanReference(type = UserTrackerPersistence.class)
1901 protected UserTrackerPersistence userTrackerPersistence;
1902 @BeanReference(type = UserTrackerPathPersistence.class)
1903 protected UserTrackerPathPersistence userTrackerPathPersistence;
1904 @BeanReference(type = WebDAVPropsPersistence.class)
1905 protected WebDAVPropsPersistence webDAVPropsPersistence;
1906 @BeanReference(type = WebsitePersistence.class)
1907 protected WebsitePersistence websitePersistence;
1908 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1909 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1910 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1911 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1912 private static final String _SQL_SELECT_USERTRACKER = "SELECT userTracker FROM UserTracker userTracker";
1913 private static final String _SQL_SELECT_USERTRACKER_WHERE = "SELECT userTracker FROM UserTracker userTracker WHERE ";
1914 private static final String _SQL_COUNT_USERTRACKER = "SELECT COUNT(userTracker) FROM UserTracker userTracker";
1915 private static final String _SQL_COUNT_USERTRACKER_WHERE = "SELECT COUNT(userTracker) FROM UserTracker userTracker WHERE ";
1916 private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "userTracker.companyId = ?";
1917 private static final String _FINDER_COLUMN_USERID_USERID_2 = "userTracker.userId = ?";
1918 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_1 = "userTracker.sessionId IS NULL";
1919 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_2 = "userTracker.sessionId = ?";
1920 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_3 = "(userTracker.sessionId IS NULL OR userTracker.sessionId = ?)";
1921 private static final String _ORDER_BY_ENTITY_ALIAS = "userTracker.";
1922 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No UserTracker exists with the primary key ";
1923 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No UserTracker exists with the key {";
1924 private static Log _log = LogFactoryUtil.getLog(UserTrackerPersistenceImpl.class);
1925 }