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