1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.NoSuchModelException;
18 import com.liferay.portal.NoSuchUserTrackerException;
19 import com.liferay.portal.kernel.annotation.BeanReference;
20 import com.liferay.portal.kernel.cache.CacheRegistry;
21 import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
22 import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
23 import com.liferay.portal.kernel.dao.orm.FinderPath;
24 import com.liferay.portal.kernel.dao.orm.Query;
25 import com.liferay.portal.kernel.dao.orm.QueryPos;
26 import com.liferay.portal.kernel.dao.orm.QueryUtil;
27 import com.liferay.portal.kernel.dao.orm.Session;
28 import com.liferay.portal.kernel.exception.SystemException;
29 import com.liferay.portal.kernel.log.Log;
30 import com.liferay.portal.kernel.log.LogFactoryUtil;
31 import com.liferay.portal.kernel.util.GetterUtil;
32 import com.liferay.portal.kernel.util.OrderByComparator;
33 import com.liferay.portal.kernel.util.StringBundler;
34 import com.liferay.portal.kernel.util.StringPool;
35 import com.liferay.portal.kernel.util.StringUtil;
36 import com.liferay.portal.model.ModelListener;
37 import com.liferay.portal.model.UserTracker;
38 import com.liferay.portal.model.impl.UserTrackerImpl;
39 import com.liferay.portal.model.impl.UserTrackerModelImpl;
40 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
41
42 import java.io.Serializable;
43
44 import java.util.ArrayList;
45 import java.util.Collections;
46 import java.util.List;
47
48
61 public class UserTrackerPersistenceImpl extends BasePersistenceImpl<UserTracker>
62 implements UserTrackerPersistence {
63 public static final String FINDER_CLASS_NAME_ENTITY = UserTrackerImpl.class.getName();
64 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
65 ".List";
66 public static final FinderPath FINDER_PATH_FIND_BY_COMPANYID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
67 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
68 "findByCompanyId", new String[] { Long.class.getName() });
69 public static final FinderPath FINDER_PATH_FIND_BY_OBC_COMPANYID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
70 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
71 "findByCompanyId",
72 new String[] {
73 Long.class.getName(),
74
75 "java.lang.Integer", "java.lang.Integer",
76 "com.liferay.portal.kernel.util.OrderByComparator"
77 });
78 public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
79 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
80 "countByCompanyId", new String[] { Long.class.getName() });
81 public static final FinderPath FINDER_PATH_FIND_BY_USERID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
82 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
83 "findByUserId", new String[] { Long.class.getName() });
84 public static final FinderPath FINDER_PATH_FIND_BY_OBC_USERID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
85 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
86 "findByUserId",
87 new String[] {
88 Long.class.getName(),
89
90 "java.lang.Integer", "java.lang.Integer",
91 "com.liferay.portal.kernel.util.OrderByComparator"
92 });
93 public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
94 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
95 "countByUserId", new String[] { Long.class.getName() });
96 public static final FinderPath FINDER_PATH_FIND_BY_SESSIONID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
97 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
98 "findBySessionId", new String[] { String.class.getName() });
99 public static final FinderPath FINDER_PATH_FIND_BY_OBC_SESSIONID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
100 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
101 "findBySessionId",
102 new String[] {
103 String.class.getName(),
104
105 "java.lang.Integer", "java.lang.Integer",
106 "com.liferay.portal.kernel.util.OrderByComparator"
107 });
108 public static final FinderPath FINDER_PATH_COUNT_BY_SESSIONID = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
109 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
110 "countBySessionId", new String[] { String.class.getName() });
111 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
112 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
113 "findAll", new String[0]);
114 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
115 UserTrackerModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
116 "countAll", new String[0]);
117
118 public void cacheResult(UserTracker userTracker) {
119 EntityCacheUtil.putResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
120 UserTrackerImpl.class, userTracker.getPrimaryKey(), userTracker);
121 }
122
123 public void cacheResult(List<UserTracker> userTrackers) {
124 for (UserTracker userTracker : userTrackers) {
125 if (EntityCacheUtil.getResult(
126 UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
127 UserTrackerImpl.class, userTracker.getPrimaryKey(), this) == null) {
128 cacheResult(userTracker);
129 }
130 }
131 }
132
133 public void clearCache() {
134 CacheRegistry.clear(UserTrackerImpl.class.getName());
135 EntityCacheUtil.clearCache(UserTrackerImpl.class.getName());
136 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
137 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
138 }
139
140 public UserTracker create(long userTrackerId) {
141 UserTracker userTracker = new UserTrackerImpl();
142
143 userTracker.setNew(true);
144 userTracker.setPrimaryKey(userTrackerId);
145
146 return userTracker;
147 }
148
149 public UserTracker remove(Serializable primaryKey)
150 throws NoSuchModelException, SystemException {
151 return remove(((Long)primaryKey).longValue());
152 }
153
154 public UserTracker remove(long userTrackerId)
155 throws NoSuchUserTrackerException, SystemException {
156 Session session = null;
157
158 try {
159 session = openSession();
160
161 UserTracker userTracker = (UserTracker)session.get(UserTrackerImpl.class,
162 new Long(userTrackerId));
163
164 if (userTracker == null) {
165 if (_log.isWarnEnabled()) {
166 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + userTrackerId);
167 }
168
169 throw new NoSuchUserTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
170 userTrackerId);
171 }
172
173 return remove(userTracker);
174 }
175 catch (NoSuchUserTrackerException nsee) {
176 throw nsee;
177 }
178 catch (Exception e) {
179 throw processException(e);
180 }
181 finally {
182 closeSession(session);
183 }
184 }
185
186 public UserTracker remove(UserTracker userTracker)
187 throws SystemException {
188 for (ModelListener<UserTracker> listener : listeners) {
189 listener.onBeforeRemove(userTracker);
190 }
191
192 userTracker = removeImpl(userTracker);
193
194 for (ModelListener<UserTracker> listener : listeners) {
195 listener.onAfterRemove(userTracker);
196 }
197
198 return userTracker;
199 }
200
201 protected UserTracker removeImpl(UserTracker userTracker)
202 throws SystemException {
203 userTracker = toUnwrappedModel(userTracker);
204
205 Session session = null;
206
207 try {
208 session = openSession();
209
210 if (userTracker.isCachedModel() || BatchSessionUtil.isEnabled()) {
211 Object staleObject = session.get(UserTrackerImpl.class,
212 userTracker.getPrimaryKeyObj());
213
214 if (staleObject != null) {
215 session.evict(staleObject);
216 }
217 }
218
219 session.delete(userTracker);
220
221 session.flush();
222 }
223 catch (Exception e) {
224 throw processException(e);
225 }
226 finally {
227 closeSession(session);
228 }
229
230 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
231
232 EntityCacheUtil.removeResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
233 UserTrackerImpl.class, userTracker.getPrimaryKey());
234
235 return userTracker;
236 }
237
238 public UserTracker updateImpl(
239 com.liferay.portal.model.UserTracker userTracker, boolean merge)
240 throws SystemException {
241 userTracker = toUnwrappedModel(userTracker);
242
243 Session session = null;
244
245 try {
246 session = openSession();
247
248 BatchSessionUtil.update(session, userTracker, merge);
249
250 userTracker.setNew(false);
251 }
252 catch (Exception e) {
253 throw processException(e);
254 }
255 finally {
256 closeSession(session);
257 }
258
259 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
260
261 EntityCacheUtil.putResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
262 UserTrackerImpl.class, userTracker.getPrimaryKey(), userTracker);
263
264 return userTracker;
265 }
266
267 protected UserTracker toUnwrappedModel(UserTracker userTracker) {
268 if (userTracker instanceof UserTrackerImpl) {
269 return userTracker;
270 }
271
272 UserTrackerImpl userTrackerImpl = new UserTrackerImpl();
273
274 userTrackerImpl.setNew(userTracker.isNew());
275 userTrackerImpl.setPrimaryKey(userTracker.getPrimaryKey());
276
277 userTrackerImpl.setUserTrackerId(userTracker.getUserTrackerId());
278 userTrackerImpl.setCompanyId(userTracker.getCompanyId());
279 userTrackerImpl.setUserId(userTracker.getUserId());
280 userTrackerImpl.setModifiedDate(userTracker.getModifiedDate());
281 userTrackerImpl.setSessionId(userTracker.getSessionId());
282 userTrackerImpl.setRemoteAddr(userTracker.getRemoteAddr());
283 userTrackerImpl.setRemoteHost(userTracker.getRemoteHost());
284 userTrackerImpl.setUserAgent(userTracker.getUserAgent());
285
286 return userTrackerImpl;
287 }
288
289 public UserTracker findByPrimaryKey(Serializable primaryKey)
290 throws NoSuchModelException, SystemException {
291 return findByPrimaryKey(((Long)primaryKey).longValue());
292 }
293
294 public UserTracker findByPrimaryKey(long userTrackerId)
295 throws NoSuchUserTrackerException, SystemException {
296 UserTracker userTracker = fetchByPrimaryKey(userTrackerId);
297
298 if (userTracker == null) {
299 if (_log.isWarnEnabled()) {
300 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + userTrackerId);
301 }
302
303 throw new NoSuchUserTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
304 userTrackerId);
305 }
306
307 return userTracker;
308 }
309
310 public UserTracker fetchByPrimaryKey(Serializable primaryKey)
311 throws SystemException {
312 return fetchByPrimaryKey(((Long)primaryKey).longValue());
313 }
314
315 public UserTracker fetchByPrimaryKey(long userTrackerId)
316 throws SystemException {
317 UserTracker userTracker = (UserTracker)EntityCacheUtil.getResult(UserTrackerModelImpl.ENTITY_CACHE_ENABLED,
318 UserTrackerImpl.class, userTrackerId, this);
319
320 if (userTracker == null) {
321 Session session = null;
322
323 try {
324 session = openSession();
325
326 userTracker = (UserTracker)session.get(UserTrackerImpl.class,
327 new Long(userTrackerId));
328 }
329 catch (Exception e) {
330 throw processException(e);
331 }
332 finally {
333 if (userTracker != null) {
334 cacheResult(userTracker);
335 }
336
337 closeSession(session);
338 }
339 }
340
341 return userTracker;
342 }
343
344 public List<UserTracker> findByCompanyId(long companyId)
345 throws SystemException {
346 Object[] finderArgs = new Object[] { new Long(companyId) };
347
348 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COMPANYID,
349 finderArgs, this);
350
351 if (list == null) {
352 Session session = null;
353
354 try {
355 session = openSession();
356
357 StringBundler query = new StringBundler(2);
358
359 query.append(_SQL_SELECT_USERTRACKER_WHERE);
360
361 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
362
363 String sql = query.toString();
364
365 Query q = session.createQuery(sql);
366
367 QueryPos qPos = QueryPos.getInstance(q);
368
369 qPos.add(companyId);
370
371 list = q.list();
372 }
373 catch (Exception e) {
374 throw processException(e);
375 }
376 finally {
377 if (list == null) {
378 list = new ArrayList<UserTracker>();
379 }
380
381 cacheResult(list);
382
383 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
384 finderArgs, list);
385
386 closeSession(session);
387 }
388 }
389
390 return list;
391 }
392
393 public List<UserTracker> findByCompanyId(long companyId, int start, int end)
394 throws SystemException {
395 return findByCompanyId(companyId, start, end, null);
396 }
397
398 public List<UserTracker> findByCompanyId(long companyId, int start,
399 int end, OrderByComparator orderByComparator) throws SystemException {
400 Object[] finderArgs = new Object[] {
401 new Long(companyId),
402
403 String.valueOf(start), String.valueOf(end),
404 String.valueOf(orderByComparator)
405 };
406
407 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_COMPANYID,
408 finderArgs, this);
409
410 if (list == null) {
411 Session session = null;
412
413 try {
414 session = openSession();
415
416 StringBundler query = null;
417
418 if (orderByComparator != null) {
419 query = new StringBundler(3 +
420 (orderByComparator.getOrderByFields().length * 3));
421 }
422 else {
423 query = new StringBundler(2);
424 }
425
426 query.append(_SQL_SELECT_USERTRACKER_WHERE);
427
428 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
429
430 if (orderByComparator != null) {
431 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
432 orderByComparator);
433 }
434
435 String sql = query.toString();
436
437 Query q = session.createQuery(sql);
438
439 QueryPos qPos = QueryPos.getInstance(q);
440
441 qPos.add(companyId);
442
443 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
444 start, end);
445 }
446 catch (Exception e) {
447 throw processException(e);
448 }
449 finally {
450 if (list == null) {
451 list = new ArrayList<UserTracker>();
452 }
453
454 cacheResult(list);
455
456 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_COMPANYID,
457 finderArgs, list);
458
459 closeSession(session);
460 }
461 }
462
463 return list;
464 }
465
466 public UserTracker findByCompanyId_First(long companyId,
467 OrderByComparator orderByComparator)
468 throws NoSuchUserTrackerException, SystemException {
469 List<UserTracker> list = findByCompanyId(companyId, 0, 1,
470 orderByComparator);
471
472 if (list.isEmpty()) {
473 StringBundler msg = new StringBundler(4);
474
475 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
476
477 msg.append("companyId=");
478 msg.append(companyId);
479
480 msg.append(StringPool.CLOSE_CURLY_BRACE);
481
482 throw new NoSuchUserTrackerException(msg.toString());
483 }
484 else {
485 return list.get(0);
486 }
487 }
488
489 public UserTracker findByCompanyId_Last(long companyId,
490 OrderByComparator orderByComparator)
491 throws NoSuchUserTrackerException, SystemException {
492 int count = countByCompanyId(companyId);
493
494 List<UserTracker> list = findByCompanyId(companyId, count - 1, count,
495 orderByComparator);
496
497 if (list.isEmpty()) {
498 StringBundler msg = new StringBundler(4);
499
500 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
501
502 msg.append("companyId=");
503 msg.append(companyId);
504
505 msg.append(StringPool.CLOSE_CURLY_BRACE);
506
507 throw new NoSuchUserTrackerException(msg.toString());
508 }
509 else {
510 return list.get(0);
511 }
512 }
513
514 public UserTracker[] findByCompanyId_PrevAndNext(long userTrackerId,
515 long companyId, OrderByComparator orderByComparator)
516 throws NoSuchUserTrackerException, SystemException {
517 UserTracker userTracker = findByPrimaryKey(userTrackerId);
518
519 int count = countByCompanyId(companyId);
520
521 Session session = null;
522
523 try {
524 session = openSession();
525
526 StringBundler query = null;
527
528 if (orderByComparator != null) {
529 query = new StringBundler(3 +
530 (orderByComparator.getOrderByFields().length * 3));
531 }
532 else {
533 query = new StringBundler(2);
534 }
535
536 query.append(_SQL_SELECT_USERTRACKER_WHERE);
537
538 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
539
540 if (orderByComparator != null) {
541 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
542 orderByComparator);
543 }
544
545 String sql = query.toString();
546
547 Query q = session.createQuery(sql);
548
549 QueryPos qPos = QueryPos.getInstance(q);
550
551 qPos.add(companyId);
552
553 Object[] objArray = QueryUtil.getPrevAndNext(q, count,
554 orderByComparator, userTracker);
555
556 UserTracker[] array = new UserTrackerImpl[3];
557
558 array[0] = (UserTracker)objArray[0];
559 array[1] = (UserTracker)objArray[1];
560 array[2] = (UserTracker)objArray[2];
561
562 return array;
563 }
564 catch (Exception e) {
565 throw processException(e);
566 }
567 finally {
568 closeSession(session);
569 }
570 }
571
572 public List<UserTracker> findByUserId(long userId)
573 throws SystemException {
574 Object[] finderArgs = new Object[] { new Long(userId) };
575
576 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_USERID,
577 finderArgs, this);
578
579 if (list == null) {
580 Session session = null;
581
582 try {
583 session = openSession();
584
585 StringBundler query = new StringBundler(2);
586
587 query.append(_SQL_SELECT_USERTRACKER_WHERE);
588
589 query.append(_FINDER_COLUMN_USERID_USERID_2);
590
591 String sql = query.toString();
592
593 Query q = session.createQuery(sql);
594
595 QueryPos qPos = QueryPos.getInstance(q);
596
597 qPos.add(userId);
598
599 list = q.list();
600 }
601 catch (Exception e) {
602 throw processException(e);
603 }
604 finally {
605 if (list == null) {
606 list = new ArrayList<UserTracker>();
607 }
608
609 cacheResult(list);
610
611 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_USERID,
612 finderArgs, list);
613
614 closeSession(session);
615 }
616 }
617
618 return list;
619 }
620
621 public List<UserTracker> findByUserId(long userId, int start, int end)
622 throws SystemException {
623 return findByUserId(userId, start, end, null);
624 }
625
626 public List<UserTracker> findByUserId(long userId, int start, int end,
627 OrderByComparator orderByComparator) throws SystemException {
628 Object[] finderArgs = new Object[] {
629 new Long(userId),
630
631 String.valueOf(start), String.valueOf(end),
632 String.valueOf(orderByComparator)
633 };
634
635 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_USERID,
636 finderArgs, this);
637
638 if (list == null) {
639 Session session = null;
640
641 try {
642 session = openSession();
643
644 StringBundler query = null;
645
646 if (orderByComparator != null) {
647 query = new StringBundler(3 +
648 (orderByComparator.getOrderByFields().length * 3));
649 }
650 else {
651 query = new StringBundler(2);
652 }
653
654 query.append(_SQL_SELECT_USERTRACKER_WHERE);
655
656 query.append(_FINDER_COLUMN_USERID_USERID_2);
657
658 if (orderByComparator != null) {
659 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
660 orderByComparator);
661 }
662
663 String sql = query.toString();
664
665 Query q = session.createQuery(sql);
666
667 QueryPos qPos = QueryPos.getInstance(q);
668
669 qPos.add(userId);
670
671 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
672 start, end);
673 }
674 catch (Exception e) {
675 throw processException(e);
676 }
677 finally {
678 if (list == null) {
679 list = new ArrayList<UserTracker>();
680 }
681
682 cacheResult(list);
683
684 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_USERID,
685 finderArgs, list);
686
687 closeSession(session);
688 }
689 }
690
691 return list;
692 }
693
694 public UserTracker findByUserId_First(long userId,
695 OrderByComparator orderByComparator)
696 throws NoSuchUserTrackerException, SystemException {
697 List<UserTracker> list = findByUserId(userId, 0, 1, orderByComparator);
698
699 if (list.isEmpty()) {
700 StringBundler msg = new StringBundler(4);
701
702 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
703
704 msg.append("userId=");
705 msg.append(userId);
706
707 msg.append(StringPool.CLOSE_CURLY_BRACE);
708
709 throw new NoSuchUserTrackerException(msg.toString());
710 }
711 else {
712 return list.get(0);
713 }
714 }
715
716 public UserTracker findByUserId_Last(long userId,
717 OrderByComparator orderByComparator)
718 throws NoSuchUserTrackerException, SystemException {
719 int count = countByUserId(userId);
720
721 List<UserTracker> list = findByUserId(userId, count - 1, count,
722 orderByComparator);
723
724 if (list.isEmpty()) {
725 StringBundler msg = new StringBundler(4);
726
727 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
728
729 msg.append("userId=");
730 msg.append(userId);
731
732 msg.append(StringPool.CLOSE_CURLY_BRACE);
733
734 throw new NoSuchUserTrackerException(msg.toString());
735 }
736 else {
737 return list.get(0);
738 }
739 }
740
741 public UserTracker[] findByUserId_PrevAndNext(long userTrackerId,
742 long userId, OrderByComparator orderByComparator)
743 throws NoSuchUserTrackerException, SystemException {
744 UserTracker userTracker = findByPrimaryKey(userTrackerId);
745
746 int count = countByUserId(userId);
747
748 Session session = null;
749
750 try {
751 session = openSession();
752
753 StringBundler query = null;
754
755 if (orderByComparator != null) {
756 query = new StringBundler(3 +
757 (orderByComparator.getOrderByFields().length * 3));
758 }
759 else {
760 query = new StringBundler(2);
761 }
762
763 query.append(_SQL_SELECT_USERTRACKER_WHERE);
764
765 query.append(_FINDER_COLUMN_USERID_USERID_2);
766
767 if (orderByComparator != null) {
768 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
769 orderByComparator);
770 }
771
772 String sql = query.toString();
773
774 Query q = session.createQuery(sql);
775
776 QueryPos qPos = QueryPos.getInstance(q);
777
778 qPos.add(userId);
779
780 Object[] objArray = QueryUtil.getPrevAndNext(q, count,
781 orderByComparator, userTracker);
782
783 UserTracker[] array = new UserTrackerImpl[3];
784
785 array[0] = (UserTracker)objArray[0];
786 array[1] = (UserTracker)objArray[1];
787 array[2] = (UserTracker)objArray[2];
788
789 return array;
790 }
791 catch (Exception e) {
792 throw processException(e);
793 }
794 finally {
795 closeSession(session);
796 }
797 }
798
799 public List<UserTracker> findBySessionId(String sessionId)
800 throws SystemException {
801 Object[] finderArgs = new Object[] { sessionId };
802
803 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_SESSIONID,
804 finderArgs, this);
805
806 if (list == null) {
807 Session session = null;
808
809 try {
810 session = openSession();
811
812 StringBundler query = new StringBundler(2);
813
814 query.append(_SQL_SELECT_USERTRACKER_WHERE);
815
816 if (sessionId == null) {
817 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
818 }
819 else {
820 if (sessionId.equals(StringPool.BLANK)) {
821 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
822 }
823 else {
824 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
825 }
826 }
827
828 String sql = query.toString();
829
830 Query q = session.createQuery(sql);
831
832 QueryPos qPos = QueryPos.getInstance(q);
833
834 if (sessionId != null) {
835 qPos.add(sessionId);
836 }
837
838 list = q.list();
839 }
840 catch (Exception e) {
841 throw processException(e);
842 }
843 finally {
844 if (list == null) {
845 list = new ArrayList<UserTracker>();
846 }
847
848 cacheResult(list);
849
850 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_SESSIONID,
851 finderArgs, list);
852
853 closeSession(session);
854 }
855 }
856
857 return list;
858 }
859
860 public List<UserTracker> findBySessionId(String sessionId, int start,
861 int end) throws SystemException {
862 return findBySessionId(sessionId, start, end, null);
863 }
864
865 public List<UserTracker> findBySessionId(String sessionId, int start,
866 int end, OrderByComparator orderByComparator) throws SystemException {
867 Object[] finderArgs = new Object[] {
868 sessionId,
869
870 String.valueOf(start), String.valueOf(end),
871 String.valueOf(orderByComparator)
872 };
873
874 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_SESSIONID,
875 finderArgs, this);
876
877 if (list == null) {
878 Session session = null;
879
880 try {
881 session = openSession();
882
883 StringBundler query = null;
884
885 if (orderByComparator != null) {
886 query = new StringBundler(3 +
887 (orderByComparator.getOrderByFields().length * 3));
888 }
889 else {
890 query = new StringBundler(2);
891 }
892
893 query.append(_SQL_SELECT_USERTRACKER_WHERE);
894
895 if (sessionId == null) {
896 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
897 }
898 else {
899 if (sessionId.equals(StringPool.BLANK)) {
900 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
901 }
902 else {
903 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
904 }
905 }
906
907 if (orderByComparator != null) {
908 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
909 orderByComparator);
910 }
911
912 String sql = query.toString();
913
914 Query q = session.createQuery(sql);
915
916 QueryPos qPos = QueryPos.getInstance(q);
917
918 if (sessionId != null) {
919 qPos.add(sessionId);
920 }
921
922 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
923 start, end);
924 }
925 catch (Exception e) {
926 throw processException(e);
927 }
928 finally {
929 if (list == null) {
930 list = new ArrayList<UserTracker>();
931 }
932
933 cacheResult(list);
934
935 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_SESSIONID,
936 finderArgs, list);
937
938 closeSession(session);
939 }
940 }
941
942 return list;
943 }
944
945 public UserTracker findBySessionId_First(String sessionId,
946 OrderByComparator orderByComparator)
947 throws NoSuchUserTrackerException, SystemException {
948 List<UserTracker> list = findBySessionId(sessionId, 0, 1,
949 orderByComparator);
950
951 if (list.isEmpty()) {
952 StringBundler msg = new StringBundler(4);
953
954 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
955
956 msg.append("sessionId=");
957 msg.append(sessionId);
958
959 msg.append(StringPool.CLOSE_CURLY_BRACE);
960
961 throw new NoSuchUserTrackerException(msg.toString());
962 }
963 else {
964 return list.get(0);
965 }
966 }
967
968 public UserTracker findBySessionId_Last(String sessionId,
969 OrderByComparator orderByComparator)
970 throws NoSuchUserTrackerException, SystemException {
971 int count = countBySessionId(sessionId);
972
973 List<UserTracker> list = findBySessionId(sessionId, count - 1, count,
974 orderByComparator);
975
976 if (list.isEmpty()) {
977 StringBundler msg = new StringBundler(4);
978
979 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
980
981 msg.append("sessionId=");
982 msg.append(sessionId);
983
984 msg.append(StringPool.CLOSE_CURLY_BRACE);
985
986 throw new NoSuchUserTrackerException(msg.toString());
987 }
988 else {
989 return list.get(0);
990 }
991 }
992
993 public UserTracker[] findBySessionId_PrevAndNext(long userTrackerId,
994 String sessionId, OrderByComparator orderByComparator)
995 throws NoSuchUserTrackerException, SystemException {
996 UserTracker userTracker = findByPrimaryKey(userTrackerId);
997
998 int count = countBySessionId(sessionId);
999
1000 Session session = null;
1001
1002 try {
1003 session = openSession();
1004
1005 StringBundler query = null;
1006
1007 if (orderByComparator != null) {
1008 query = new StringBundler(3 +
1009 (orderByComparator.getOrderByFields().length * 3));
1010 }
1011 else {
1012 query = new StringBundler(2);
1013 }
1014
1015 query.append(_SQL_SELECT_USERTRACKER_WHERE);
1016
1017 if (sessionId == null) {
1018 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1019 }
1020 else {
1021 if (sessionId.equals(StringPool.BLANK)) {
1022 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1023 }
1024 else {
1025 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1026 }
1027 }
1028
1029 if (orderByComparator != null) {
1030 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1031 orderByComparator);
1032 }
1033
1034 String sql = query.toString();
1035
1036 Query q = session.createQuery(sql);
1037
1038 QueryPos qPos = QueryPos.getInstance(q);
1039
1040 if (sessionId != null) {
1041 qPos.add(sessionId);
1042 }
1043
1044 Object[] objArray = QueryUtil.getPrevAndNext(q, count,
1045 orderByComparator, userTracker);
1046
1047 UserTracker[] array = new UserTrackerImpl[3];
1048
1049 array[0] = (UserTracker)objArray[0];
1050 array[1] = (UserTracker)objArray[1];
1051 array[2] = (UserTracker)objArray[2];
1052
1053 return array;
1054 }
1055 catch (Exception e) {
1056 throw processException(e);
1057 }
1058 finally {
1059 closeSession(session);
1060 }
1061 }
1062
1063 public List<UserTracker> findAll() throws SystemException {
1064 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1065 }
1066
1067 public List<UserTracker> findAll(int start, int end)
1068 throws SystemException {
1069 return findAll(start, end, null);
1070 }
1071
1072 public List<UserTracker> findAll(int start, int end,
1073 OrderByComparator orderByComparator) throws SystemException {
1074 Object[] finderArgs = new Object[] {
1075 String.valueOf(start), String.valueOf(end),
1076 String.valueOf(orderByComparator)
1077 };
1078
1079 List<UserTracker> list = (List<UserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1080 finderArgs, this);
1081
1082 if (list == null) {
1083 Session session = null;
1084
1085 try {
1086 session = openSession();
1087
1088 StringBundler query = null;
1089 String sql = null;
1090
1091 if (orderByComparator != null) {
1092 query = new StringBundler(2 +
1093 (orderByComparator.getOrderByFields().length * 3));
1094
1095 query.append(_SQL_SELECT_USERTRACKER);
1096
1097 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1098 orderByComparator);
1099
1100 sql = query.toString();
1101 }
1102
1103 sql = _SQL_SELECT_USERTRACKER;
1104
1105 Query q = session.createQuery(sql);
1106
1107 if (orderByComparator == null) {
1108 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1109 start, end, false);
1110
1111 Collections.sort(list);
1112 }
1113 else {
1114 list = (List<UserTracker>)QueryUtil.list(q, getDialect(),
1115 start, end);
1116 }
1117 }
1118 catch (Exception e) {
1119 throw processException(e);
1120 }
1121 finally {
1122 if (list == null) {
1123 list = new ArrayList<UserTracker>();
1124 }
1125
1126 cacheResult(list);
1127
1128 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
1129
1130 closeSession(session);
1131 }
1132 }
1133
1134 return list;
1135 }
1136
1137 public void removeByCompanyId(long companyId) throws SystemException {
1138 for (UserTracker userTracker : findByCompanyId(companyId)) {
1139 remove(userTracker);
1140 }
1141 }
1142
1143 public void removeByUserId(long userId) throws SystemException {
1144 for (UserTracker userTracker : findByUserId(userId)) {
1145 remove(userTracker);
1146 }
1147 }
1148
1149 public void removeBySessionId(String sessionId) throws SystemException {
1150 for (UserTracker userTracker : findBySessionId(sessionId)) {
1151 remove(userTracker);
1152 }
1153 }
1154
1155 public void removeAll() throws SystemException {
1156 for (UserTracker userTracker : findAll()) {
1157 remove(userTracker);
1158 }
1159 }
1160
1161 public int countByCompanyId(long companyId) throws SystemException {
1162 Object[] finderArgs = new Object[] { new Long(companyId) };
1163
1164 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
1165 finderArgs, this);
1166
1167 if (count == null) {
1168 Session session = null;
1169
1170 try {
1171 session = openSession();
1172
1173 StringBundler query = new StringBundler(2);
1174
1175 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1176
1177 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
1178
1179 String sql = query.toString();
1180
1181 Query q = session.createQuery(sql);
1182
1183 QueryPos qPos = QueryPos.getInstance(q);
1184
1185 qPos.add(companyId);
1186
1187 count = (Long)q.uniqueResult();
1188 }
1189 catch (Exception e) {
1190 throw processException(e);
1191 }
1192 finally {
1193 if (count == null) {
1194 count = Long.valueOf(0);
1195 }
1196
1197 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
1198 finderArgs, count);
1199
1200 closeSession(session);
1201 }
1202 }
1203
1204 return count.intValue();
1205 }
1206
1207 public int countByUserId(long userId) throws SystemException {
1208 Object[] finderArgs = new Object[] { new Long(userId) };
1209
1210 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERID,
1211 finderArgs, this);
1212
1213 if (count == null) {
1214 Session session = null;
1215
1216 try {
1217 session = openSession();
1218
1219 StringBundler query = new StringBundler(2);
1220
1221 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1222
1223 query.append(_FINDER_COLUMN_USERID_USERID_2);
1224
1225 String sql = query.toString();
1226
1227 Query q = session.createQuery(sql);
1228
1229 QueryPos qPos = QueryPos.getInstance(q);
1230
1231 qPos.add(userId);
1232
1233 count = (Long)q.uniqueResult();
1234 }
1235 catch (Exception e) {
1236 throw processException(e);
1237 }
1238 finally {
1239 if (count == null) {
1240 count = Long.valueOf(0);
1241 }
1242
1243 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERID,
1244 finderArgs, count);
1245
1246 closeSession(session);
1247 }
1248 }
1249
1250 return count.intValue();
1251 }
1252
1253 public int countBySessionId(String sessionId) throws SystemException {
1254 Object[] finderArgs = new Object[] { sessionId };
1255
1256 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_SESSIONID,
1257 finderArgs, this);
1258
1259 if (count == null) {
1260 Session session = null;
1261
1262 try {
1263 session = openSession();
1264
1265 StringBundler query = new StringBundler(2);
1266
1267 query.append(_SQL_COUNT_USERTRACKER_WHERE);
1268
1269 if (sessionId == null) {
1270 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_1);
1271 }
1272 else {
1273 if (sessionId.equals(StringPool.BLANK)) {
1274 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_3);
1275 }
1276 else {
1277 query.append(_FINDER_COLUMN_SESSIONID_SESSIONID_2);
1278 }
1279 }
1280
1281 String sql = query.toString();
1282
1283 Query q = session.createQuery(sql);
1284
1285 QueryPos qPos = QueryPos.getInstance(q);
1286
1287 if (sessionId != null) {
1288 qPos.add(sessionId);
1289 }
1290
1291 count = (Long)q.uniqueResult();
1292 }
1293 catch (Exception e) {
1294 throw processException(e);
1295 }
1296 finally {
1297 if (count == null) {
1298 count = Long.valueOf(0);
1299 }
1300
1301 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_SESSIONID,
1302 finderArgs, count);
1303
1304 closeSession(session);
1305 }
1306 }
1307
1308 return count.intValue();
1309 }
1310
1311 public int countAll() throws SystemException {
1312 Object[] finderArgs = new Object[0];
1313
1314 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1315 finderArgs, this);
1316
1317 if (count == null) {
1318 Session session = null;
1319
1320 try {
1321 session = openSession();
1322
1323 Query q = session.createQuery(_SQL_COUNT_USERTRACKER);
1324
1325 count = (Long)q.uniqueResult();
1326 }
1327 catch (Exception e) {
1328 throw processException(e);
1329 }
1330 finally {
1331 if (count == null) {
1332 count = Long.valueOf(0);
1333 }
1334
1335 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1336 count);
1337
1338 closeSession(session);
1339 }
1340 }
1341
1342 return count.intValue();
1343 }
1344
1345 public void afterPropertiesSet() {
1346 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1347 com.liferay.portal.util.PropsUtil.get(
1348 "value.object.listener.com.liferay.portal.model.UserTracker")));
1349
1350 if (listenerClassNames.length > 0) {
1351 try {
1352 List<ModelListener<UserTracker>> listenersList = new ArrayList<ModelListener<UserTracker>>();
1353
1354 for (String listenerClassName : listenerClassNames) {
1355 listenersList.add((ModelListener<UserTracker>)Class.forName(
1356 listenerClassName).newInstance());
1357 }
1358
1359 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1360 }
1361 catch (Exception e) {
1362 _log.error(e);
1363 }
1364 }
1365 }
1366
1367 @BeanReference(type = AccountPersistence.class)
1368 protected AccountPersistence accountPersistence;
1369 @BeanReference(type = AddressPersistence.class)
1370 protected AddressPersistence addressPersistence;
1371 @BeanReference(type = BrowserTrackerPersistence.class)
1372 protected BrowserTrackerPersistence browserTrackerPersistence;
1373 @BeanReference(type = ClassNamePersistence.class)
1374 protected ClassNamePersistence classNamePersistence;
1375 @BeanReference(type = CompanyPersistence.class)
1376 protected CompanyPersistence companyPersistence;
1377 @BeanReference(type = ContactPersistence.class)
1378 protected ContactPersistence contactPersistence;
1379 @BeanReference(type = CountryPersistence.class)
1380 protected CountryPersistence countryPersistence;
1381 @BeanReference(type = EmailAddressPersistence.class)
1382 protected EmailAddressPersistence emailAddressPersistence;
1383 @BeanReference(type = GroupPersistence.class)
1384 protected GroupPersistence groupPersistence;
1385 @BeanReference(type = ImagePersistence.class)
1386 protected ImagePersistence imagePersistence;
1387 @BeanReference(type = LayoutPersistence.class)
1388 protected LayoutPersistence layoutPersistence;
1389 @BeanReference(type = LayoutPrototypePersistence.class)
1390 protected LayoutPrototypePersistence layoutPrototypePersistence;
1391 @BeanReference(type = LayoutSetPersistence.class)
1392 protected LayoutSetPersistence layoutSetPersistence;
1393 @BeanReference(type = LayoutSetPrototypePersistence.class)
1394 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1395 @BeanReference(type = ListTypePersistence.class)
1396 protected ListTypePersistence listTypePersistence;
1397 @BeanReference(type = LockPersistence.class)
1398 protected LockPersistence lockPersistence;
1399 @BeanReference(type = MembershipRequestPersistence.class)
1400 protected MembershipRequestPersistence membershipRequestPersistence;
1401 @BeanReference(type = OrganizationPersistence.class)
1402 protected OrganizationPersistence organizationPersistence;
1403 @BeanReference(type = OrgGroupPermissionPersistence.class)
1404 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1405 @BeanReference(type = OrgGroupRolePersistence.class)
1406 protected OrgGroupRolePersistence orgGroupRolePersistence;
1407 @BeanReference(type = OrgLaborPersistence.class)
1408 protected OrgLaborPersistence orgLaborPersistence;
1409 @BeanReference(type = PasswordPolicyPersistence.class)
1410 protected PasswordPolicyPersistence passwordPolicyPersistence;
1411 @BeanReference(type = PasswordPolicyRelPersistence.class)
1412 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1413 @BeanReference(type = PasswordTrackerPersistence.class)
1414 protected PasswordTrackerPersistence passwordTrackerPersistence;
1415 @BeanReference(type = PermissionPersistence.class)
1416 protected PermissionPersistence permissionPersistence;
1417 @BeanReference(type = PhonePersistence.class)
1418 protected PhonePersistence phonePersistence;
1419 @BeanReference(type = PluginSettingPersistence.class)
1420 protected PluginSettingPersistence pluginSettingPersistence;
1421 @BeanReference(type = PortletPersistence.class)
1422 protected PortletPersistence portletPersistence;
1423 @BeanReference(type = PortletItemPersistence.class)
1424 protected PortletItemPersistence portletItemPersistence;
1425 @BeanReference(type = PortletPreferencesPersistence.class)
1426 protected PortletPreferencesPersistence portletPreferencesPersistence;
1427 @BeanReference(type = RegionPersistence.class)
1428 protected RegionPersistence regionPersistence;
1429 @BeanReference(type = ReleasePersistence.class)
1430 protected ReleasePersistence releasePersistence;
1431 @BeanReference(type = ResourcePersistence.class)
1432 protected ResourcePersistence resourcePersistence;
1433 @BeanReference(type = ResourceActionPersistence.class)
1434 protected ResourceActionPersistence resourceActionPersistence;
1435 @BeanReference(type = ResourceCodePersistence.class)
1436 protected ResourceCodePersistence resourceCodePersistence;
1437 @BeanReference(type = ResourcePermissionPersistence.class)
1438 protected ResourcePermissionPersistence resourcePermissionPersistence;
1439 @BeanReference(type = RolePersistence.class)
1440 protected RolePersistence rolePersistence;
1441 @BeanReference(type = ServiceComponentPersistence.class)
1442 protected ServiceComponentPersistence serviceComponentPersistence;
1443 @BeanReference(type = ShardPersistence.class)
1444 protected ShardPersistence shardPersistence;
1445 @BeanReference(type = SubscriptionPersistence.class)
1446 protected SubscriptionPersistence subscriptionPersistence;
1447 @BeanReference(type = TeamPersistence.class)
1448 protected TeamPersistence teamPersistence;
1449 @BeanReference(type = UserPersistence.class)
1450 protected UserPersistence userPersistence;
1451 @BeanReference(type = UserGroupPersistence.class)
1452 protected UserGroupPersistence userGroupPersistence;
1453 @BeanReference(type = UserGroupGroupRolePersistence.class)
1454 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1455 @BeanReference(type = UserGroupRolePersistence.class)
1456 protected UserGroupRolePersistence userGroupRolePersistence;
1457 @BeanReference(type = UserIdMapperPersistence.class)
1458 protected UserIdMapperPersistence userIdMapperPersistence;
1459 @BeanReference(type = UserTrackerPersistence.class)
1460 protected UserTrackerPersistence userTrackerPersistence;
1461 @BeanReference(type = UserTrackerPathPersistence.class)
1462 protected UserTrackerPathPersistence userTrackerPathPersistence;
1463 @BeanReference(type = WebDAVPropsPersistence.class)
1464 protected WebDAVPropsPersistence webDAVPropsPersistence;
1465 @BeanReference(type = WebsitePersistence.class)
1466 protected WebsitePersistence websitePersistence;
1467 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1468 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1469 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1470 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1471 private static final String _SQL_SELECT_USERTRACKER = "SELECT userTracker FROM UserTracker userTracker";
1472 private static final String _SQL_SELECT_USERTRACKER_WHERE = "SELECT userTracker FROM UserTracker userTracker WHERE ";
1473 private static final String _SQL_COUNT_USERTRACKER = "SELECT COUNT(userTracker) FROM UserTracker userTracker";
1474 private static final String _SQL_COUNT_USERTRACKER_WHERE = "SELECT COUNT(userTracker) FROM UserTracker userTracker WHERE ";
1475 private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "userTracker.companyId = ?";
1476 private static final String _FINDER_COLUMN_USERID_USERID_2 = "userTracker.userId = ?";
1477 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_1 = "userTracker.sessionId IS NULL";
1478 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_2 = "userTracker.sessionId = ?";
1479 private static final String _FINDER_COLUMN_SESSIONID_SESSIONID_3 = "(userTracker.sessionId IS NULL OR userTracker.sessionId = ?)";
1480 private static final String _ORDER_BY_ENTITY_ALIAS = "userTracker.";
1481 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No UserTracker exists with the primary key ";
1482 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No UserTracker exists with the key {";
1483 private static Log _log = LogFactoryUtil.getLog(UserTrackerPersistenceImpl.class);
1484}