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