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 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(Date createDate) {
225                    _passwordTracker.setCreateDate(createDate);
226            }
227    
228            @Override
229            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
230                    _passwordTracker.setExpandoBridgeAttributes(baseModel);
231            }
232    
233            @Override
234            public void setExpandoBridgeAttributes(
235                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
236                    _passwordTracker.setExpandoBridgeAttributes(expandoBridge);
237            }
238    
239            @Override
240            public void setExpandoBridgeAttributes(
241                    com.liferay.portal.service.ServiceContext serviceContext) {
242                    _passwordTracker.setExpandoBridgeAttributes(serviceContext);
243            }
244    
245            /**
246            * Sets the mvcc version of this password tracker.
247            *
248            * @param mvccVersion the mvcc version of this password tracker
249            */
250            @Override
251            public void setMvccVersion(long mvccVersion) {
252                    _passwordTracker.setMvccVersion(mvccVersion);
253            }
254    
255            @Override
256            public void setNew(boolean n) {
257                    _passwordTracker.setNew(n);
258            }
259    
260            /**
261            * Sets the password of this password tracker.
262            *
263            * @param password the password of this password tracker
264            */
265            @Override
266            public void setPassword(java.lang.String password) {
267                    _passwordTracker.setPassword(password);
268            }
269    
270            /**
271            * Sets the password tracker ID of this password tracker.
272            *
273            * @param passwordTrackerId the password tracker ID of this password tracker
274            */
275            @Override
276            public void setPasswordTrackerId(long passwordTrackerId) {
277                    _passwordTracker.setPasswordTrackerId(passwordTrackerId);
278            }
279    
280            /**
281            * Sets the primary key of this password tracker.
282            *
283            * @param primaryKey the primary key of this password tracker
284            */
285            @Override
286            public void setPrimaryKey(long primaryKey) {
287                    _passwordTracker.setPrimaryKey(primaryKey);
288            }
289    
290            @Override
291            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
292                    _passwordTracker.setPrimaryKeyObj(primaryKeyObj);
293            }
294    
295            /**
296            * Sets the user ID of this password tracker.
297            *
298            * @param userId the user ID of this password tracker
299            */
300            @Override
301            public void setUserId(long userId) {
302                    _passwordTracker.setUserId(userId);
303            }
304    
305            /**
306            * Sets the user uuid of this password tracker.
307            *
308            * @param userUuid the user uuid of this password tracker
309            */
310            @Override
311            public void setUserUuid(java.lang.String userUuid) {
312                    _passwordTracker.setUserUuid(userUuid);
313            }
314    
315            @Override
316            public CacheModel<com.liferay.portal.model.PasswordTracker> toCacheModel() {
317                    return _passwordTracker.toCacheModel();
318            }
319    
320            @Override
321            public com.liferay.portal.model.PasswordTracker toEscapedModel() {
322                    return new PasswordTrackerWrapper(_passwordTracker.toEscapedModel());
323            }
324    
325            @Override
326            public java.lang.String toString() {
327                    return _passwordTracker.toString();
328            }
329    
330            @Override
331            public com.liferay.portal.model.PasswordTracker toUnescapedModel() {
332                    return new PasswordTrackerWrapper(_passwordTracker.toUnescapedModel());
333            }
334    
335            @Override
336            public java.lang.String toXmlString() {
337                    return _passwordTracker.toXmlString();
338            }
339    
340            @Override
341            public boolean equals(Object obj) {
342                    if (this == obj) {
343                            return true;
344                    }
345    
346                    if (!(obj instanceof PasswordTrackerWrapper)) {
347                            return false;
348                    }
349    
350                    PasswordTrackerWrapper passwordTrackerWrapper = (PasswordTrackerWrapper)obj;
351    
352                    if (Validator.equals(_passwordTracker,
353                                            passwordTrackerWrapper._passwordTracker)) {
354                            return true;
355                    }
356    
357                    return false;
358            }
359    
360            /**
361             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
362             */
363            @Deprecated
364            public PasswordTracker getWrappedPasswordTracker() {
365                    return _passwordTracker;
366            }
367    
368            @Override
369            public PasswordTracker getWrappedModel() {
370                    return _passwordTracker;
371            }
372    
373            @Override
374            public boolean isEntityCacheEnabled() {
375                    return _passwordTracker.isEntityCacheEnabled();
376            }
377    
378            @Override
379            public boolean isFinderCacheEnabled() {
380                    return _passwordTracker.isFinderCacheEnabled();
381            }
382    
383            @Override
384            public void resetOriginalValues() {
385                    _passwordTracker.resetOriginalValues();
386            }
387    
388            private final PasswordTracker _passwordTracker;
389    }