001
014
015 package com.liferay.portlet.expando.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class ExpandoValueWrapper implements ExpandoValue,
032 ModelWrapper<ExpandoValue> {
033 public ExpandoValueWrapper(ExpandoValue expandoValue) {
034 _expandoValue = expandoValue;
035 }
036
037 public Class<?> getModelClass() {
038 return ExpandoValue.class;
039 }
040
041 public String getModelClassName() {
042 return ExpandoValue.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("valueId", getValueId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("tableId", getTableId());
051 attributes.put("columnId", getColumnId());
052 attributes.put("rowId", getRowId());
053 attributes.put("classNameId", getClassNameId());
054 attributes.put("classPK", getClassPK());
055 attributes.put("data", getData());
056
057 return attributes;
058 }
059
060 public void setModelAttributes(Map<String, Object> attributes) {
061 Long valueId = (Long)attributes.get("valueId");
062
063 if (valueId != null) {
064 setValueId(valueId);
065 }
066
067 Long companyId = (Long)attributes.get("companyId");
068
069 if (companyId != null) {
070 setCompanyId(companyId);
071 }
072
073 Long tableId = (Long)attributes.get("tableId");
074
075 if (tableId != null) {
076 setTableId(tableId);
077 }
078
079 Long columnId = (Long)attributes.get("columnId");
080
081 if (columnId != null) {
082 setColumnId(columnId);
083 }
084
085 Long rowId = (Long)attributes.get("rowId");
086
087 if (rowId != null) {
088 setRowId(rowId);
089 }
090
091 Long classNameId = (Long)attributes.get("classNameId");
092
093 if (classNameId != null) {
094 setClassNameId(classNameId);
095 }
096
097 Long classPK = (Long)attributes.get("classPK");
098
099 if (classPK != null) {
100 setClassPK(classPK);
101 }
102
103 String data = (String)attributes.get("data");
104
105 if (data != null) {
106 setData(data);
107 }
108 }
109
110
115 public long getPrimaryKey() {
116 return _expandoValue.getPrimaryKey();
117 }
118
119
124 public void setPrimaryKey(long primaryKey) {
125 _expandoValue.setPrimaryKey(primaryKey);
126 }
127
128
133 public long getValueId() {
134 return _expandoValue.getValueId();
135 }
136
137
142 public void setValueId(long valueId) {
143 _expandoValue.setValueId(valueId);
144 }
145
146
151 public long getCompanyId() {
152 return _expandoValue.getCompanyId();
153 }
154
155
160 public void setCompanyId(long companyId) {
161 _expandoValue.setCompanyId(companyId);
162 }
163
164
169 public long getTableId() {
170 return _expandoValue.getTableId();
171 }
172
173
178 public void setTableId(long tableId) {
179 _expandoValue.setTableId(tableId);
180 }
181
182
187 public long getColumnId() {
188 return _expandoValue.getColumnId();
189 }
190
191
196 public void setColumnId(long columnId) {
197 _expandoValue.setColumnId(columnId);
198 }
199
200
205 public long getRowId() {
206 return _expandoValue.getRowId();
207 }
208
209
214 public void setRowId(long rowId) {
215 _expandoValue.setRowId(rowId);
216 }
217
218
223 public java.lang.String getClassName() {
224 return _expandoValue.getClassName();
225 }
226
227 public void setClassName(java.lang.String className) {
228 _expandoValue.setClassName(className);
229 }
230
231
236 public long getClassNameId() {
237 return _expandoValue.getClassNameId();
238 }
239
240
245 public void setClassNameId(long classNameId) {
246 _expandoValue.setClassNameId(classNameId);
247 }
248
249
254 public long getClassPK() {
255 return _expandoValue.getClassPK();
256 }
257
258
263 public void setClassPK(long classPK) {
264 _expandoValue.setClassPK(classPK);
265 }
266
267
272 public java.lang.String getData() {
273 return _expandoValue.getData();
274 }
275
276
281 public void setData(java.lang.String data) {
282 _expandoValue.setData(data);
283 }
284
285 public boolean isNew() {
286 return _expandoValue.isNew();
287 }
288
289 public void setNew(boolean n) {
290 _expandoValue.setNew(n);
291 }
292
293 public boolean isCachedModel() {
294 return _expandoValue.isCachedModel();
295 }
296
297 public void setCachedModel(boolean cachedModel) {
298 _expandoValue.setCachedModel(cachedModel);
299 }
300
301 public boolean isEscapedModel() {
302 return _expandoValue.isEscapedModel();
303 }
304
305 public java.io.Serializable getPrimaryKeyObj() {
306 return _expandoValue.getPrimaryKeyObj();
307 }
308
309 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
310 _expandoValue.setPrimaryKeyObj(primaryKeyObj);
311 }
312
313 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
314 return _expandoValue.getExpandoBridge();
315 }
316
317 public void setExpandoBridgeAttributes(
318 com.liferay.portal.service.ServiceContext serviceContext) {
319 _expandoValue.setExpandoBridgeAttributes(serviceContext);
320 }
321
322 @Override
323 public java.lang.Object clone() {
324 return new ExpandoValueWrapper((ExpandoValue)_expandoValue.clone());
325 }
326
327 public int compareTo(
328 com.liferay.portlet.expando.model.ExpandoValue expandoValue) {
329 return _expandoValue.compareTo(expandoValue);
330 }
331
332 @Override
333 public int hashCode() {
334 return _expandoValue.hashCode();
335 }
336
337 public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoValue> toCacheModel() {
338 return _expandoValue.toCacheModel();
339 }
340
341 public com.liferay.portlet.expando.model.ExpandoValue toEscapedModel() {
342 return new ExpandoValueWrapper(_expandoValue.toEscapedModel());
343 }
344
345 @Override
346 public java.lang.String toString() {
347 return _expandoValue.toString();
348 }
349
350 public java.lang.String toXmlString() {
351 return _expandoValue.toXmlString();
352 }
353
354 public void persist()
355 throws com.liferay.portal.kernel.exception.SystemException {
356 _expandoValue.persist();
357 }
358
359 public boolean getBoolean()
360 throws com.liferay.portal.kernel.exception.PortalException,
361 com.liferay.portal.kernel.exception.SystemException {
362 return _expandoValue.getBoolean();
363 }
364
365 public boolean[] getBooleanArray()
366 throws com.liferay.portal.kernel.exception.PortalException,
367 com.liferay.portal.kernel.exception.SystemException {
368 return _expandoValue.getBooleanArray();
369 }
370
371 public com.liferay.portlet.expando.model.ExpandoColumn getColumn()
372 throws com.liferay.portal.kernel.exception.PortalException,
373 com.liferay.portal.kernel.exception.SystemException {
374 return _expandoValue.getColumn();
375 }
376
377 public java.util.Date getDate()
378 throws com.liferay.portal.kernel.exception.PortalException,
379 com.liferay.portal.kernel.exception.SystemException {
380 return _expandoValue.getDate();
381 }
382
383 public java.util.Date[] getDateArray()
384 throws com.liferay.portal.kernel.exception.PortalException,
385 com.liferay.portal.kernel.exception.SystemException {
386 return _expandoValue.getDateArray();
387 }
388
389 public double getDouble()
390 throws com.liferay.portal.kernel.exception.PortalException,
391 com.liferay.portal.kernel.exception.SystemException {
392 return _expandoValue.getDouble();
393 }
394
395 public double[] getDoubleArray()
396 throws com.liferay.portal.kernel.exception.PortalException,
397 com.liferay.portal.kernel.exception.SystemException {
398 return _expandoValue.getDoubleArray();
399 }
400
401 public float getFloat()
402 throws com.liferay.portal.kernel.exception.PortalException,
403 com.liferay.portal.kernel.exception.SystemException {
404 return _expandoValue.getFloat();
405 }
406
407 public float[] getFloatArray()
408 throws com.liferay.portal.kernel.exception.PortalException,
409 com.liferay.portal.kernel.exception.SystemException {
410 return _expandoValue.getFloatArray();
411 }
412
413 public int getInteger()
414 throws com.liferay.portal.kernel.exception.PortalException,
415 com.liferay.portal.kernel.exception.SystemException {
416 return _expandoValue.getInteger();
417 }
418
419 public int[] getIntegerArray()
420 throws com.liferay.portal.kernel.exception.PortalException,
421 com.liferay.portal.kernel.exception.SystemException {
422 return _expandoValue.getIntegerArray();
423 }
424
425 public long getLong()
426 throws com.liferay.portal.kernel.exception.PortalException,
427 com.liferay.portal.kernel.exception.SystemException {
428 return _expandoValue.getLong();
429 }
430
431 public long[] getLongArray()
432 throws com.liferay.portal.kernel.exception.PortalException,
433 com.liferay.portal.kernel.exception.SystemException {
434 return _expandoValue.getLongArray();
435 }
436
437 public java.lang.Number getNumber()
438 throws com.liferay.portal.kernel.exception.PortalException,
439 com.liferay.portal.kernel.exception.SystemException {
440 return _expandoValue.getNumber();
441 }
442
443 public java.lang.Number[] getNumberArray()
444 throws com.liferay.portal.kernel.exception.PortalException,
445 com.liferay.portal.kernel.exception.SystemException {
446 return _expandoValue.getNumberArray();
447 }
448
449 public java.io.Serializable getSerializable()
450 throws com.liferay.portal.kernel.exception.PortalException,
451 com.liferay.portal.kernel.exception.SystemException {
452 return _expandoValue.getSerializable();
453 }
454
455 public short getShort()
456 throws com.liferay.portal.kernel.exception.PortalException,
457 com.liferay.portal.kernel.exception.SystemException {
458 return _expandoValue.getShort();
459 }
460
461 public short[] getShortArray()
462 throws com.liferay.portal.kernel.exception.PortalException,
463 com.liferay.portal.kernel.exception.SystemException {
464 return _expandoValue.getShortArray();
465 }
466
467 public java.lang.String getString()
468 throws com.liferay.portal.kernel.exception.PortalException,
469 com.liferay.portal.kernel.exception.SystemException {
470 return _expandoValue.getString();
471 }
472
473 public java.lang.String[] getStringArray()
474 throws com.liferay.portal.kernel.exception.PortalException,
475 com.liferay.portal.kernel.exception.SystemException {
476 return _expandoValue.getStringArray();
477 }
478
479 public void setBoolean(boolean data)
480 throws com.liferay.portal.kernel.exception.PortalException,
481 com.liferay.portal.kernel.exception.SystemException {
482 _expandoValue.setBoolean(data);
483 }
484
485 public void setBooleanArray(boolean[] data)
486 throws com.liferay.portal.kernel.exception.PortalException,
487 com.liferay.portal.kernel.exception.SystemException {
488 _expandoValue.setBooleanArray(data);
489 }
490
491 public void setColumn(
492 com.liferay.portlet.expando.model.ExpandoColumn column) {
493 _expandoValue.setColumn(column);
494 }
495
496 public void setDate(java.util.Date data)
497 throws com.liferay.portal.kernel.exception.PortalException,
498 com.liferay.portal.kernel.exception.SystemException {
499 _expandoValue.setDate(data);
500 }
501
502 public void setDateArray(java.util.Date[] data)
503 throws com.liferay.portal.kernel.exception.PortalException,
504 com.liferay.portal.kernel.exception.SystemException {
505 _expandoValue.setDateArray(data);
506 }
507
508 public void setDouble(double data)
509 throws com.liferay.portal.kernel.exception.PortalException,
510 com.liferay.portal.kernel.exception.SystemException {
511 _expandoValue.setDouble(data);
512 }
513
514 public void setDoubleArray(double[] data)
515 throws com.liferay.portal.kernel.exception.PortalException,
516 com.liferay.portal.kernel.exception.SystemException {
517 _expandoValue.setDoubleArray(data);
518 }
519
520 public void setFloat(float data)
521 throws com.liferay.portal.kernel.exception.PortalException,
522 com.liferay.portal.kernel.exception.SystemException {
523 _expandoValue.setFloat(data);
524 }
525
526 public void setFloatArray(float[] data)
527 throws com.liferay.portal.kernel.exception.PortalException,
528 com.liferay.portal.kernel.exception.SystemException {
529 _expandoValue.setFloatArray(data);
530 }
531
532 public void setInteger(int data)
533 throws com.liferay.portal.kernel.exception.PortalException,
534 com.liferay.portal.kernel.exception.SystemException {
535 _expandoValue.setInteger(data);
536 }
537
538 public void setIntegerArray(int[] data)
539 throws com.liferay.portal.kernel.exception.PortalException,
540 com.liferay.portal.kernel.exception.SystemException {
541 _expandoValue.setIntegerArray(data);
542 }
543
544 public void setLong(long data)
545 throws com.liferay.portal.kernel.exception.PortalException,
546 com.liferay.portal.kernel.exception.SystemException {
547 _expandoValue.setLong(data);
548 }
549
550 public void setLongArray(long[] data)
551 throws com.liferay.portal.kernel.exception.PortalException,
552 com.liferay.portal.kernel.exception.SystemException {
553 _expandoValue.setLongArray(data);
554 }
555
556 public void setNumber(java.lang.Number data)
557 throws com.liferay.portal.kernel.exception.PortalException,
558 com.liferay.portal.kernel.exception.SystemException {
559 _expandoValue.setNumber(data);
560 }
561
562 public void setNumberArray(java.lang.Number[] data)
563 throws com.liferay.portal.kernel.exception.PortalException,
564 com.liferay.portal.kernel.exception.SystemException {
565 _expandoValue.setNumberArray(data);
566 }
567
568 public void setShort(short data)
569 throws com.liferay.portal.kernel.exception.PortalException,
570 com.liferay.portal.kernel.exception.SystemException {
571 _expandoValue.setShort(data);
572 }
573
574 public void setShortArray(short[] data)
575 throws com.liferay.portal.kernel.exception.PortalException,
576 com.liferay.portal.kernel.exception.SystemException {
577 _expandoValue.setShortArray(data);
578 }
579
580 public void setString(java.lang.String data)
581 throws com.liferay.portal.kernel.exception.PortalException,
582 com.liferay.portal.kernel.exception.SystemException {
583 _expandoValue.setString(data);
584 }
585
586 public void setStringArray(java.lang.String[] data)
587 throws com.liferay.portal.kernel.exception.PortalException,
588 com.liferay.portal.kernel.exception.SystemException {
589 _expandoValue.setStringArray(data);
590 }
591
592
595 public ExpandoValue getWrappedExpandoValue() {
596 return _expandoValue;
597 }
598
599 public ExpandoValue getWrappedModel() {
600 return _expandoValue;
601 }
602
603 public void resetOriginalValues() {
604 _expandoValue.resetOriginalValues();
605 }
606
607 private ExpandoValue _expandoValue;
608 }