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