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