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