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