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 public com.liferay.portlet.expando.model.ExpandoValue toUnescapedModel() {
346 return new ExpandoValueWrapper(_expandoValue.toUnescapedModel());
347 }
348
349 @Override
350 public java.lang.String toString() {
351 return _expandoValue.toString();
352 }
353
354 public java.lang.String toXmlString() {
355 return _expandoValue.toXmlString();
356 }
357
358 public void persist()
359 throws com.liferay.portal.kernel.exception.SystemException {
360 _expandoValue.persist();
361 }
362
363 public java.util.List<java.util.Locale> getAvailableLocales()
364 throws com.liferay.portal.kernel.exception.PortalException,
365 com.liferay.portal.kernel.exception.SystemException {
366 return _expandoValue.getAvailableLocales();
367 }
368
369 public boolean getBoolean()
370 throws com.liferay.portal.kernel.exception.PortalException,
371 com.liferay.portal.kernel.exception.SystemException {
372 return _expandoValue.getBoolean();
373 }
374
375 public boolean[] getBooleanArray()
376 throws com.liferay.portal.kernel.exception.PortalException,
377 com.liferay.portal.kernel.exception.SystemException {
378 return _expandoValue.getBooleanArray();
379 }
380
381 public com.liferay.portlet.expando.model.ExpandoColumn getColumn()
382 throws com.liferay.portal.kernel.exception.PortalException,
383 com.liferay.portal.kernel.exception.SystemException {
384 return _expandoValue.getColumn();
385 }
386
387 public java.util.Date getDate()
388 throws com.liferay.portal.kernel.exception.PortalException,
389 com.liferay.portal.kernel.exception.SystemException {
390 return _expandoValue.getDate();
391 }
392
393 public java.util.Date[] getDateArray()
394 throws com.liferay.portal.kernel.exception.PortalException,
395 com.liferay.portal.kernel.exception.SystemException {
396 return _expandoValue.getDateArray();
397 }
398
399 public java.util.Locale getDefaultLocale()
400 throws com.liferay.portal.kernel.exception.PortalException,
401 com.liferay.portal.kernel.exception.SystemException {
402 return _expandoValue.getDefaultLocale();
403 }
404
405 public double getDouble()
406 throws com.liferay.portal.kernel.exception.PortalException,
407 com.liferay.portal.kernel.exception.SystemException {
408 return _expandoValue.getDouble();
409 }
410
411 public double[] getDoubleArray()
412 throws com.liferay.portal.kernel.exception.PortalException,
413 com.liferay.portal.kernel.exception.SystemException {
414 return _expandoValue.getDoubleArray();
415 }
416
417 public float getFloat()
418 throws com.liferay.portal.kernel.exception.PortalException,
419 com.liferay.portal.kernel.exception.SystemException {
420 return _expandoValue.getFloat();
421 }
422
423 public float[] getFloatArray()
424 throws com.liferay.portal.kernel.exception.PortalException,
425 com.liferay.portal.kernel.exception.SystemException {
426 return _expandoValue.getFloatArray();
427 }
428
429 public int getInteger()
430 throws com.liferay.portal.kernel.exception.PortalException,
431 com.liferay.portal.kernel.exception.SystemException {
432 return _expandoValue.getInteger();
433 }
434
435 public int[] getIntegerArray()
436 throws com.liferay.portal.kernel.exception.PortalException,
437 com.liferay.portal.kernel.exception.SystemException {
438 return _expandoValue.getIntegerArray();
439 }
440
441 public long getLong()
442 throws com.liferay.portal.kernel.exception.PortalException,
443 com.liferay.portal.kernel.exception.SystemException {
444 return _expandoValue.getLong();
445 }
446
447 public long[] getLongArray()
448 throws com.liferay.portal.kernel.exception.PortalException,
449 com.liferay.portal.kernel.exception.SystemException {
450 return _expandoValue.getLongArray();
451 }
452
453 public java.lang.Number getNumber()
454 throws com.liferay.portal.kernel.exception.PortalException,
455 com.liferay.portal.kernel.exception.SystemException {
456 return _expandoValue.getNumber();
457 }
458
459 public java.lang.Number[] getNumberArray()
460 throws com.liferay.portal.kernel.exception.PortalException,
461 com.liferay.portal.kernel.exception.SystemException {
462 return _expandoValue.getNumberArray();
463 }
464
465 public java.io.Serializable getSerializable()
466 throws com.liferay.portal.kernel.exception.PortalException,
467 com.liferay.portal.kernel.exception.SystemException {
468 return _expandoValue.getSerializable();
469 }
470
471 public short getShort()
472 throws com.liferay.portal.kernel.exception.PortalException,
473 com.liferay.portal.kernel.exception.SystemException {
474 return _expandoValue.getShort();
475 }
476
477 public short[] getShortArray()
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 return _expandoValue.getShortArray();
481 }
482
483 public java.lang.String getString()
484 throws com.liferay.portal.kernel.exception.PortalException,
485 com.liferay.portal.kernel.exception.SystemException {
486 return _expandoValue.getString();
487 }
488
489 public java.lang.String getString(java.util.Locale locale)
490 throws com.liferay.portal.kernel.exception.PortalException,
491 com.liferay.portal.kernel.exception.SystemException {
492 return _expandoValue.getString(locale);
493 }
494
495 public java.lang.String[] getStringArray()
496 throws com.liferay.portal.kernel.exception.PortalException,
497 com.liferay.portal.kernel.exception.SystemException {
498 return _expandoValue.getStringArray();
499 }
500
501 public java.lang.String[] getStringArray(java.util.Locale locale)
502 throws com.liferay.portal.kernel.exception.PortalException,
503 com.liferay.portal.kernel.exception.SystemException {
504 return _expandoValue.getStringArray(locale);
505 }
506
507 public java.util.Map<java.util.Locale, java.lang.String[]> getStringArrayMap()
508 throws com.liferay.portal.kernel.exception.PortalException,
509 com.liferay.portal.kernel.exception.SystemException {
510 return _expandoValue.getStringArrayMap();
511 }
512
513 public java.util.Map<java.util.Locale, java.lang.String> getStringMap()
514 throws com.liferay.portal.kernel.exception.PortalException,
515 com.liferay.portal.kernel.exception.SystemException {
516 return _expandoValue.getStringMap();
517 }
518
519 public void setBoolean(boolean data)
520 throws com.liferay.portal.kernel.exception.PortalException,
521 com.liferay.portal.kernel.exception.SystemException {
522 _expandoValue.setBoolean(data);
523 }
524
525 public void setBooleanArray(boolean[] data)
526 throws com.liferay.portal.kernel.exception.PortalException,
527 com.liferay.portal.kernel.exception.SystemException {
528 _expandoValue.setBooleanArray(data);
529 }
530
531 public void setColumn(
532 com.liferay.portlet.expando.model.ExpandoColumn column) {
533 _expandoValue.setColumn(column);
534 }
535
536 public void setDate(java.util.Date data)
537 throws com.liferay.portal.kernel.exception.PortalException,
538 com.liferay.portal.kernel.exception.SystemException {
539 _expandoValue.setDate(data);
540 }
541
542 public void setDateArray(java.util.Date[] data)
543 throws com.liferay.portal.kernel.exception.PortalException,
544 com.liferay.portal.kernel.exception.SystemException {
545 _expandoValue.setDateArray(data);
546 }
547
548 public void setDouble(double data)
549 throws com.liferay.portal.kernel.exception.PortalException,
550 com.liferay.portal.kernel.exception.SystemException {
551 _expandoValue.setDouble(data);
552 }
553
554 public void setDoubleArray(double[] data)
555 throws com.liferay.portal.kernel.exception.PortalException,
556 com.liferay.portal.kernel.exception.SystemException {
557 _expandoValue.setDoubleArray(data);
558 }
559
560 public void setFloat(float data)
561 throws com.liferay.portal.kernel.exception.PortalException,
562 com.liferay.portal.kernel.exception.SystemException {
563 _expandoValue.setFloat(data);
564 }
565
566 public void setFloatArray(float[] data)
567 throws com.liferay.portal.kernel.exception.PortalException,
568 com.liferay.portal.kernel.exception.SystemException {
569 _expandoValue.setFloatArray(data);
570 }
571
572 public void setInteger(int data)
573 throws com.liferay.portal.kernel.exception.PortalException,
574 com.liferay.portal.kernel.exception.SystemException {
575 _expandoValue.setInteger(data);
576 }
577
578 public void setIntegerArray(int[] data)
579 throws com.liferay.portal.kernel.exception.PortalException,
580 com.liferay.portal.kernel.exception.SystemException {
581 _expandoValue.setIntegerArray(data);
582 }
583
584 public void setLong(long data)
585 throws com.liferay.portal.kernel.exception.PortalException,
586 com.liferay.portal.kernel.exception.SystemException {
587 _expandoValue.setLong(data);
588 }
589
590 public void setLongArray(long[] data)
591 throws com.liferay.portal.kernel.exception.PortalException,
592 com.liferay.portal.kernel.exception.SystemException {
593 _expandoValue.setLongArray(data);
594 }
595
596 public void setNumber(java.lang.Number data)
597 throws com.liferay.portal.kernel.exception.PortalException,
598 com.liferay.portal.kernel.exception.SystemException {
599 _expandoValue.setNumber(data);
600 }
601
602 public void setNumberArray(java.lang.Number[] data)
603 throws com.liferay.portal.kernel.exception.PortalException,
604 com.liferay.portal.kernel.exception.SystemException {
605 _expandoValue.setNumberArray(data);
606 }
607
608 public void setShort(short data)
609 throws com.liferay.portal.kernel.exception.PortalException,
610 com.liferay.portal.kernel.exception.SystemException {
611 _expandoValue.setShort(data);
612 }
613
614 public void setShortArray(short[] data)
615 throws com.liferay.portal.kernel.exception.PortalException,
616 com.liferay.portal.kernel.exception.SystemException {
617 _expandoValue.setShortArray(data);
618 }
619
620 public void setString(java.lang.String data)
621 throws com.liferay.portal.kernel.exception.PortalException,
622 com.liferay.portal.kernel.exception.SystemException {
623 _expandoValue.setString(data);
624 }
625
626 public void setString(java.lang.String data, java.util.Locale locale,
627 java.util.Locale defaultLocale)
628 throws com.liferay.portal.kernel.exception.PortalException,
629 com.liferay.portal.kernel.exception.SystemException {
630 _expandoValue.setString(data, locale, defaultLocale);
631 }
632
633 public void setStringArray(java.lang.String[] data)
634 throws com.liferay.portal.kernel.exception.PortalException,
635 com.liferay.portal.kernel.exception.SystemException {
636 _expandoValue.setStringArray(data);
637 }
638
639 public void setStringArray(java.lang.String[] data,
640 java.util.Locale locale, java.util.Locale defaultLocale)
641 throws com.liferay.portal.kernel.exception.PortalException,
642 com.liferay.portal.kernel.exception.SystemException {
643 _expandoValue.setStringArray(data, locale, defaultLocale);
644 }
645
646 public void setStringArrayMap(
647 java.util.Map<java.util.Locale, java.lang.String[]> dataMap,
648 java.util.Locale defaultLocale)
649 throws com.liferay.portal.kernel.exception.PortalException,
650 com.liferay.portal.kernel.exception.SystemException {
651 _expandoValue.setStringArrayMap(dataMap, defaultLocale);
652 }
653
654 public void setStringMap(
655 java.util.Map<java.util.Locale, java.lang.String> dataMap,
656 java.util.Locale defaultLocale)
657 throws com.liferay.portal.kernel.exception.PortalException,
658 com.liferay.portal.kernel.exception.SystemException {
659 _expandoValue.setStringMap(dataMap, defaultLocale);
660 }
661
662
665 public ExpandoValue getWrappedExpandoValue() {
666 return _expandoValue;
667 }
668
669 public ExpandoValue getWrappedModel() {
670 return _expandoValue;
671 }
672
673 public void resetOriginalValues() {
674 _expandoValue.resetOriginalValues();
675 }
676
677 private ExpandoValue _expandoValue;
678 }