001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence.impl;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.NoSuchPasswordTrackerException;
020    import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
021    import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
022    import com.liferay.portal.kernel.dao.orm.FinderPath;
023    import com.liferay.portal.kernel.dao.orm.Query;
024    import com.liferay.portal.kernel.dao.orm.QueryPos;
025    import com.liferay.portal.kernel.dao.orm.QueryUtil;
026    import com.liferay.portal.kernel.dao.orm.Session;
027    import com.liferay.portal.kernel.log.Log;
028    import com.liferay.portal.kernel.log.LogFactoryUtil;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.kernel.util.SetUtil;
031    import com.liferay.portal.kernel.util.StringBundler;
032    import com.liferay.portal.kernel.util.StringPool;
033    import com.liferay.portal.model.CacheModel;
034    import com.liferay.portal.model.MVCCModel;
035    import com.liferay.portal.model.PasswordTracker;
036    import com.liferay.portal.model.impl.PasswordTrackerImpl;
037    import com.liferay.portal.model.impl.PasswordTrackerModelImpl;
038    import com.liferay.portal.service.persistence.PasswordTrackerPersistence;
039    
040    import java.io.Serializable;
041    
042    import java.util.Collections;
043    import java.util.HashMap;
044    import java.util.HashSet;
045    import java.util.Iterator;
046    import java.util.List;
047    import java.util.Map;
048    import java.util.Set;
049    
050    /**
051     * The persistence implementation for the password tracker service.
052     *
053     * <p>
054     * Caching information and settings can be found in <code>portal.properties</code>
055     * </p>
056     *
057     * @author Brian Wing Shun Chan
058     * @see PasswordTrackerPersistence
059     * @see com.liferay.portal.service.persistence.PasswordTrackerUtil
060     * @generated
061     */
062    @ProviderType
063    public class PasswordTrackerPersistenceImpl extends BasePersistenceImpl<PasswordTracker>
064            implements PasswordTrackerPersistence {
065            /*
066             * NOTE FOR DEVELOPERS:
067             *
068             * Never modify or reference this class directly. Always use {@link PasswordTrackerUtil} to access the password tracker persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
069             */
070            public static final String FINDER_CLASS_NAME_ENTITY = PasswordTrackerImpl.class.getName();
071            public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY +
072                    ".List1";
073            public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY +
074                    ".List2";
075            public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
076                            PasswordTrackerModelImpl.FINDER_CACHE_ENABLED,
077                            PasswordTrackerImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION,
078                            "findAll", new String[0]);
079            public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
080                            PasswordTrackerModelImpl.FINDER_CACHE_ENABLED,
081                            PasswordTrackerImpl.class,
082                            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]);
083            public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
084                            PasswordTrackerModelImpl.FINDER_CACHE_ENABLED, Long.class,
085                            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]);
086            public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID = new FinderPath(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
087                            PasswordTrackerModelImpl.FINDER_CACHE_ENABLED,
088                            PasswordTrackerImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION,
089                            "findByUserId",
090                            new String[] {
091                                    Long.class.getName(),
092                                    
093                            Integer.class.getName(), Integer.class.getName(),
094                                    OrderByComparator.class.getName()
095                            });
096            public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID =
097                    new FinderPath(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
098                            PasswordTrackerModelImpl.FINDER_CACHE_ENABLED,
099                            PasswordTrackerImpl.class,
100                            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUserId",
101                            new String[] { Long.class.getName() },
102                            PasswordTrackerModelImpl.USERID_COLUMN_BITMASK |
103                            PasswordTrackerModelImpl.CREATEDATE_COLUMN_BITMASK);
104            public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
105                            PasswordTrackerModelImpl.FINDER_CACHE_ENABLED, Long.class,
106                            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUserId",
107                            new String[] { Long.class.getName() });
108    
109            /**
110             * Returns all the password trackers where userId = &#63;.
111             *
112             * @param userId the user ID
113             * @return the matching password trackers
114             */
115            @Override
116            public List<PasswordTracker> findByUserId(long userId) {
117                    return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
118            }
119    
120            /**
121             * Returns a range of all the password trackers where userId = &#63;.
122             *
123             * <p>
124             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
125             * </p>
126             *
127             * @param userId the user ID
128             * @param start the lower bound of the range of password trackers
129             * @param end the upper bound of the range of password trackers (not inclusive)
130             * @return the range of matching password trackers
131             */
132            @Override
133            public List<PasswordTracker> findByUserId(long userId, int start, int end) {
134                    return findByUserId(userId, start, end, null);
135            }
136    
137            /**
138             * Returns an ordered range of all the password trackers where userId = &#63;.
139             *
140             * <p>
141             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
142             * </p>
143             *
144             * @param userId the user ID
145             * @param start the lower bound of the range of password trackers
146             * @param end the upper bound of the range of password trackers (not inclusive)
147             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
148             * @return the ordered range of matching password trackers
149             */
150            @Override
151            public List<PasswordTracker> findByUserId(long userId, int start, int end,
152                    OrderByComparator<PasswordTracker> orderByComparator) {
153                    boolean pagination = true;
154                    FinderPath finderPath = null;
155                    Object[] finderArgs = null;
156    
157                    if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
158                                    (orderByComparator == null)) {
159                            pagination = false;
160                            finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID;
161                            finderArgs = new Object[] { userId };
162                    }
163                    else {
164                            finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_USERID;
165                            finderArgs = new Object[] { userId, start, end, orderByComparator };
166                    }
167    
168                    List<PasswordTracker> list = (List<PasswordTracker>)FinderCacheUtil.getResult(finderPath,
169                                    finderArgs, this);
170    
171                    if ((list != null) && !list.isEmpty()) {
172                            for (PasswordTracker passwordTracker : list) {
173                                    if ((userId != passwordTracker.getUserId())) {
174                                            list = null;
175    
176                                            break;
177                                    }
178                            }
179                    }
180    
181                    if (list == null) {
182                            StringBundler query = null;
183    
184                            if (orderByComparator != null) {
185                                    query = new StringBundler(3 +
186                                                    (orderByComparator.getOrderByFields().length * 3));
187                            }
188                            else {
189                                    query = new StringBundler(3);
190                            }
191    
192                            query.append(_SQL_SELECT_PASSWORDTRACKER_WHERE);
193    
194                            query.append(_FINDER_COLUMN_USERID_USERID_2);
195    
196                            if (orderByComparator != null) {
197                                    appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
198                                            orderByComparator);
199                            }
200                            else
201                             if (pagination) {
202                                    query.append(PasswordTrackerModelImpl.ORDER_BY_JPQL);
203                            }
204    
205                            String sql = query.toString();
206    
207                            Session session = null;
208    
209                            try {
210                                    session = openSession();
211    
212                                    Query q = session.createQuery(sql);
213    
214                                    QueryPos qPos = QueryPos.getInstance(q);
215    
216                                    qPos.add(userId);
217    
218                                    if (!pagination) {
219                                            list = (List<PasswordTracker>)QueryUtil.list(q,
220                                                            getDialect(), start, end, false);
221    
222                                            Collections.sort(list);
223    
224                                            list = Collections.unmodifiableList(list);
225                                    }
226                                    else {
227                                            list = (List<PasswordTracker>)QueryUtil.list(q,
228                                                            getDialect(), start, end);
229                                    }
230    
231                                    cacheResult(list);
232    
233                                    FinderCacheUtil.putResult(finderPath, finderArgs, list);
234                            }
235                            catch (Exception e) {
236                                    FinderCacheUtil.removeResult(finderPath, finderArgs);
237    
238                                    throw processException(e);
239                            }
240                            finally {
241                                    closeSession(session);
242                            }
243                    }
244    
245                    return list;
246            }
247    
248            /**
249             * Returns the first password tracker in the ordered set where userId = &#63;.
250             *
251             * @param userId the user ID
252             * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
253             * @return the first matching password tracker
254             * @throws NoSuchPasswordTrackerException if a matching password tracker could not be found
255             */
256            @Override
257            public PasswordTracker findByUserId_First(long userId,
258                    OrderByComparator<PasswordTracker> orderByComparator)
259                    throws NoSuchPasswordTrackerException {
260                    PasswordTracker passwordTracker = fetchByUserId_First(userId,
261                                    orderByComparator);
262    
263                    if (passwordTracker != null) {
264                            return passwordTracker;
265                    }
266    
267                    StringBundler msg = new StringBundler(4);
268    
269                    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
270    
271                    msg.append("userId=");
272                    msg.append(userId);
273    
274                    msg.append(StringPool.CLOSE_CURLY_BRACE);
275    
276                    throw new NoSuchPasswordTrackerException(msg.toString());
277            }
278    
279            /**
280             * Returns the first password tracker in the ordered set where userId = &#63;.
281             *
282             * @param userId the user ID
283             * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284             * @return the first matching password tracker, or <code>null</code> if a matching password tracker could not be found
285             */
286            @Override
287            public PasswordTracker fetchByUserId_First(long userId,
288                    OrderByComparator<PasswordTracker> orderByComparator) {
289                    List<PasswordTracker> list = findByUserId(userId, 0, 1,
290                                    orderByComparator);
291    
292                    if (!list.isEmpty()) {
293                            return list.get(0);
294                    }
295    
296                    return null;
297            }
298    
299            /**
300             * Returns the last password tracker in the ordered set where userId = &#63;.
301             *
302             * @param userId the user ID
303             * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
304             * @return the last matching password tracker
305             * @throws NoSuchPasswordTrackerException if a matching password tracker could not be found
306             */
307            @Override
308            public PasswordTracker findByUserId_Last(long userId,
309                    OrderByComparator<PasswordTracker> orderByComparator)
310                    throws NoSuchPasswordTrackerException {
311                    PasswordTracker passwordTracker = fetchByUserId_Last(userId,
312                                    orderByComparator);
313    
314                    if (passwordTracker != null) {
315                            return passwordTracker;
316                    }
317    
318                    StringBundler msg = new StringBundler(4);
319    
320                    msg.append(_NO_SUCH_ENTITY_WITH_KEY);
321    
322                    msg.append("userId=");
323                    msg.append(userId);
324    
325                    msg.append(StringPool.CLOSE_CURLY_BRACE);
326    
327                    throw new NoSuchPasswordTrackerException(msg.toString());
328            }
329    
330            /**
331             * Returns the last password tracker in the ordered set where userId = &#63;.
332             *
333             * @param userId the user ID
334             * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335             * @return the last matching password tracker, or <code>null</code> if a matching password tracker could not be found
336             */
337            @Override
338            public PasswordTracker fetchByUserId_Last(long userId,
339                    OrderByComparator<PasswordTracker> orderByComparator) {
340                    int count = countByUserId(userId);
341    
342                    if (count == 0) {
343                            return null;
344                    }
345    
346                    List<PasswordTracker> list = findByUserId(userId, count - 1, count,
347                                    orderByComparator);
348    
349                    if (!list.isEmpty()) {
350                            return list.get(0);
351                    }
352    
353                    return null;
354            }
355    
356            /**
357             * Returns the password trackers before and after the current password tracker in the ordered set where userId = &#63;.
358             *
359             * @param passwordTrackerId the primary key of the current password tracker
360             * @param userId the user ID
361             * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
362             * @return the previous, current, and next password tracker
363             * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
364             */
365            @Override
366            public PasswordTracker[] findByUserId_PrevAndNext(long passwordTrackerId,
367                    long userId, OrderByComparator<PasswordTracker> orderByComparator)
368                    throws NoSuchPasswordTrackerException {
369                    PasswordTracker passwordTracker = findByPrimaryKey(passwordTrackerId);
370    
371                    Session session = null;
372    
373                    try {
374                            session = openSession();
375    
376                            PasswordTracker[] array = new PasswordTrackerImpl[3];
377    
378                            array[0] = getByUserId_PrevAndNext(session, passwordTracker,
379                                            userId, orderByComparator, true);
380    
381                            array[1] = passwordTracker;
382    
383                            array[2] = getByUserId_PrevAndNext(session, passwordTracker,
384                                            userId, orderByComparator, false);
385    
386                            return array;
387                    }
388                    catch (Exception e) {
389                            throw processException(e);
390                    }
391                    finally {
392                            closeSession(session);
393                    }
394            }
395    
396            protected PasswordTracker getByUserId_PrevAndNext(Session session,
397                    PasswordTracker passwordTracker, long userId,
398                    OrderByComparator<PasswordTracker> orderByComparator, boolean previous) {
399                    StringBundler query = null;
400    
401                    if (orderByComparator != null) {
402                            query = new StringBundler(6 +
403                                            (orderByComparator.getOrderByFields().length * 6));
404                    }
405                    else {
406                            query = new StringBundler(3);
407                    }
408    
409                    query.append(_SQL_SELECT_PASSWORDTRACKER_WHERE);
410    
411                    query.append(_FINDER_COLUMN_USERID_USERID_2);
412    
413                    if (orderByComparator != null) {
414                            String[] orderByConditionFields = orderByComparator.getOrderByConditionFields();
415    
416                            if (orderByConditionFields.length > 0) {
417                                    query.append(WHERE_AND);
418                            }
419    
420                            for (int i = 0; i < orderByConditionFields.length; i++) {
421                                    query.append(_ORDER_BY_ENTITY_ALIAS);
422                                    query.append(orderByConditionFields[i]);
423    
424                                    if ((i + 1) < orderByConditionFields.length) {
425                                            if (orderByComparator.isAscending() ^ previous) {
426                                                    query.append(WHERE_GREATER_THAN_HAS_NEXT);
427                                            }
428                                            else {
429                                                    query.append(WHERE_LESSER_THAN_HAS_NEXT);
430                                            }
431                                    }
432                                    else {
433                                            if (orderByComparator.isAscending() ^ previous) {
434                                                    query.append(WHERE_GREATER_THAN);
435                                            }
436                                            else {
437                                                    query.append(WHERE_LESSER_THAN);
438                                            }
439                                    }
440                            }
441    
442                            query.append(ORDER_BY_CLAUSE);
443    
444                            String[] orderByFields = orderByComparator.getOrderByFields();
445    
446                            for (int i = 0; i < orderByFields.length; i++) {
447                                    query.append(_ORDER_BY_ENTITY_ALIAS);
448                                    query.append(orderByFields[i]);
449    
450                                    if ((i + 1) < orderByFields.length) {
451                                            if (orderByComparator.isAscending() ^ previous) {
452                                                    query.append(ORDER_BY_ASC_HAS_NEXT);
453                                            }
454                                            else {
455                                                    query.append(ORDER_BY_DESC_HAS_NEXT);
456                                            }
457                                    }
458                                    else {
459                                            if (orderByComparator.isAscending() ^ previous) {
460                                                    query.append(ORDER_BY_ASC);
461                                            }
462                                            else {
463                                                    query.append(ORDER_BY_DESC);
464                                            }
465                                    }
466                            }
467                    }
468                    else {
469                            query.append(PasswordTrackerModelImpl.ORDER_BY_JPQL);
470                    }
471    
472                    String sql = query.toString();
473    
474                    Query q = session.createQuery(sql);
475    
476                    q.setFirstResult(0);
477                    q.setMaxResults(2);
478    
479                    QueryPos qPos = QueryPos.getInstance(q);
480    
481                    qPos.add(userId);
482    
483                    if (orderByComparator != null) {
484                            Object[] values = orderByComparator.getOrderByConditionValues(passwordTracker);
485    
486                            for (Object value : values) {
487                                    qPos.add(value);
488                            }
489                    }
490    
491                    List<PasswordTracker> list = q.list();
492    
493                    if (list.size() == 2) {
494                            return list.get(1);
495                    }
496                    else {
497                            return null;
498                    }
499            }
500    
501            /**
502             * Removes all the password trackers where userId = &#63; from the database.
503             *
504             * @param userId the user ID
505             */
506            @Override
507            public void removeByUserId(long userId) {
508                    for (PasswordTracker passwordTracker : findByUserId(userId,
509                                    QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
510                            remove(passwordTracker);
511                    }
512            }
513    
514            /**
515             * Returns the number of password trackers where userId = &#63;.
516             *
517             * @param userId the user ID
518             * @return the number of matching password trackers
519             */
520            @Override
521            public int countByUserId(long userId) {
522                    FinderPath finderPath = FINDER_PATH_COUNT_BY_USERID;
523    
524                    Object[] finderArgs = new Object[] { userId };
525    
526                    Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,
527                                    this);
528    
529                    if (count == null) {
530                            StringBundler query = new StringBundler(2);
531    
532                            query.append(_SQL_COUNT_PASSWORDTRACKER_WHERE);
533    
534                            query.append(_FINDER_COLUMN_USERID_USERID_2);
535    
536                            String sql = query.toString();
537    
538                            Session session = null;
539    
540                            try {
541                                    session = openSession();
542    
543                                    Query q = session.createQuery(sql);
544    
545                                    QueryPos qPos = QueryPos.getInstance(q);
546    
547                                    qPos.add(userId);
548    
549                                    count = (Long)q.uniqueResult();
550    
551                                    FinderCacheUtil.putResult(finderPath, finderArgs, count);
552                            }
553                            catch (Exception e) {
554                                    FinderCacheUtil.removeResult(finderPath, finderArgs);
555    
556                                    throw processException(e);
557                            }
558                            finally {
559                                    closeSession(session);
560                            }
561                    }
562    
563                    return count.intValue();
564            }
565    
566            private static final String _FINDER_COLUMN_USERID_USERID_2 = "passwordTracker.userId = ?";
567    
568            public PasswordTrackerPersistenceImpl() {
569                    setModelClass(PasswordTracker.class);
570            }
571    
572            /**
573             * Caches the password tracker in the entity cache if it is enabled.
574             *
575             * @param passwordTracker the password tracker
576             */
577            @Override
578            public void cacheResult(PasswordTracker passwordTracker) {
579                    EntityCacheUtil.putResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
580                            PasswordTrackerImpl.class, passwordTracker.getPrimaryKey(),
581                            passwordTracker);
582    
583                    passwordTracker.resetOriginalValues();
584            }
585    
586            /**
587             * Caches the password trackers in the entity cache if it is enabled.
588             *
589             * @param passwordTrackers the password trackers
590             */
591            @Override
592            public void cacheResult(List<PasswordTracker> passwordTrackers) {
593                    for (PasswordTracker passwordTracker : passwordTrackers) {
594                            if (EntityCacheUtil.getResult(
595                                                    PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
596                                                    PasswordTrackerImpl.class,
597                                                    passwordTracker.getPrimaryKey()) == null) {
598                                    cacheResult(passwordTracker);
599                            }
600                            else {
601                                    passwordTracker.resetOriginalValues();
602                            }
603                    }
604            }
605    
606            /**
607             * Clears the cache for all password trackers.
608             *
609             * <p>
610             * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
611             * </p>
612             */
613            @Override
614            public void clearCache() {
615                    EntityCacheUtil.clearCache(PasswordTrackerImpl.class);
616    
617                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
618                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
619                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
620            }
621    
622            /**
623             * Clears the cache for the password tracker.
624             *
625             * <p>
626             * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
627             * </p>
628             */
629            @Override
630            public void clearCache(PasswordTracker passwordTracker) {
631                    EntityCacheUtil.removeResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
632                            PasswordTrackerImpl.class, passwordTracker.getPrimaryKey());
633    
634                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
635                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
636            }
637    
638            @Override
639            public void clearCache(List<PasswordTracker> passwordTrackers) {
640                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
641                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
642    
643                    for (PasswordTracker passwordTracker : passwordTrackers) {
644                            EntityCacheUtil.removeResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
645                                    PasswordTrackerImpl.class, passwordTracker.getPrimaryKey());
646                    }
647            }
648    
649            /**
650             * Creates a new password tracker with the primary key. Does not add the password tracker to the database.
651             *
652             * @param passwordTrackerId the primary key for the new password tracker
653             * @return the new password tracker
654             */
655            @Override
656            public PasswordTracker create(long passwordTrackerId) {
657                    PasswordTracker passwordTracker = new PasswordTrackerImpl();
658    
659                    passwordTracker.setNew(true);
660                    passwordTracker.setPrimaryKey(passwordTrackerId);
661    
662                    return passwordTracker;
663            }
664    
665            /**
666             * Removes the password tracker with the primary key from the database. Also notifies the appropriate model listeners.
667             *
668             * @param passwordTrackerId the primary key of the password tracker
669             * @return the password tracker that was removed
670             * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
671             */
672            @Override
673            public PasswordTracker remove(long passwordTrackerId)
674                    throws NoSuchPasswordTrackerException {
675                    return remove((Serializable)passwordTrackerId);
676            }
677    
678            /**
679             * Removes the password tracker with the primary key from the database. Also notifies the appropriate model listeners.
680             *
681             * @param primaryKey the primary key of the password tracker
682             * @return the password tracker that was removed
683             * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
684             */
685            @Override
686            public PasswordTracker remove(Serializable primaryKey)
687                    throws NoSuchPasswordTrackerException {
688                    Session session = null;
689    
690                    try {
691                            session = openSession();
692    
693                            PasswordTracker passwordTracker = (PasswordTracker)session.get(PasswordTrackerImpl.class,
694                                            primaryKey);
695    
696                            if (passwordTracker == null) {
697                                    if (_log.isWarnEnabled()) {
698                                            _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
699                                    }
700    
701                                    throw new NoSuchPasswordTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
702                                            primaryKey);
703                            }
704    
705                            return remove(passwordTracker);
706                    }
707                    catch (NoSuchPasswordTrackerException nsee) {
708                            throw nsee;
709                    }
710                    catch (Exception e) {
711                            throw processException(e);
712                    }
713                    finally {
714                            closeSession(session);
715                    }
716            }
717    
718            @Override
719            protected PasswordTracker removeImpl(PasswordTracker passwordTracker) {
720                    passwordTracker = toUnwrappedModel(passwordTracker);
721    
722                    Session session = null;
723    
724                    try {
725                            session = openSession();
726    
727                            if (!session.contains(passwordTracker)) {
728                                    passwordTracker = (PasswordTracker)session.get(PasswordTrackerImpl.class,
729                                                    passwordTracker.getPrimaryKeyObj());
730                            }
731    
732                            if (passwordTracker != null) {
733                                    session.delete(passwordTracker);
734                            }
735                    }
736                    catch (Exception e) {
737                            throw processException(e);
738                    }
739                    finally {
740                            closeSession(session);
741                    }
742    
743                    if (passwordTracker != null) {
744                            clearCache(passwordTracker);
745                    }
746    
747                    return passwordTracker;
748            }
749    
750            @Override
751            public PasswordTracker updateImpl(PasswordTracker passwordTracker) {
752                    passwordTracker = toUnwrappedModel(passwordTracker);
753    
754                    boolean isNew = passwordTracker.isNew();
755    
756                    PasswordTrackerModelImpl passwordTrackerModelImpl = (PasswordTrackerModelImpl)passwordTracker;
757    
758                    Session session = null;
759    
760                    try {
761                            session = openSession();
762    
763                            if (passwordTracker.isNew()) {
764                                    session.save(passwordTracker);
765    
766                                    passwordTracker.setNew(false);
767                            }
768                            else {
769                                    session.merge(passwordTracker);
770                            }
771                    }
772                    catch (Exception e) {
773                            throw processException(e);
774                    }
775                    finally {
776                            closeSession(session);
777                    }
778    
779                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
780    
781                    if (isNew || !PasswordTrackerModelImpl.COLUMN_BITMASK_ENABLED) {
782                            FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
783                    }
784    
785                    else {
786                            if ((passwordTrackerModelImpl.getColumnBitmask() &
787                                            FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) {
788                                    Object[] args = new Object[] {
789                                                    passwordTrackerModelImpl.getOriginalUserId()
790                                            };
791    
792                                    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
793                                    FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
794                                            args);
795    
796                                    args = new Object[] { passwordTrackerModelImpl.getUserId() };
797    
798                                    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
799                                    FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
800                                            args);
801                            }
802                    }
803    
804                    EntityCacheUtil.putResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
805                            PasswordTrackerImpl.class, passwordTracker.getPrimaryKey(),
806                            passwordTracker, false);
807    
808                    passwordTracker.resetOriginalValues();
809    
810                    return passwordTracker;
811            }
812    
813            protected PasswordTracker toUnwrappedModel(PasswordTracker passwordTracker) {
814                    if (passwordTracker instanceof PasswordTrackerImpl) {
815                            return passwordTracker;
816                    }
817    
818                    PasswordTrackerImpl passwordTrackerImpl = new PasswordTrackerImpl();
819    
820                    passwordTrackerImpl.setNew(passwordTracker.isNew());
821                    passwordTrackerImpl.setPrimaryKey(passwordTracker.getPrimaryKey());
822    
823                    passwordTrackerImpl.setMvccVersion(passwordTracker.getMvccVersion());
824                    passwordTrackerImpl.setPasswordTrackerId(passwordTracker.getPasswordTrackerId());
825                    passwordTrackerImpl.setUserId(passwordTracker.getUserId());
826                    passwordTrackerImpl.setCreateDate(passwordTracker.getCreateDate());
827                    passwordTrackerImpl.setPassword(passwordTracker.getPassword());
828    
829                    return passwordTrackerImpl;
830            }
831    
832            /**
833             * Returns the password tracker with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found.
834             *
835             * @param primaryKey the primary key of the password tracker
836             * @return the password tracker
837             * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
838             */
839            @Override
840            public PasswordTracker findByPrimaryKey(Serializable primaryKey)
841                    throws NoSuchPasswordTrackerException {
842                    PasswordTracker passwordTracker = fetchByPrimaryKey(primaryKey);
843    
844                    if (passwordTracker == null) {
845                            if (_log.isWarnEnabled()) {
846                                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
847                            }
848    
849                            throw new NoSuchPasswordTrackerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
850                                    primaryKey);
851                    }
852    
853                    return passwordTracker;
854            }
855    
856            /**
857             * Returns the password tracker with the primary key or throws a {@link NoSuchPasswordTrackerException} if it could not be found.
858             *
859             * @param passwordTrackerId the primary key of the password tracker
860             * @return the password tracker
861             * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
862             */
863            @Override
864            public PasswordTracker findByPrimaryKey(long passwordTrackerId)
865                    throws NoSuchPasswordTrackerException {
866                    return findByPrimaryKey((Serializable)passwordTrackerId);
867            }
868    
869            /**
870             * Returns the password tracker with the primary key or returns <code>null</code> if it could not be found.
871             *
872             * @param primaryKey the primary key of the password tracker
873             * @return the password tracker, or <code>null</code> if a password tracker with the primary key could not be found
874             */
875            @Override
876            public PasswordTracker fetchByPrimaryKey(Serializable primaryKey) {
877                    PasswordTracker passwordTracker = (PasswordTracker)EntityCacheUtil.getResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
878                                    PasswordTrackerImpl.class, primaryKey);
879    
880                    if (passwordTracker == _nullPasswordTracker) {
881                            return null;
882                    }
883    
884                    if (passwordTracker == null) {
885                            Session session = null;
886    
887                            try {
888                                    session = openSession();
889    
890                                    passwordTracker = (PasswordTracker)session.get(PasswordTrackerImpl.class,
891                                                    primaryKey);
892    
893                                    if (passwordTracker != null) {
894                                            cacheResult(passwordTracker);
895                                    }
896                                    else {
897                                            EntityCacheUtil.putResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
898                                                    PasswordTrackerImpl.class, primaryKey,
899                                                    _nullPasswordTracker);
900                                    }
901                            }
902                            catch (Exception e) {
903                                    EntityCacheUtil.removeResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
904                                            PasswordTrackerImpl.class, primaryKey);
905    
906                                    throw processException(e);
907                            }
908                            finally {
909                                    closeSession(session);
910                            }
911                    }
912    
913                    return passwordTracker;
914            }
915    
916            /**
917             * Returns the password tracker with the primary key or returns <code>null</code> if it could not be found.
918             *
919             * @param passwordTrackerId the primary key of the password tracker
920             * @return the password tracker, or <code>null</code> if a password tracker with the primary key could not be found
921             */
922            @Override
923            public PasswordTracker fetchByPrimaryKey(long passwordTrackerId) {
924                    return fetchByPrimaryKey((Serializable)passwordTrackerId);
925            }
926    
927            @Override
928            public Map<Serializable, PasswordTracker> fetchByPrimaryKeys(
929                    Set<Serializable> primaryKeys) {
930                    if (primaryKeys.isEmpty()) {
931                            return Collections.emptyMap();
932                    }
933    
934                    Map<Serializable, PasswordTracker> map = new HashMap<Serializable, PasswordTracker>();
935    
936                    if (primaryKeys.size() == 1) {
937                            Iterator<Serializable> iterator = primaryKeys.iterator();
938    
939                            Serializable primaryKey = iterator.next();
940    
941                            PasswordTracker passwordTracker = fetchByPrimaryKey(primaryKey);
942    
943                            if (passwordTracker != null) {
944                                    map.put(primaryKey, passwordTracker);
945                            }
946    
947                            return map;
948                    }
949    
950                    Set<Serializable> uncachedPrimaryKeys = null;
951    
952                    for (Serializable primaryKey : primaryKeys) {
953                            PasswordTracker passwordTracker = (PasswordTracker)EntityCacheUtil.getResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
954                                            PasswordTrackerImpl.class, primaryKey);
955    
956                            if (passwordTracker == null) {
957                                    if (uncachedPrimaryKeys == null) {
958                                            uncachedPrimaryKeys = new HashSet<Serializable>();
959                                    }
960    
961                                    uncachedPrimaryKeys.add(primaryKey);
962                            }
963                            else {
964                                    map.put(primaryKey, passwordTracker);
965                            }
966                    }
967    
968                    if (uncachedPrimaryKeys == null) {
969                            return map;
970                    }
971    
972                    StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) +
973                                    1);
974    
975                    query.append(_SQL_SELECT_PASSWORDTRACKER_WHERE_PKS_IN);
976    
977                    for (Serializable primaryKey : uncachedPrimaryKeys) {
978                            query.append(String.valueOf(primaryKey));
979    
980                            query.append(StringPool.COMMA);
981                    }
982    
983                    query.setIndex(query.index() - 1);
984    
985                    query.append(StringPool.CLOSE_PARENTHESIS);
986    
987                    String sql = query.toString();
988    
989                    Session session = null;
990    
991                    try {
992                            session = openSession();
993    
994                            Query q = session.createQuery(sql);
995    
996                            for (PasswordTracker passwordTracker : (List<PasswordTracker>)q.list()) {
997                                    map.put(passwordTracker.getPrimaryKeyObj(), passwordTracker);
998    
999                                    cacheResult(passwordTracker);
1000    
1001                                    uncachedPrimaryKeys.remove(passwordTracker.getPrimaryKeyObj());
1002                            }
1003    
1004                            for (Serializable primaryKey : uncachedPrimaryKeys) {
1005                                    EntityCacheUtil.putResult(PasswordTrackerModelImpl.ENTITY_CACHE_ENABLED,
1006                                            PasswordTrackerImpl.class, primaryKey, _nullPasswordTracker);
1007                            }
1008                    }
1009                    catch (Exception e) {
1010                            throw processException(e);
1011                    }
1012                    finally {
1013                            closeSession(session);
1014                    }
1015    
1016                    return map;
1017            }
1018    
1019            /**
1020             * Returns all the password trackers.
1021             *
1022             * @return the password trackers
1023             */
1024            @Override
1025            public List<PasswordTracker> findAll() {
1026                    return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1027            }
1028    
1029            /**
1030             * Returns a range of all the password trackers.
1031             *
1032             * <p>
1033             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1034             * </p>
1035             *
1036             * @param start the lower bound of the range of password trackers
1037             * @param end the upper bound of the range of password trackers (not inclusive)
1038             * @return the range of password trackers
1039             */
1040            @Override
1041            public List<PasswordTracker> findAll(int start, int end) {
1042                    return findAll(start, end, null);
1043            }
1044    
1045            /**
1046             * Returns an ordered range of all the password trackers.
1047             *
1048             * <p>
1049             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1050             * </p>
1051             *
1052             * @param start the lower bound of the range of password trackers
1053             * @param end the upper bound of the range of password trackers (not inclusive)
1054             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1055             * @return the ordered range of password trackers
1056             */
1057            @Override
1058            public List<PasswordTracker> findAll(int start, int end,
1059                    OrderByComparator<PasswordTracker> orderByComparator) {
1060                    boolean pagination = true;
1061                    FinderPath finderPath = null;
1062                    Object[] finderArgs = null;
1063    
1064                    if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
1065                                    (orderByComparator == null)) {
1066                            pagination = false;
1067                            finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL;
1068                            finderArgs = FINDER_ARGS_EMPTY;
1069                    }
1070                    else {
1071                            finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL;
1072                            finderArgs = new Object[] { start, end, orderByComparator };
1073                    }
1074    
1075                    List<PasswordTracker> list = (List<PasswordTracker>)FinderCacheUtil.getResult(finderPath,
1076                                    finderArgs, this);
1077    
1078                    if (list == null) {
1079                            StringBundler query = null;
1080                            String sql = null;
1081    
1082                            if (orderByComparator != null) {
1083                                    query = new StringBundler(2 +
1084                                                    (orderByComparator.getOrderByFields().length * 3));
1085    
1086                                    query.append(_SQL_SELECT_PASSWORDTRACKER);
1087    
1088                                    appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1089                                            orderByComparator);
1090    
1091                                    sql = query.toString();
1092                            }
1093                            else {
1094                                    sql = _SQL_SELECT_PASSWORDTRACKER;
1095    
1096                                    if (pagination) {
1097                                            sql = sql.concat(PasswordTrackerModelImpl.ORDER_BY_JPQL);
1098                                    }
1099                            }
1100    
1101                            Session session = null;
1102    
1103                            try {
1104                                    session = openSession();
1105    
1106                                    Query q = session.createQuery(sql);
1107    
1108                                    if (!pagination) {
1109                                            list = (List<PasswordTracker>)QueryUtil.list(q,
1110                                                            getDialect(), start, end, false);
1111    
1112                                            Collections.sort(list);
1113    
1114                                            list = Collections.unmodifiableList(list);
1115                                    }
1116                                    else {
1117                                            list = (List<PasswordTracker>)QueryUtil.list(q,
1118                                                            getDialect(), start, end);
1119                                    }
1120    
1121                                    cacheResult(list);
1122    
1123                                    FinderCacheUtil.putResult(finderPath, finderArgs, list);
1124                            }
1125                            catch (Exception e) {
1126                                    FinderCacheUtil.removeResult(finderPath, finderArgs);
1127    
1128                                    throw processException(e);
1129                            }
1130                            finally {
1131                                    closeSession(session);
1132                            }
1133                    }
1134    
1135                    return list;
1136            }
1137    
1138            /**
1139             * Removes all the password trackers from the database.
1140             *
1141             */
1142            @Override
1143            public void removeAll() {
1144                    for (PasswordTracker passwordTracker : findAll()) {
1145                            remove(passwordTracker);
1146                    }
1147            }
1148    
1149            /**
1150             * Returns the number of password trackers.
1151             *
1152             * @return the number of password trackers
1153             */
1154            @Override
1155            public int countAll() {
1156                    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1157                                    FINDER_ARGS_EMPTY, this);
1158    
1159                    if (count == null) {
1160                            Session session = null;
1161    
1162                            try {
1163                                    session = openSession();
1164    
1165                                    Query q = session.createQuery(_SQL_COUNT_PASSWORDTRACKER);
1166    
1167                                    count = (Long)q.uniqueResult();
1168    
1169                                    FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,
1170                                            FINDER_ARGS_EMPTY, count);
1171                            }
1172                            catch (Exception e) {
1173                                    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,
1174                                            FINDER_ARGS_EMPTY);
1175    
1176                                    throw processException(e);
1177                            }
1178                            finally {
1179                                    closeSession(session);
1180                            }
1181                    }
1182    
1183                    return count.intValue();
1184            }
1185    
1186            @Override
1187            protected Set<String> getBadColumnNames() {
1188                    return _badColumnNames;
1189            }
1190    
1191            /**
1192             * Initializes the password tracker persistence.
1193             */
1194            public void afterPropertiesSet() {
1195            }
1196    
1197            public void destroy() {
1198                    EntityCacheUtil.removeCache(PasswordTrackerImpl.class.getName());
1199                    FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
1200                    FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
1201                    FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
1202            }
1203    
1204            private static final String _SQL_SELECT_PASSWORDTRACKER = "SELECT passwordTracker FROM PasswordTracker passwordTracker";
1205            private static final String _SQL_SELECT_PASSWORDTRACKER_WHERE_PKS_IN = "SELECT passwordTracker FROM PasswordTracker passwordTracker WHERE passwordTrackerId IN (";
1206            private static final String _SQL_SELECT_PASSWORDTRACKER_WHERE = "SELECT passwordTracker FROM PasswordTracker passwordTracker WHERE ";
1207            private static final String _SQL_COUNT_PASSWORDTRACKER = "SELECT COUNT(passwordTracker) FROM PasswordTracker passwordTracker";
1208            private static final String _SQL_COUNT_PASSWORDTRACKER_WHERE = "SELECT COUNT(passwordTracker) FROM PasswordTracker passwordTracker WHERE ";
1209            private static final String _ORDER_BY_ENTITY_ALIAS = "passwordTracker.";
1210            private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No PasswordTracker exists with the primary key ";
1211            private static final String _NO_SUCH_ENTITY_WITH_KEY = "No PasswordTracker exists with the key {";
1212            private static final Log _log = LogFactoryUtil.getLog(PasswordTrackerPersistenceImpl.class);
1213            private static final Set<String> _badColumnNames = SetUtil.fromArray(new String[] {
1214                                    "password"
1215                            });
1216            private static final PasswordTracker _nullPasswordTracker = new PasswordTrackerImpl() {
1217                            @Override
1218                            public Object clone() {
1219                                    return this;
1220                            }
1221    
1222                            @Override
1223                            public CacheModel<PasswordTracker> toCacheModel() {
1224                                    return _nullPasswordTrackerCacheModel;
1225                            }
1226                    };
1227    
1228            private static final CacheModel<PasswordTracker> _nullPasswordTrackerCacheModel =
1229                    new NullCacheModel();
1230    
1231            private static class NullCacheModel implements CacheModel<PasswordTracker>,
1232                    MVCCModel {
1233                    @Override
1234                    public long getMvccVersion() {
1235                            return -1;
1236                    }
1237    
1238                    @Override
1239                    public void setMvccVersion(long mvccVersion) {
1240                    }
1241    
1242                    @Override
1243                    public PasswordTracker toEntityModel() {
1244                            return _nullPasswordTracker;
1245                    }
1246            }
1247    }