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