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