001
014
015 package com.liferay.portlet.shopping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class ShoppingItemFieldWrapper implements ShoppingItemField,
036 ModelWrapper<ShoppingItemField> {
037 public ShoppingItemFieldWrapper(ShoppingItemField shoppingItemField) {
038 _shoppingItemField = shoppingItemField;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return ShoppingItemField.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return ShoppingItemField.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("itemFieldId", getItemFieldId());
056 attributes.put("itemId", getItemId());
057 attributes.put("name", getName());
058 attributes.put("values", getValues());
059 attributes.put("description", getDescription());
060
061 return attributes;
062 }
063
064 @Override
065 public void setModelAttributes(Map<String, Object> attributes) {
066 Long itemFieldId = (Long)attributes.get("itemFieldId");
067
068 if (itemFieldId != null) {
069 setItemFieldId(itemFieldId);
070 }
071
072 Long itemId = (Long)attributes.get("itemId");
073
074 if (itemId != null) {
075 setItemId(itemId);
076 }
077
078 String name = (String)attributes.get("name");
079
080 if (name != null) {
081 setName(name);
082 }
083
084 String values = (String)attributes.get("values");
085
086 if (values != null) {
087 setValues(values);
088 }
089
090 String description = (String)attributes.get("description");
091
092 if (description != null) {
093 setDescription(description);
094 }
095 }
096
097
102 @Override
103 public long getPrimaryKey() {
104 return _shoppingItemField.getPrimaryKey();
105 }
106
107
112 @Override
113 public void setPrimaryKey(long primaryKey) {
114 _shoppingItemField.setPrimaryKey(primaryKey);
115 }
116
117
122 @Override
123 public long getItemFieldId() {
124 return _shoppingItemField.getItemFieldId();
125 }
126
127
132 @Override
133 public void setItemFieldId(long itemFieldId) {
134 _shoppingItemField.setItemFieldId(itemFieldId);
135 }
136
137
142 @Override
143 public long getItemId() {
144 return _shoppingItemField.getItemId();
145 }
146
147
152 @Override
153 public void setItemId(long itemId) {
154 _shoppingItemField.setItemId(itemId);
155 }
156
157
162 @Override
163 public java.lang.String getName() {
164 return _shoppingItemField.getName();
165 }
166
167
172 @Override
173 public void setName(java.lang.String name) {
174 _shoppingItemField.setName(name);
175 }
176
177
182 @Override
183 public java.lang.String getValues() {
184 return _shoppingItemField.getValues();
185 }
186
187
192 @Override
193 public void setValues(java.lang.String values) {
194 _shoppingItemField.setValues(values);
195 }
196
197
202 @Override
203 public java.lang.String getDescription() {
204 return _shoppingItemField.getDescription();
205 }
206
207
212 @Override
213 public void setDescription(java.lang.String description) {
214 _shoppingItemField.setDescription(description);
215 }
216
217 @Override
218 public boolean isNew() {
219 return _shoppingItemField.isNew();
220 }
221
222 @Override
223 public void setNew(boolean n) {
224 _shoppingItemField.setNew(n);
225 }
226
227 @Override
228 public boolean isCachedModel() {
229 return _shoppingItemField.isCachedModel();
230 }
231
232 @Override
233 public void setCachedModel(boolean cachedModel) {
234 _shoppingItemField.setCachedModel(cachedModel);
235 }
236
237 @Override
238 public boolean isEscapedModel() {
239 return _shoppingItemField.isEscapedModel();
240 }
241
242 @Override
243 public java.io.Serializable getPrimaryKeyObj() {
244 return _shoppingItemField.getPrimaryKeyObj();
245 }
246
247 @Override
248 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
249 _shoppingItemField.setPrimaryKeyObj(primaryKeyObj);
250 }
251
252 @Override
253 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
254 return _shoppingItemField.getExpandoBridge();
255 }
256
257 @Override
258 public void setExpandoBridgeAttributes(
259 com.liferay.portal.model.BaseModel<?> baseModel) {
260 _shoppingItemField.setExpandoBridgeAttributes(baseModel);
261 }
262
263 @Override
264 public void setExpandoBridgeAttributes(
265 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
266 _shoppingItemField.setExpandoBridgeAttributes(expandoBridge);
267 }
268
269 @Override
270 public void setExpandoBridgeAttributes(
271 com.liferay.portal.service.ServiceContext serviceContext) {
272 _shoppingItemField.setExpandoBridgeAttributes(serviceContext);
273 }
274
275 @Override
276 public java.lang.Object clone() {
277 return new ShoppingItemFieldWrapper((ShoppingItemField)_shoppingItemField.clone());
278 }
279
280 @Override
281 public int compareTo(
282 com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) {
283 return _shoppingItemField.compareTo(shoppingItemField);
284 }
285
286 @Override
287 public int hashCode() {
288 return _shoppingItemField.hashCode();
289 }
290
291 @Override
292 public com.liferay.portal.model.CacheModel<com.liferay.portlet.shopping.model.ShoppingItemField> toCacheModel() {
293 return _shoppingItemField.toCacheModel();
294 }
295
296 @Override
297 public com.liferay.portlet.shopping.model.ShoppingItemField toEscapedModel() {
298 return new ShoppingItemFieldWrapper(_shoppingItemField.toEscapedModel());
299 }
300
301 @Override
302 public com.liferay.portlet.shopping.model.ShoppingItemField toUnescapedModel() {
303 return new ShoppingItemFieldWrapper(_shoppingItemField.toUnescapedModel());
304 }
305
306 @Override
307 public java.lang.String toString() {
308 return _shoppingItemField.toString();
309 }
310
311 @Override
312 public java.lang.String toXmlString() {
313 return _shoppingItemField.toXmlString();
314 }
315
316 @Override
317 public void persist()
318 throws com.liferay.portal.kernel.exception.SystemException {
319 _shoppingItemField.persist();
320 }
321
322 @Override
323 public java.lang.String[] getValuesArray() {
324 return _shoppingItemField.getValuesArray();
325 }
326
327 @Override
328 public void setValuesArray(java.lang.String[] valuesArray) {
329 _shoppingItemField.setValuesArray(valuesArray);
330 }
331
332 @Override
333 public boolean equals(Object obj) {
334 if (this == obj) {
335 return true;
336 }
337
338 if (!(obj instanceof ShoppingItemFieldWrapper)) {
339 return false;
340 }
341
342 ShoppingItemFieldWrapper shoppingItemFieldWrapper = (ShoppingItemFieldWrapper)obj;
343
344 if (Validator.equals(_shoppingItemField,
345 shoppingItemFieldWrapper._shoppingItemField)) {
346 return true;
347 }
348
349 return false;
350 }
351
352
355 public ShoppingItemField getWrappedShoppingItemField() {
356 return _shoppingItemField;
357 }
358
359 @Override
360 public ShoppingItemField getWrappedModel() {
361 return _shoppingItemField;
362 }
363
364 @Override
365 public void resetOriginalValues() {
366 _shoppingItemField.resetOriginalValues();
367 }
368
369 private ShoppingItemField _shoppingItemField;
370 }