001
014
015 package com.liferay.portlet.shopping.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class ShoppingItemFieldWrapper implements ShoppingItemField,
033 ModelWrapper<ShoppingItemField> {
034 public ShoppingItemFieldWrapper(ShoppingItemField shoppingItemField) {
035 _shoppingItemField = shoppingItemField;
036 }
037
038 public Class<?> getModelClass() {
039 return ShoppingItemField.class;
040 }
041
042 public String getModelClassName() {
043 return ShoppingItemField.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("itemFieldId", getItemFieldId());
050 attributes.put("itemId", getItemId());
051 attributes.put("name", getName());
052 attributes.put("values", getValues());
053 attributes.put("description", getDescription());
054
055 return attributes;
056 }
057
058 public void setModelAttributes(Map<String, Object> attributes) {
059 Long itemFieldId = (Long)attributes.get("itemFieldId");
060
061 if (itemFieldId != null) {
062 setItemFieldId(itemFieldId);
063 }
064
065 Long itemId = (Long)attributes.get("itemId");
066
067 if (itemId != null) {
068 setItemId(itemId);
069 }
070
071 String name = (String)attributes.get("name");
072
073 if (name != null) {
074 setName(name);
075 }
076
077 String values = (String)attributes.get("values");
078
079 if (values != null) {
080 setValues(values);
081 }
082
083 String description = (String)attributes.get("description");
084
085 if (description != null) {
086 setDescription(description);
087 }
088 }
089
090
095 public long getPrimaryKey() {
096 return _shoppingItemField.getPrimaryKey();
097 }
098
099
104 public void setPrimaryKey(long primaryKey) {
105 _shoppingItemField.setPrimaryKey(primaryKey);
106 }
107
108
113 public long getItemFieldId() {
114 return _shoppingItemField.getItemFieldId();
115 }
116
117
122 public void setItemFieldId(long itemFieldId) {
123 _shoppingItemField.setItemFieldId(itemFieldId);
124 }
125
126
131 public long getItemId() {
132 return _shoppingItemField.getItemId();
133 }
134
135
140 public void setItemId(long itemId) {
141 _shoppingItemField.setItemId(itemId);
142 }
143
144
149 public java.lang.String getName() {
150 return _shoppingItemField.getName();
151 }
152
153
158 public void setName(java.lang.String name) {
159 _shoppingItemField.setName(name);
160 }
161
162
167 public java.lang.String getValues() {
168 return _shoppingItemField.getValues();
169 }
170
171
176 public void setValues(java.lang.String values) {
177 _shoppingItemField.setValues(values);
178 }
179
180
185 public java.lang.String getDescription() {
186 return _shoppingItemField.getDescription();
187 }
188
189
194 public void setDescription(java.lang.String description) {
195 _shoppingItemField.setDescription(description);
196 }
197
198 public boolean isNew() {
199 return _shoppingItemField.isNew();
200 }
201
202 public void setNew(boolean n) {
203 _shoppingItemField.setNew(n);
204 }
205
206 public boolean isCachedModel() {
207 return _shoppingItemField.isCachedModel();
208 }
209
210 public void setCachedModel(boolean cachedModel) {
211 _shoppingItemField.setCachedModel(cachedModel);
212 }
213
214 public boolean isEscapedModel() {
215 return _shoppingItemField.isEscapedModel();
216 }
217
218 public java.io.Serializable getPrimaryKeyObj() {
219 return _shoppingItemField.getPrimaryKeyObj();
220 }
221
222 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
223 _shoppingItemField.setPrimaryKeyObj(primaryKeyObj);
224 }
225
226 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
227 return _shoppingItemField.getExpandoBridge();
228 }
229
230 public void setExpandoBridgeAttributes(
231 com.liferay.portal.service.ServiceContext serviceContext) {
232 _shoppingItemField.setExpandoBridgeAttributes(serviceContext);
233 }
234
235 @Override
236 public java.lang.Object clone() {
237 return new ShoppingItemFieldWrapper((ShoppingItemField)_shoppingItemField.clone());
238 }
239
240 public int compareTo(
241 com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) {
242 return _shoppingItemField.compareTo(shoppingItemField);
243 }
244
245 @Override
246 public int hashCode() {
247 return _shoppingItemField.hashCode();
248 }
249
250 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingItemField> toCacheModel() {
251 return _shoppingItemField.toCacheModel();
252 }
253
254 public com.liferay.portlet.shopping.model.ShoppingItemField toEscapedModel() {
255 return new ShoppingItemFieldWrapper(_shoppingItemField.toEscapedModel());
256 }
257
258 public com.liferay.portlet.shopping.model.ShoppingItemField toUnescapedModel() {
259 return new ShoppingItemFieldWrapper(_shoppingItemField.toUnescapedModel());
260 }
261
262 @Override
263 public java.lang.String toString() {
264 return _shoppingItemField.toString();
265 }
266
267 public java.lang.String toXmlString() {
268 return _shoppingItemField.toXmlString();
269 }
270
271 public void persist()
272 throws com.liferay.portal.kernel.exception.SystemException {
273 _shoppingItemField.persist();
274 }
275
276 public java.lang.String[] getValuesArray() {
277 return _shoppingItemField.getValuesArray();
278 }
279
280 public void setValuesArray(java.lang.String[] valuesArray) {
281 _shoppingItemField.setValuesArray(valuesArray);
282 }
283
284 @Override
285 public boolean equals(Object obj) {
286 if (this == obj) {
287 return true;
288 }
289
290 if (!(obj instanceof ShoppingItemFieldWrapper)) {
291 return false;
292 }
293
294 ShoppingItemFieldWrapper shoppingItemFieldWrapper = (ShoppingItemFieldWrapper)obj;
295
296 if (Validator.equals(_shoppingItemField,
297 shoppingItemFieldWrapper._shoppingItemField)) {
298 return true;
299 }
300
301 return false;
302 }
303
304
307 public ShoppingItemField getWrappedShoppingItemField() {
308 return _shoppingItemField;
309 }
310
311 public ShoppingItemField getWrappedModel() {
312 return _shoppingItemField;
313 }
314
315 public void resetOriginalValues() {
316 _shoppingItemField.resetOriginalValues();
317 }
318
319 private ShoppingItemField _shoppingItemField;
320 }