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