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