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