1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.NoSuchBrowserTrackerException;
18  import com.liferay.portal.NoSuchModelException;
19  import com.liferay.portal.SystemException;
20  import com.liferay.portal.kernel.annotation.BeanReference;
21  import com.liferay.portal.kernel.cache.CacheRegistry;
22  import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
23  import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
24  import com.liferay.portal.kernel.dao.orm.FinderPath;
25  import com.liferay.portal.kernel.dao.orm.Query;
26  import com.liferay.portal.kernel.dao.orm.QueryPos;
27  import com.liferay.portal.kernel.dao.orm.QueryUtil;
28  import com.liferay.portal.kernel.dao.orm.Session;
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.InstanceFactory;
33  import com.liferay.portal.kernel.util.OrderByComparator;
34  import com.liferay.portal.kernel.util.StringBundler;
35  import com.liferay.portal.kernel.util.StringPool;
36  import com.liferay.portal.kernel.util.StringUtil;
37  import com.liferay.portal.model.BrowserTracker;
38  import com.liferay.portal.model.ModelListener;
39  import com.liferay.portal.model.impl.BrowserTrackerImpl;
40  import com.liferay.portal.model.impl.BrowserTrackerModelImpl;
41  import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
42  
43  import java.io.Serializable;
44  
45  import java.util.ArrayList;
46  import java.util.Collections;
47  import java.util.List;
48  
49  /**
50   * <a href="BrowserTrackerPersistenceImpl.java.html"><b><i>View Source</i></b></a>
51   *
52   * <p>
53   * ServiceBuilder generated this class. Modifications in this class will be
54   * overwritten the next time is generated.
55   * </p>
56   *
57   * @author    Brian Wing Shun Chan
58   * @see       BrowserTrackerPersistence
59   * @see       BrowserTrackerUtil
60   * @generated
61   */
62  public class BrowserTrackerPersistenceImpl extends BasePersistenceImpl<BrowserTracker>
63      implements BrowserTrackerPersistence {
64      public static final String FINDER_CLASS_NAME_ENTITY = BrowserTrackerImpl.class.getName();
65      public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
66          ".List";
67      public static final FinderPath FINDER_PATH_FETCH_BY_USERID = new FinderPath(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
68              BrowserTrackerModelImpl.FINDER_CACHE_ENABLED,
69              FINDER_CLASS_NAME_ENTITY, "fetchByUserId",
70              new String[] { Long.class.getName() });
71      public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
72              BrowserTrackerModelImpl.FINDER_CACHE_ENABLED,
73              FINDER_CLASS_NAME_LIST, "countByUserId",
74              new String[] { Long.class.getName() });
75      public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
76              BrowserTrackerModelImpl.FINDER_CACHE_ENABLED,
77              FINDER_CLASS_NAME_LIST, "findAll", new String[0]);
78      public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
79              BrowserTrackerModelImpl.FINDER_CACHE_ENABLED,
80              FINDER_CLASS_NAME_LIST, "countAll", new String[0]);
81  
82      public void cacheResult(BrowserTracker browserTracker) {
83          EntityCacheUtil.putResult(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
84              BrowserTrackerImpl.class, browserTracker.getPrimaryKey(),
85              browserTracker);
86  
87          FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
88              new Object[] { new Long(browserTracker.getUserId()) },
89              browserTracker);
90      }
91  
92      public void cacheResult(List<BrowserTracker> browserTrackers) {
93          for (BrowserTracker browserTracker : browserTrackers) {
94              if (EntityCacheUtil.getResult(
95                          BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
96                          BrowserTrackerImpl.class,
97                          browserTracker.getPrimaryKey(), this) == null) {
98                  cacheResult(browserTracker);
99              }
100         }
101     }
102 
103     public void clearCache() {
104         CacheRegistry.clear(BrowserTrackerImpl.class.getName());
105         EntityCacheUtil.clearCache(BrowserTrackerImpl.class.getName());
106         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
107         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
108     }
109 
110     public void clearCache(BrowserTracker browserTracker) {
111         EntityCacheUtil.removeResult(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
112             BrowserTrackerImpl.class, browserTracker.getPrimaryKey());
113 
114         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERID,
115             new Object[] { new Long(browserTracker.getUserId()) });
116     }
117 
118     public BrowserTracker create(long browserTrackerId) {
119         BrowserTracker browserTracker = new BrowserTrackerImpl();
120 
121         browserTracker.setNew(true);
122         browserTracker.setPrimaryKey(browserTrackerId);
123 
124         return browserTracker;
125     }
126 
127     public BrowserTracker remove(Serializable primaryKey)
128         throws NoSuchModelException, SystemException {
129         return remove(((Long)primaryKey).longValue());
130     }
131 
132     public BrowserTracker remove(long browserTrackerId)
133         throws NoSuchBrowserTrackerException, SystemException {
134         Session session = null;
135 
136         try {
137             session = openSession();
138 
139             BrowserTracker browserTracker = (BrowserTracker)session.get(BrowserTrackerImpl.class,
140                     new Long(browserTrackerId));
141 
142             if (browserTracker == null) {
143                 if (_log.isWarnEnabled()) {
144                     _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
145                         browserTrackerId);
146                 }
147 
148                 throw new NoSuchBrowserTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
149                     browserTrackerId);
150             }
151 
152             return remove(browserTracker);
153         }
154         catch (NoSuchBrowserTrackerException nsee) {
155             throw nsee;
156         }
157         catch (Exception e) {
158             throw processException(e);
159         }
160         finally {
161             closeSession(session);
162         }
163     }
164 
165     protected BrowserTracker removeImpl(BrowserTracker browserTracker)
166         throws SystemException {
167         browserTracker = toUnwrappedModel(browserTracker);
168 
169         Session session = null;
170 
171         try {
172             session = openSession();
173 
174             BatchSessionUtil.delete(session, browserTracker);
175         }
176         catch (Exception e) {
177             throw processException(e);
178         }
179         finally {
180             closeSession(session);
181         }
182 
183         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
184 
185         BrowserTrackerModelImpl browserTrackerModelImpl = (BrowserTrackerModelImpl)browserTracker;
186 
187         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERID,
188             new Object[] { new Long(browserTrackerModelImpl.getOriginalUserId()) });
189 
190         EntityCacheUtil.removeResult(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
191             BrowserTrackerImpl.class, browserTracker.getPrimaryKey());
192 
193         return browserTracker;
194     }
195 
196     /**
197      * @deprecated Use {@link BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)}.
198      */
199     public BrowserTracker update(BrowserTracker browserTracker)
200         throws SystemException {
201         if (_log.isWarnEnabled()) {
202             _log.warn(
203                 "Using the deprecated update(BrowserTracker browserTracker) method. Use update(BrowserTracker browserTracker, boolean merge) instead.");
204         }
205 
206         return update(browserTracker, false);
207     }
208 
209     public BrowserTracker updateImpl(
210         com.liferay.portal.model.BrowserTracker browserTracker, boolean merge)
211         throws SystemException {
212         browserTracker = toUnwrappedModel(browserTracker);
213 
214         boolean isNew = browserTracker.isNew();
215 
216         BrowserTrackerModelImpl browserTrackerModelImpl = (BrowserTrackerModelImpl)browserTracker;
217 
218         Session session = null;
219 
220         try {
221             session = openSession();
222 
223             BatchSessionUtil.update(session, browserTracker, merge);
224 
225             browserTracker.setNew(false);
226         }
227         catch (Exception e) {
228             throw processException(e);
229         }
230         finally {
231             closeSession(session);
232         }
233 
234         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
235 
236         EntityCacheUtil.putResult(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
237             BrowserTrackerImpl.class, browserTracker.getPrimaryKey(),
238             browserTracker);
239 
240         if (!isNew &&
241                 (browserTracker.getUserId() != browserTrackerModelImpl.getOriginalUserId())) {
242             FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERID,
243                 new Object[] {
244                     new Long(browserTrackerModelImpl.getOriginalUserId())
245                 });
246         }
247 
248         if (isNew ||
249                 (browserTracker.getUserId() != browserTrackerModelImpl.getOriginalUserId())) {
250             FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
251                 new Object[] { new Long(browserTracker.getUserId()) },
252                 browserTracker);
253         }
254 
255         return browserTracker;
256     }
257 
258     protected BrowserTracker toUnwrappedModel(BrowserTracker browserTracker) {
259         if (browserTracker instanceof BrowserTrackerImpl) {
260             return browserTracker;
261         }
262 
263         BrowserTrackerImpl browserTrackerImpl = new BrowserTrackerImpl();
264 
265         browserTrackerImpl.setNew(browserTracker.isNew());
266         browserTrackerImpl.setPrimaryKey(browserTracker.getPrimaryKey());
267 
268         browserTrackerImpl.setBrowserTrackerId(browserTracker.getBrowserTrackerId());
269         browserTrackerImpl.setUserId(browserTracker.getUserId());
270         browserTrackerImpl.setBrowserKey(browserTracker.getBrowserKey());
271 
272         return browserTrackerImpl;
273     }
274 
275     public BrowserTracker findByPrimaryKey(Serializable primaryKey)
276         throws NoSuchModelException, SystemException {
277         return findByPrimaryKey(((Long)primaryKey).longValue());
278     }
279 
280     public BrowserTracker findByPrimaryKey(long browserTrackerId)
281         throws NoSuchBrowserTrackerException, SystemException {
282         BrowserTracker browserTracker = fetchByPrimaryKey(browserTrackerId);
283 
284         if (browserTracker == null) {
285             if (_log.isWarnEnabled()) {
286                 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + browserTrackerId);
287             }
288 
289             throw new NoSuchBrowserTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
290                 browserTrackerId);
291         }
292 
293         return browserTracker;
294     }
295 
296     public BrowserTracker fetchByPrimaryKey(Serializable primaryKey)
297         throws SystemException {
298         return fetchByPrimaryKey(((Long)primaryKey).longValue());
299     }
300 
301     public BrowserTracker fetchByPrimaryKey(long browserTrackerId)
302         throws SystemException {
303         BrowserTracker browserTracker = (BrowserTracker)EntityCacheUtil.getResult(BrowserTrackerModelImpl.ENTITY_CACHE_ENABLED,
304                 BrowserTrackerImpl.class, browserTrackerId, this);
305 
306         if (browserTracker == null) {
307             Session session = null;
308 
309             try {
310                 session = openSession();
311 
312                 browserTracker = (BrowserTracker)session.get(BrowserTrackerImpl.class,
313                         new Long(browserTrackerId));
314             }
315             catch (Exception e) {
316                 throw processException(e);
317             }
318             finally {
319                 if (browserTracker != null) {
320                     cacheResult(browserTracker);
321                 }
322 
323                 closeSession(session);
324             }
325         }
326 
327         return browserTracker;
328     }
329 
330     public BrowserTracker findByUserId(long userId)
331         throws NoSuchBrowserTrackerException, SystemException {
332         BrowserTracker browserTracker = fetchByUserId(userId);
333 
334         if (browserTracker == null) {
335             StringBundler msg = new StringBundler(4);
336 
337             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
338 
339             msg.append("userId=");
340             msg.append(userId);
341 
342             msg.append(StringPool.CLOSE_CURLY_BRACE);
343 
344             if (_log.isWarnEnabled()) {
345                 _log.warn(msg.toString());
346             }
347 
348             throw new NoSuchBrowserTrackerException(msg.toString());
349         }
350 
351         return browserTracker;
352     }
353 
354     public BrowserTracker fetchByUserId(long userId) throws SystemException {
355         return fetchByUserId(userId, true);
356     }
357 
358     public BrowserTracker fetchByUserId(long userId, boolean retrieveFromCache)
359         throws SystemException {
360         Object[] finderArgs = new Object[] { userId };
361 
362         Object result = null;
363 
364         if (retrieveFromCache) {
365             result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_USERID,
366                     finderArgs, this);
367         }
368 
369         if (result == null) {
370             StringBundler query = new StringBundler(2);
371 
372             query.append(_SQL_SELECT_BROWSERTRACKER_WHERE);
373 
374             query.append(_FINDER_COLUMN_USERID_USERID_2);
375 
376             String sql = query.toString();
377 
378             Session session = null;
379 
380             try {
381                 session = openSession();
382 
383                 Query q = session.createQuery(sql);
384 
385                 QueryPos qPos = QueryPos.getInstance(q);
386 
387                 qPos.add(userId);
388 
389                 List<BrowserTracker> list = q.list();
390 
391                 result = list;
392 
393                 BrowserTracker browserTracker = null;
394 
395                 if (list.isEmpty()) {
396                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
397                         finderArgs, list);
398                 }
399                 else {
400                     browserTracker = list.get(0);
401 
402                     cacheResult(browserTracker);
403 
404                     if ((browserTracker.getUserId() != userId)) {
405                         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
406                             finderArgs, browserTracker);
407                     }
408                 }
409 
410                 return browserTracker;
411             }
412             catch (Exception e) {
413                 throw processException(e);
414             }
415             finally {
416                 if (result == null) {
417                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
418                         finderArgs, new ArrayList<BrowserTracker>());
419                 }
420 
421                 closeSession(session);
422             }
423         }
424         else {
425             if (result instanceof List<?>) {
426                 return null;
427             }
428             else {
429                 return (BrowserTracker)result;
430             }
431         }
432     }
433 
434     public List<BrowserTracker> findAll() throws SystemException {
435         return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
436     }
437 
438     public List<BrowserTracker> findAll(int start, int end)
439         throws SystemException {
440         return findAll(start, end, null);
441     }
442 
443     public List<BrowserTracker> findAll(int start, int end,
444         OrderByComparator orderByComparator) throws SystemException {
445         Object[] finderArgs = new Object[] {
446                 String.valueOf(start), String.valueOf(end),
447                 String.valueOf(orderByComparator)
448             };
449 
450         List<BrowserTracker> list = (List<BrowserTracker>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
451                 finderArgs, this);
452 
453         if (list == null) {
454             StringBundler query = null;
455             String sql = null;
456 
457             if (orderByComparator != null) {
458                 query = new StringBundler(2 +
459                         (orderByComparator.getOrderByFields().length * 3));
460 
461                 query.append(_SQL_SELECT_BROWSERTRACKER);
462 
463                 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
464                     orderByComparator);
465 
466                 sql = query.toString();
467             }
468             else {
469                 sql = _SQL_SELECT_BROWSERTRACKER;
470             }
471 
472             Session session = null;
473 
474             try {
475                 session = openSession();
476 
477                 Query q = session.createQuery(sql);
478 
479                 if (orderByComparator == null) {
480                     list = (List<BrowserTracker>)QueryUtil.list(q,
481                             getDialect(), start, end, false);
482 
483                     Collections.sort(list);
484                 }
485                 else {
486                     list = (List<BrowserTracker>)QueryUtil.list(q,
487                             getDialect(), start, end);
488                 }
489             }
490             catch (Exception e) {
491                 throw processException(e);
492             }
493             finally {
494                 if (list == null) {
495                     list = new ArrayList<BrowserTracker>();
496                 }
497 
498                 cacheResult(list);
499 
500                 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
501 
502                 closeSession(session);
503             }
504         }
505 
506         return list;
507     }
508 
509     public void removeByUserId(long userId)
510         throws NoSuchBrowserTrackerException, SystemException {
511         BrowserTracker browserTracker = findByUserId(userId);
512 
513         remove(browserTracker);
514     }
515 
516     public void removeAll() throws SystemException {
517         for (BrowserTracker browserTracker : findAll()) {
518             remove(browserTracker);
519         }
520     }
521 
522     public int countByUserId(long userId) throws SystemException {
523         Object[] finderArgs = new Object[] { userId };
524 
525         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERID,
526                 finderArgs, this);
527 
528         if (count == null) {
529             StringBundler query = new StringBundler(2);
530 
531             query.append(_SQL_COUNT_BROWSERTRACKER_WHERE);
532 
533             query.append(_FINDER_COLUMN_USERID_USERID_2);
534 
535             String sql = query.toString();
536 
537             Session session = null;
538 
539             try {
540                 session = openSession();
541 
542                 Query q = session.createQuery(sql);
543 
544                 QueryPos qPos = QueryPos.getInstance(q);
545 
546                 qPos.add(userId);
547 
548                 count = (Long)q.uniqueResult();
549             }
550             catch (Exception e) {
551                 throw processException(e);
552             }
553             finally {
554                 if (count == null) {
555                     count = Long.valueOf(0);
556                 }
557 
558                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERID,
559                     finderArgs, count);
560 
561                 closeSession(session);
562             }
563         }
564 
565         return count.intValue();
566     }
567 
568     public int countAll() throws SystemException {
569         Object[] finderArgs = new Object[0];
570 
571         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
572                 finderArgs, this);
573 
574         if (count == null) {
575             Session session = null;
576 
577             try {
578                 session = openSession();
579 
580                 Query q = session.createQuery(_SQL_COUNT_BROWSERTRACKER);
581 
582                 count = (Long)q.uniqueResult();
583             }
584             catch (Exception e) {
585                 throw processException(e);
586             }
587             finally {
588                 if (count == null) {
589                     count = Long.valueOf(0);
590                 }
591 
592                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
593                     count);
594 
595                 closeSession(session);
596             }
597         }
598 
599         return count.intValue();
600     }
601 
602     public void afterPropertiesSet() {
603         String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
604                     com.liferay.portal.util.PropsUtil.get(
605                         "value.object.listener.com.liferay.portal.model.BrowserTracker")));
606 
607         if (listenerClassNames.length > 0) {
608             try {
609                 List<ModelListener<BrowserTracker>> listenersList = new ArrayList<ModelListener<BrowserTracker>>();
610 
611                 for (String listenerClassName : listenerClassNames) {
612                     listenersList.add((ModelListener<BrowserTracker>)InstanceFactory.newInstance(
613                             listenerClassName));
614                 }
615 
616                 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
617             }
618             catch (Exception e) {
619                 _log.error(e);
620             }
621         }
622     }
623 
624     public void destroy() {
625         EntityCacheUtil.removeCache(BrowserTrackerImpl.class.getName());
626         FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
627         FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
628     }
629 
630     @BeanReference(type = AccountPersistence.class)
631     protected AccountPersistence accountPersistence;
632     @BeanReference(type = AddressPersistence.class)
633     protected AddressPersistence addressPersistence;
634     @BeanReference(type = BrowserTrackerPersistence.class)
635     protected BrowserTrackerPersistence browserTrackerPersistence;
636     @BeanReference(type = ClassNamePersistence.class)
637     protected ClassNamePersistence classNamePersistence;
638     @BeanReference(type = CompanyPersistence.class)
639     protected CompanyPersistence companyPersistence;
640     @BeanReference(type = ContactPersistence.class)
641     protected ContactPersistence contactPersistence;
642     @BeanReference(type = CountryPersistence.class)
643     protected CountryPersistence countryPersistence;
644     @BeanReference(type = EmailAddressPersistence.class)
645     protected EmailAddressPersistence emailAddressPersistence;
646     @BeanReference(type = GroupPersistence.class)
647     protected GroupPersistence groupPersistence;
648     @BeanReference(type = ImagePersistence.class)
649     protected ImagePersistence imagePersistence;
650     @BeanReference(type = LayoutPersistence.class)
651     protected LayoutPersistence layoutPersistence;
652     @BeanReference(type = LayoutSetPersistence.class)
653     protected LayoutSetPersistence layoutSetPersistence;
654     @BeanReference(type = ListTypePersistence.class)
655     protected ListTypePersistence listTypePersistence;
656     @BeanReference(type = LockPersistence.class)
657     protected LockPersistence lockPersistence;
658     @BeanReference(type = MembershipRequestPersistence.class)
659     protected MembershipRequestPersistence membershipRequestPersistence;
660     @BeanReference(type = OrganizationPersistence.class)
661     protected OrganizationPersistence organizationPersistence;
662     @BeanReference(type = OrgGroupPermissionPersistence.class)
663     protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
664     @BeanReference(type = OrgGroupRolePersistence.class)
665     protected OrgGroupRolePersistence orgGroupRolePersistence;
666     @BeanReference(type = OrgLaborPersistence.class)
667     protected OrgLaborPersistence orgLaborPersistence;
668     @BeanReference(type = PasswordPolicyPersistence.class)
669     protected PasswordPolicyPersistence passwordPolicyPersistence;
670     @BeanReference(type = PasswordPolicyRelPersistence.class)
671     protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
672     @BeanReference(type = PasswordTrackerPersistence.class)
673     protected PasswordTrackerPersistence passwordTrackerPersistence;
674     @BeanReference(type = PermissionPersistence.class)
675     protected PermissionPersistence permissionPersistence;
676     @BeanReference(type = PhonePersistence.class)
677     protected PhonePersistence phonePersistence;
678     @BeanReference(type = PluginSettingPersistence.class)
679     protected PluginSettingPersistence pluginSettingPersistence;
680     @BeanReference(type = PortletPersistence.class)
681     protected PortletPersistence portletPersistence;
682     @BeanReference(type = PortletItemPersistence.class)
683     protected PortletItemPersistence portletItemPersistence;
684     @BeanReference(type = PortletPreferencesPersistence.class)
685     protected PortletPreferencesPersistence portletPreferencesPersistence;
686     @BeanReference(type = RegionPersistence.class)
687     protected RegionPersistence regionPersistence;
688     @BeanReference(type = ReleasePersistence.class)
689     protected ReleasePersistence releasePersistence;
690     @BeanReference(type = ResourcePersistence.class)
691     protected ResourcePersistence resourcePersistence;
692     @BeanReference(type = ResourceActionPersistence.class)
693     protected ResourceActionPersistence resourceActionPersistence;
694     @BeanReference(type = ResourceCodePersistence.class)
695     protected ResourceCodePersistence resourceCodePersistence;
696     @BeanReference(type = ResourcePermissionPersistence.class)
697     protected ResourcePermissionPersistence resourcePermissionPersistence;
698     @BeanReference(type = RolePersistence.class)
699     protected RolePersistence rolePersistence;
700     @BeanReference(type = ServiceComponentPersistence.class)
701     protected ServiceComponentPersistence serviceComponentPersistence;
702     @BeanReference(type = ShardPersistence.class)
703     protected ShardPersistence shardPersistence;
704     @BeanReference(type = SubscriptionPersistence.class)
705     protected SubscriptionPersistence subscriptionPersistence;
706     @BeanReference(type = UserPersistence.class)
707     protected UserPersistence userPersistence;
708     @BeanReference(type = UserGroupPersistence.class)
709     protected UserGroupPersistence userGroupPersistence;
710     @BeanReference(type = UserGroupGroupRolePersistence.class)
711     protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
712     @BeanReference(type = UserGroupRolePersistence.class)
713     protected UserGroupRolePersistence userGroupRolePersistence;
714     @BeanReference(type = UserIdMapperPersistence.class)
715     protected UserIdMapperPersistence userIdMapperPersistence;
716     @BeanReference(type = UserTrackerPersistence.class)
717     protected UserTrackerPersistence userTrackerPersistence;
718     @BeanReference(type = UserTrackerPathPersistence.class)
719     protected UserTrackerPathPersistence userTrackerPathPersistence;
720     @BeanReference(type = WebDAVPropsPersistence.class)
721     protected WebDAVPropsPersistence webDAVPropsPersistence;
722     @BeanReference(type = WebsitePersistence.class)
723     protected WebsitePersistence websitePersistence;
724     private static final String _SQL_SELECT_BROWSERTRACKER = "SELECT browserTracker FROM BrowserTracker browserTracker";
725     private static final String _SQL_SELECT_BROWSERTRACKER_WHERE = "SELECT browserTracker FROM BrowserTracker browserTracker WHERE ";
726     private static final String _SQL_COUNT_BROWSERTRACKER = "SELECT COUNT(browserTracker) FROM BrowserTracker browserTracker";
727     private static final String _SQL_COUNT_BROWSERTRACKER_WHERE = "SELECT COUNT(browserTracker) FROM BrowserTracker browserTracker WHERE ";
728     private static final String _FINDER_COLUMN_USERID_USERID_2 = "browserTracker.userId = ?";
729     private static final String _ORDER_BY_ENTITY_ALIAS = "browserTracker.";
730     private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No BrowserTracker exists with the primary key ";
731     private static final String _NO_SUCH_ENTITY_WITH_KEY = "No BrowserTracker exists with the key {";
732     private static Log _log = LogFactoryUtil.getLog(BrowserTrackerPersistenceImpl.class);
733 }