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.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.Date;
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link PasswordTracker}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see PasswordTracker
032     * @generated
033     */
034    @ProviderType
035    public class PasswordTrackerWrapper implements PasswordTracker,
036            ModelWrapper<PasswordTracker> {
037            public PasswordTrackerWrapper(PasswordTracker passwordTracker) {
038                    _passwordTracker = passwordTracker;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return PasswordTracker.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return PasswordTracker.class.getName();
049            }
050    
051            @Override
052            public Map<String, Object> getModelAttributes() {
053                    Map<String, Object> attributes = new HashMap<String, Object>();
054    
055                    attributes.put("mvccVersion", getMvccVersion());
056                    attributes.put("passwordTrackerId", getPasswordTrackerId());
057                    attributes.put("userId", getUserId());
058                    attributes.put("createDate", getCreateDate());
059                    attributes.put("password", getPassword());
060    
061                    return attributes;
062            }
063    
064            @Override
065            public void setModelAttributes(Map<String, Object> attributes) {
066                    Long mvccVersion = (Long)attributes.get("mvccVersion");
067    
068                    if (mvccVersion != null) {
069                            setMvccVersion(mvccVersion);
070                    }
071    
072                    Long passwordTrackerId = (Long)attributes.get("passwordTrackerId");
073    
074                    if (passwordTrackerId != null) {
075                            setPasswordTrackerId(passwordTrackerId);
076                    }
077    
078                    Long userId = (Long)attributes.get("userId");
079    
080                    if (userId != null) {
081                            setUserId(userId);
082                    }
083    
084                    Date createDate = (Date)attributes.get("createDate");
085    
086                    if (createDate != null) {
087                            setCreateDate(createDate);
088                    }
089    
090                    String password = (String)attributes.get("password");
091    
092                    if (password != null) {
093                            setPassword(password);
094                    }
095            }
096    
097            @Override
098            public java.lang.Object clone() {
099                    return new PasswordTrackerWrapper((PasswordTracker)_passwordTracker.clone());
100            }
101    
102            @Override
103            public int compareTo(
104                    com.liferay.portal.model.PasswordTracker passwordTracker) {
105                    return _passwordTracker.compareTo(passwordTracker);
106            }
107    
108            /**
109            * Returns the create date of this password tracker.
110            *
111            * @return the create date of this password tracker
112            */
113            @Override
114            public java.util.Date getCreateDate() {
115                    return _passwordTracker.getCreateDate();
116            }
117    
118            @Override
119            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
120                    return _passwordTracker.getExpandoBridge();
121            }
122    
123            /**
124            * Returns the mvcc version of this password tracker.
125            *
126            * @return the mvcc version of this password tracker
127            */
128            @Override
129            public long getMvccVersion() {
130                    return _passwordTracker.getMvccVersion();
131            }
132    
133            /**
134            * Returns the password of this password tracker.
135            *
136            * @return the password of this password tracker
137            */
138            @Override
139            public java.lang.String getPassword() {
140                    return _passwordTracker.getPassword();
141            }
142    
143            /**
144            * Returns the password tracker ID of this password tracker.
145            *
146            * @return the password tracker ID of this password tracker
147            */
148            @Override
149            public long getPasswordTrackerId() {
150                    return _passwordTracker.getPasswordTrackerId();
151            }
152    
153            /**
154            * Returns the primary key of this password tracker.
155            *
156            * @return the primary key of this password tracker
157            */
158            @Override
159            public long getPrimaryKey() {
160                    return _passwordTracker.getPrimaryKey();
161            }
162    
163            @Override
164            public java.io.Serializable getPrimaryKeyObj() {
165                    return _passwordTracker.getPrimaryKeyObj();
166            }
167    
168            /**
169            * Returns the user ID of this password tracker.
170            *
171            * @return the user ID of this password tracker
172            */
173            @Override
174            public long getUserId() {
175                    return _passwordTracker.getUserId();
176            }
177    
178            /**
179            * Returns the user uuid of this password tracker.
180            *
181            * @return the user uuid of this password tracker
182            */
183            @Override
184            public java.lang.String getUserUuid() {
185                    return _passwordTracker.getUserUuid();
186            }
187    
188            @Override
189            public int hashCode() {
190                    return _passwordTracker.hashCode();
191            }
192    
193            @Override
194            public boolean isCachedModel() {
195                    return _passwordTracker.isCachedModel();
196            }
197    
198            @Override
199            public boolean isEscapedModel() {
200                    return _passwordTracker.isEscapedModel();
201            }
202    
203            @Override
204            public boolean isNew() {
205                    return _passwordTracker.isNew();
206            }
207    
208            @Override
209            public void persist() {
210                    _passwordTracker.persist();
211            }
212    
213            @Override
214            public void setCachedModel(boolean cachedModel) {
215                    _passwordTracker.setCachedModel(cachedModel);
216            }
217    
218            /**
219            * Sets the create date of this password tracker.
220            *
221            * @param createDate the create date of this password tracker
222            */
223            @Override
224            public void setCreateDate(java.util.Date createDate) {
225                    _passwordTracker.setCreateDate(createDate);
226            }
227    
228            @Override
229            public void setExpandoBridgeAttributes(
230                    com.liferay.portal.model.BaseModel<?> baseModel) {
231                    _passwordTracker.setExpandoBridgeAttributes(baseModel);
232            }
233    
234            @Override
235            public void setExpandoBridgeAttributes(
236                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
237                    _passwordTracker.setExpandoBridgeAttributes(expandoBridge);
238            }
239    
240            @Override
241            public void setExpandoBridgeAttributes(
242                    com.liferay.portal.service.ServiceContext serviceContext) {
243                    _passwordTracker.setExpandoBridgeAttributes(serviceContext);
244            }
245    
246            /**
247            * Sets the mvcc version of this password tracker.
248            *
249            * @param mvccVersion the mvcc version of this password tracker
250            */
251            @Override
252            public void setMvccVersion(long mvccVersion) {
253                    _passwordTracker.setMvccVersion(mvccVersion);
254            }
255    
256            @Override
257            public void setNew(boolean n) {
258                    _passwordTracker.setNew(n);
259            }
260    
261            /**
262            * Sets the password of this password tracker.
263            *
264            * @param password the password of this password tracker
265            */
266            @Override
267            public void setPassword(java.lang.String password) {
268                    _passwordTracker.setPassword(password);
269            }
270    
271            /**
272            * Sets the password tracker ID of this password tracker.
273            *
274            * @param passwordTrackerId the password tracker ID of this password tracker
275            */
276            @Override
277            public void setPasswordTrackerId(long passwordTrackerId) {
278                    _passwordTracker.setPasswordTrackerId(passwordTrackerId);
279            }
280    
281            /**
282            * Sets the primary key of this password tracker.
283            *
284            * @param primaryKey the primary key of this password tracker
285            */
286            @Override
287            public void setPrimaryKey(long primaryKey) {
288                    _passwordTracker.setPrimaryKey(primaryKey);
289            }
290    
291            @Override
292            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
293                    _passwordTracker.setPrimaryKeyObj(primaryKeyObj);
294            }
295    
296            /**
297            * Sets the user ID of this password tracker.
298            *
299            * @param userId the user ID of this password tracker
300            */
301            @Override
302            public void setUserId(long userId) {
303                    _passwordTracker.setUserId(userId);
304            }
305    
306            /**
307            * Sets the user uuid of this password tracker.
308            *
309            * @param userUuid the user uuid of this password tracker
310            */
311            @Override
312            public void setUserUuid(java.lang.String userUuid) {
313                    _passwordTracker.setUserUuid(userUuid);
314            }
315    
316            @Override
317            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.PasswordTracker> toCacheModel() {
318                    return _passwordTracker.toCacheModel();
319            }
320    
321            @Override
322            public com.liferay.portal.model.PasswordTracker toEscapedModel() {
323                    return new PasswordTrackerWrapper(_passwordTracker.toEscapedModel());
324            }
325    
326            @Override
327            public java.lang.String toString() {
328                    return _passwordTracker.toString();
329            }
330    
331            @Override
332            public com.liferay.portal.model.PasswordTracker toUnescapedModel() {
333                    return new PasswordTrackerWrapper(_passwordTracker.toUnescapedModel());
334            }
335    
336            @Override
337            public java.lang.String toXmlString() {
338                    return _passwordTracker.toXmlString();
339            }
340    
341            @Override
342            public boolean equals(Object obj) {
343                    if (this == obj) {
344                            return true;
345                    }
346    
347                    if (!(obj instanceof PasswordTrackerWrapper)) {
348                            return false;
349                    }
350    
351                    PasswordTrackerWrapper passwordTrackerWrapper = (PasswordTrackerWrapper)obj;
352    
353                    if (Validator.equals(_passwordTracker,
354                                            passwordTrackerWrapper._passwordTracker)) {
355                            return true;
356                    }
357    
358                    return false;
359            }
360    
361            /**
362             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
363             */
364            @Deprecated
365            public PasswordTracker getWrappedPasswordTracker() {
366                    return _passwordTracker;
367            }
368    
369            @Override
370            public PasswordTracker getWrappedModel() {
371                    return _passwordTracker;
372            }
373    
374            @Override
375            public boolean isEntityCacheEnabled() {
376                    return _passwordTracker.isEntityCacheEnabled();
377            }
378    
379            @Override
380            public boolean isFinderCacheEnabled() {
381                    return _passwordTracker.isFinderCacheEnabled();
382            }
383    
384            @Override
385            public void resetOriginalValues() {
386                    _passwordTracker.resetOriginalValues();
387            }
388    
389            private final PasswordTracker _passwordTracker;
390    }