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