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 UserTrackerPath}.
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see UserTrackerPath
037     * @generated
038     */
039    @ProviderType
040    public class UserTrackerPathWrapper implements UserTrackerPath,
041            ModelWrapper<UserTrackerPath> {
042            public UserTrackerPathWrapper(UserTrackerPath userTrackerPath) {
043                    _userTrackerPath = userTrackerPath;
044            }
045    
046            @Override
047            public Class<?> getModelClass() {
048                    return UserTrackerPath.class;
049            }
050    
051            @Override
052            public String getModelClassName() {
053                    return UserTrackerPath.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("userTrackerPathId", getUserTrackerPathId());
062                    attributes.put("companyId", getCompanyId());
063                    attributes.put("userTrackerId", getUserTrackerId());
064                    attributes.put("path", getPath());
065                    attributes.put("pathDate", getPathDate());
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 userTrackerPathId = (Long)attributes.get("userTrackerPathId");
079    
080                    if (userTrackerPathId != null) {
081                            setUserTrackerPathId(userTrackerPathId);
082                    }
083    
084                    Long companyId = (Long)attributes.get("companyId");
085    
086                    if (companyId != null) {
087                            setCompanyId(companyId);
088                    }
089    
090                    Long userTrackerId = (Long)attributes.get("userTrackerId");
091    
092                    if (userTrackerId != null) {
093                            setUserTrackerId(userTrackerId);
094                    }
095    
096                    String path = (String)attributes.get("path");
097    
098                    if (path != null) {
099                            setPath(path);
100                    }
101    
102                    Date pathDate = (Date)attributes.get("pathDate");
103    
104                    if (pathDate != null) {
105                            setPathDate(pathDate);
106                    }
107            }
108    
109            @Override
110            public java.lang.Object clone() {
111                    return new UserTrackerPathWrapper((UserTrackerPath)_userTrackerPath.clone());
112            }
113    
114            @Override
115            public int compareTo(
116                    com.liferay.portal.model.UserTrackerPath userTrackerPath) {
117                    return _userTrackerPath.compareTo(userTrackerPath);
118            }
119    
120            /**
121            * Returns the company ID of this user tracker path.
122            *
123            * @return the company ID of this user tracker path
124            */
125            @Override
126            public long getCompanyId() {
127                    return _userTrackerPath.getCompanyId();
128            }
129    
130            @Override
131            public ExpandoBridge getExpandoBridge() {
132                    return _userTrackerPath.getExpandoBridge();
133            }
134    
135            /**
136            * Returns the mvcc version of this user tracker path.
137            *
138            * @return the mvcc version of this user tracker path
139            */
140            @Override
141            public long getMvccVersion() {
142                    return _userTrackerPath.getMvccVersion();
143            }
144    
145            /**
146            * Returns the path of this user tracker path.
147            *
148            * @return the path of this user tracker path
149            */
150            @Override
151            public java.lang.String getPath() {
152                    return _userTrackerPath.getPath();
153            }
154    
155            /**
156            * Returns the path date of this user tracker path.
157            *
158            * @return the path date of this user tracker path
159            */
160            @Override
161            public Date getPathDate() {
162                    return _userTrackerPath.getPathDate();
163            }
164    
165            /**
166            * Returns the primary key of this user tracker path.
167            *
168            * @return the primary key of this user tracker path
169            */
170            @Override
171            public long getPrimaryKey() {
172                    return _userTrackerPath.getPrimaryKey();
173            }
174    
175            @Override
176            public Serializable getPrimaryKeyObj() {
177                    return _userTrackerPath.getPrimaryKeyObj();
178            }
179    
180            /**
181            * Returns the user tracker ID of this user tracker path.
182            *
183            * @return the user tracker ID of this user tracker path
184            */
185            @Override
186            public long getUserTrackerId() {
187                    return _userTrackerPath.getUserTrackerId();
188            }
189    
190            /**
191            * Returns the user tracker path ID of this user tracker path.
192            *
193            * @return the user tracker path ID of this user tracker path
194            */
195            @Override
196            public long getUserTrackerPathId() {
197                    return _userTrackerPath.getUserTrackerPathId();
198            }
199    
200            @Override
201            public int hashCode() {
202                    return _userTrackerPath.hashCode();
203            }
204    
205            @Override
206            public boolean isCachedModel() {
207                    return _userTrackerPath.isCachedModel();
208            }
209    
210            @Override
211            public boolean isEscapedModel() {
212                    return _userTrackerPath.isEscapedModel();
213            }
214    
215            @Override
216            public boolean isNew() {
217                    return _userTrackerPath.isNew();
218            }
219    
220            @Override
221            public void persist() {
222                    _userTrackerPath.persist();
223            }
224    
225            @Override
226            public void setCachedModel(boolean cachedModel) {
227                    _userTrackerPath.setCachedModel(cachedModel);
228            }
229    
230            /**
231            * Sets the company ID of this user tracker path.
232            *
233            * @param companyId the company ID of this user tracker path
234            */
235            @Override
236            public void setCompanyId(long companyId) {
237                    _userTrackerPath.setCompanyId(companyId);
238            }
239    
240            @Override
241            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
242                    _userTrackerPath.setExpandoBridgeAttributes(baseModel);
243            }
244    
245            @Override
246            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
247                    _userTrackerPath.setExpandoBridgeAttributes(expandoBridge);
248            }
249    
250            @Override
251            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
252                    _userTrackerPath.setExpandoBridgeAttributes(serviceContext);
253            }
254    
255            /**
256            * Sets the mvcc version of this user tracker path.
257            *
258            * @param mvccVersion the mvcc version of this user tracker path
259            */
260            @Override
261            public void setMvccVersion(long mvccVersion) {
262                    _userTrackerPath.setMvccVersion(mvccVersion);
263            }
264    
265            @Override
266            public void setNew(boolean n) {
267                    _userTrackerPath.setNew(n);
268            }
269    
270            /**
271            * Sets the path of this user tracker path.
272            *
273            * @param path the path of this user tracker path
274            */
275            @Override
276            public void setPath(java.lang.String path) {
277                    _userTrackerPath.setPath(path);
278            }
279    
280            /**
281            * Sets the path date of this user tracker path.
282            *
283            * @param pathDate the path date of this user tracker path
284            */
285            @Override
286            public void setPathDate(Date pathDate) {
287                    _userTrackerPath.setPathDate(pathDate);
288            }
289    
290            /**
291            * Sets the primary key of this user tracker path.
292            *
293            * @param primaryKey the primary key of this user tracker path
294            */
295            @Override
296            public void setPrimaryKey(long primaryKey) {
297                    _userTrackerPath.setPrimaryKey(primaryKey);
298            }
299    
300            @Override
301            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
302                    _userTrackerPath.setPrimaryKeyObj(primaryKeyObj);
303            }
304    
305            /**
306            * Sets the user tracker ID of this user tracker path.
307            *
308            * @param userTrackerId the user tracker ID of this user tracker path
309            */
310            @Override
311            public void setUserTrackerId(long userTrackerId) {
312                    _userTrackerPath.setUserTrackerId(userTrackerId);
313            }
314    
315            /**
316            * Sets the user tracker path ID of this user tracker path.
317            *
318            * @param userTrackerPathId the user tracker path ID of this user tracker path
319            */
320            @Override
321            public void setUserTrackerPathId(long userTrackerPathId) {
322                    _userTrackerPath.setUserTrackerPathId(userTrackerPathId);
323            }
324    
325            @Override
326            public CacheModel<com.liferay.portal.model.UserTrackerPath> toCacheModel() {
327                    return _userTrackerPath.toCacheModel();
328            }
329    
330            @Override
331            public com.liferay.portal.model.UserTrackerPath toEscapedModel() {
332                    return new UserTrackerPathWrapper(_userTrackerPath.toEscapedModel());
333            }
334    
335            @Override
336            public java.lang.String toString() {
337                    return _userTrackerPath.toString();
338            }
339    
340            @Override
341            public com.liferay.portal.model.UserTrackerPath toUnescapedModel() {
342                    return new UserTrackerPathWrapper(_userTrackerPath.toUnescapedModel());
343            }
344    
345            @Override
346            public java.lang.String toXmlString() {
347                    return _userTrackerPath.toXmlString();
348            }
349    
350            @Override
351            public boolean equals(Object obj) {
352                    if (this == obj) {
353                            return true;
354                    }
355    
356                    if (!(obj instanceof UserTrackerPathWrapper)) {
357                            return false;
358                    }
359    
360                    UserTrackerPathWrapper userTrackerPathWrapper = (UserTrackerPathWrapper)obj;
361    
362                    if (Validator.equals(_userTrackerPath,
363                                            userTrackerPathWrapper._userTrackerPath)) {
364                            return true;
365                    }
366    
367                    return false;
368            }
369    
370            @Override
371            public UserTrackerPath getWrappedModel() {
372                    return _userTrackerPath;
373            }
374    
375            @Override
376            public boolean isEntityCacheEnabled() {
377                    return _userTrackerPath.isEntityCacheEnabled();
378            }
379    
380            @Override
381            public boolean isFinderCacheEnabled() {
382                    return _userTrackerPath.isFinderCacheEnabled();
383            }
384    
385            @Override
386            public void resetOriginalValues() {
387                    _userTrackerPath.resetOriginalValues();
388            }
389    
390            private final UserTrackerPath _userTrackerPath;
391    }