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