001    /**
002     * Copyright (c) 2000-2013 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.expando.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 ExpandoValue}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       ExpandoValue
029     * @generated
030     */
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            /**
111            * Returns the primary key of this expando value.
112            *
113            * @return the primary key of this expando value
114            */
115            public long getPrimaryKey() {
116                    return _expandoValue.getPrimaryKey();
117            }
118    
119            /**
120            * Sets the primary key of this expando value.
121            *
122            * @param primaryKey the primary key of this expando value
123            */
124            public void setPrimaryKey(long primaryKey) {
125                    _expandoValue.setPrimaryKey(primaryKey);
126            }
127    
128            /**
129            * Returns the value ID of this expando value.
130            *
131            * @return the value ID of this expando value
132            */
133            public long getValueId() {
134                    return _expandoValue.getValueId();
135            }
136    
137            /**
138            * Sets the value ID of this expando value.
139            *
140            * @param valueId the value ID of this expando value
141            */
142            public void setValueId(long valueId) {
143                    _expandoValue.setValueId(valueId);
144            }
145    
146            /**
147            * Returns the company ID of this expando value.
148            *
149            * @return the company ID of this expando value
150            */
151            public long getCompanyId() {
152                    return _expandoValue.getCompanyId();
153            }
154    
155            /**
156            * Sets the company ID of this expando value.
157            *
158            * @param companyId the company ID of this expando value
159            */
160            public void setCompanyId(long companyId) {
161                    _expandoValue.setCompanyId(companyId);
162            }
163    
164            /**
165            * Returns the table ID of this expando value.
166            *
167            * @return the table ID of this expando value
168            */
169            public long getTableId() {
170                    return _expandoValue.getTableId();
171            }
172    
173            /**
174            * Sets the table ID of this expando value.
175            *
176            * @param tableId the table ID of this expando value
177            */
178            public void setTableId(long tableId) {
179                    _expandoValue.setTableId(tableId);
180            }
181    
182            /**
183            * Returns the column ID of this expando value.
184            *
185            * @return the column ID of this expando value
186            */
187            public long getColumnId() {
188                    return _expandoValue.getColumnId();
189            }
190    
191            /**
192            * Sets the column ID of this expando value.
193            *
194            * @param columnId the column ID of this expando value
195            */
196            public void setColumnId(long columnId) {
197                    _expandoValue.setColumnId(columnId);
198            }
199    
200            /**
201            * Returns the row ID of this expando value.
202            *
203            * @return the row ID of this expando value
204            */
205            public long getRowId() {
206                    return _expandoValue.getRowId();
207            }
208    
209            /**
210            * Sets the row ID of this expando value.
211            *
212            * @param rowId the row ID of this expando value
213            */
214            public void setRowId(long rowId) {
215                    _expandoValue.setRowId(rowId);
216            }
217    
218            /**
219            * Returns the fully qualified class name of this expando value.
220            *
221            * @return the fully qualified class name of this expando value
222            */
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            /**
232            * Returns the class name ID of this expando value.
233            *
234            * @return the class name ID of this expando value
235            */
236            public long getClassNameId() {
237                    return _expandoValue.getClassNameId();
238            }
239    
240            /**
241            * Sets the class name ID of this expando value.
242            *
243            * @param classNameId the class name ID of this expando value
244            */
245            public void setClassNameId(long classNameId) {
246                    _expandoValue.setClassNameId(classNameId);
247            }
248    
249            /**
250            * Returns the class p k of this expando value.
251            *
252            * @return the class p k of this expando value
253            */
254            public long getClassPK() {
255                    return _expandoValue.getClassPK();
256            }
257    
258            /**
259            * Sets the class p k of this expando value.
260            *
261            * @param classPK the class p k of this expando value
262            */
263            public void setClassPK(long classPK) {
264                    _expandoValue.setClassPK(classPK);
265            }
266    
267            /**
268            * Returns the data of this expando value.
269            *
270            * @return the data of this expando value
271            */
272            public java.lang.String getData() {
273                    return _expandoValue.getData();
274            }
275    
276            /**
277            * Sets the data of this expando value.
278            *
279            * @param data the data of this expando value
280            */
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.model.BaseModel<?> baseModel) {
319                    _expandoValue.setExpandoBridgeAttributes(baseModel);
320            }
321    
322            public void setExpandoBridgeAttributes(
323                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
324                    _expandoValue.setExpandoBridgeAttributes(expandoBridge);
325            }
326    
327            public void setExpandoBridgeAttributes(
328                    com.liferay.portal.service.ServiceContext serviceContext) {
329                    _expandoValue.setExpandoBridgeAttributes(serviceContext);
330            }
331    
332            @Override
333            public java.lang.Object clone() {
334                    return new ExpandoValueWrapper((ExpandoValue)_expandoValue.clone());
335            }
336    
337            public int compareTo(
338                    com.liferay.portlet.expando.model.ExpandoValue expandoValue) {
339                    return _expandoValue.compareTo(expandoValue);
340            }
341    
342            @Override
343            public int hashCode() {
344                    return _expandoValue.hashCode();
345            }
346    
347            public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoValue> toCacheModel() {
348                    return _expandoValue.toCacheModel();
349            }
350    
351            public com.liferay.portlet.expando.model.ExpandoValue toEscapedModel() {
352                    return new ExpandoValueWrapper(_expandoValue.toEscapedModel());
353            }
354    
355            public com.liferay.portlet.expando.model.ExpandoValue toUnescapedModel() {
356                    return new ExpandoValueWrapper(_expandoValue.toUnescapedModel());
357            }
358    
359            @Override
360            public java.lang.String toString() {
361                    return _expandoValue.toString();
362            }
363    
364            public java.lang.String toXmlString() {
365                    return _expandoValue.toXmlString();
366            }
367    
368            public void persist()
369                    throws com.liferay.portal.kernel.exception.SystemException {
370                    _expandoValue.persist();
371            }
372    
373            public java.util.List<java.util.Locale> getAvailableLocales()
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    return _expandoValue.getAvailableLocales();
377            }
378    
379            public boolean getBoolean()
380                    throws com.liferay.portal.kernel.exception.PortalException,
381                            com.liferay.portal.kernel.exception.SystemException {
382                    return _expandoValue.getBoolean();
383            }
384    
385            public boolean[] getBooleanArray()
386                    throws com.liferay.portal.kernel.exception.PortalException,
387                            com.liferay.portal.kernel.exception.SystemException {
388                    return _expandoValue.getBooleanArray();
389            }
390    
391            public com.liferay.portlet.expando.model.ExpandoColumn getColumn()
392                    throws com.liferay.portal.kernel.exception.PortalException,
393                            com.liferay.portal.kernel.exception.SystemException {
394                    return _expandoValue.getColumn();
395            }
396    
397            public java.util.Date getDate()
398                    throws com.liferay.portal.kernel.exception.PortalException,
399                            com.liferay.portal.kernel.exception.SystemException {
400                    return _expandoValue.getDate();
401            }
402    
403            public java.util.Date[] getDateArray()
404                    throws com.liferay.portal.kernel.exception.PortalException,
405                            com.liferay.portal.kernel.exception.SystemException {
406                    return _expandoValue.getDateArray();
407            }
408    
409            public java.util.Locale getDefaultLocale()
410                    throws com.liferay.portal.kernel.exception.PortalException,
411                            com.liferay.portal.kernel.exception.SystemException {
412                    return _expandoValue.getDefaultLocale();
413            }
414    
415            public double getDouble()
416                    throws com.liferay.portal.kernel.exception.PortalException,
417                            com.liferay.portal.kernel.exception.SystemException {
418                    return _expandoValue.getDouble();
419            }
420    
421            public double[] getDoubleArray()
422                    throws com.liferay.portal.kernel.exception.PortalException,
423                            com.liferay.portal.kernel.exception.SystemException {
424                    return _expandoValue.getDoubleArray();
425            }
426    
427            public float getFloat()
428                    throws com.liferay.portal.kernel.exception.PortalException,
429                            com.liferay.portal.kernel.exception.SystemException {
430                    return _expandoValue.getFloat();
431            }
432    
433            public float[] getFloatArray()
434                    throws com.liferay.portal.kernel.exception.PortalException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    return _expandoValue.getFloatArray();
437            }
438    
439            public int getInteger()
440                    throws com.liferay.portal.kernel.exception.PortalException,
441                            com.liferay.portal.kernel.exception.SystemException {
442                    return _expandoValue.getInteger();
443            }
444    
445            public int[] getIntegerArray()
446                    throws com.liferay.portal.kernel.exception.PortalException,
447                            com.liferay.portal.kernel.exception.SystemException {
448                    return _expandoValue.getIntegerArray();
449            }
450    
451            public long getLong()
452                    throws com.liferay.portal.kernel.exception.PortalException,
453                            com.liferay.portal.kernel.exception.SystemException {
454                    return _expandoValue.getLong();
455            }
456    
457            public long[] getLongArray()
458                    throws com.liferay.portal.kernel.exception.PortalException,
459                            com.liferay.portal.kernel.exception.SystemException {
460                    return _expandoValue.getLongArray();
461            }
462    
463            public java.lang.Number getNumber()
464                    throws com.liferay.portal.kernel.exception.PortalException,
465                            com.liferay.portal.kernel.exception.SystemException {
466                    return _expandoValue.getNumber();
467            }
468    
469            public java.lang.Number[] getNumberArray()
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    return _expandoValue.getNumberArray();
473            }
474    
475            public java.io.Serializable getSerializable()
476                    throws com.liferay.portal.kernel.exception.PortalException,
477                            com.liferay.portal.kernel.exception.SystemException {
478                    return _expandoValue.getSerializable();
479            }
480    
481            public short getShort()
482                    throws com.liferay.portal.kernel.exception.PortalException,
483                            com.liferay.portal.kernel.exception.SystemException {
484                    return _expandoValue.getShort();
485            }
486    
487            public short[] getShortArray()
488                    throws com.liferay.portal.kernel.exception.PortalException,
489                            com.liferay.portal.kernel.exception.SystemException {
490                    return _expandoValue.getShortArray();
491            }
492    
493            public java.lang.String getString()
494                    throws com.liferay.portal.kernel.exception.PortalException,
495                            com.liferay.portal.kernel.exception.SystemException {
496                    return _expandoValue.getString();
497            }
498    
499            public java.lang.String getString(java.util.Locale locale)
500                    throws com.liferay.portal.kernel.exception.PortalException,
501                            com.liferay.portal.kernel.exception.SystemException {
502                    return _expandoValue.getString(locale);
503            }
504    
505            public java.lang.String[] getStringArray()
506                    throws com.liferay.portal.kernel.exception.PortalException,
507                            com.liferay.portal.kernel.exception.SystemException {
508                    return _expandoValue.getStringArray();
509            }
510    
511            public java.lang.String[] getStringArray(java.util.Locale locale)
512                    throws com.liferay.portal.kernel.exception.PortalException,
513                            com.liferay.portal.kernel.exception.SystemException {
514                    return _expandoValue.getStringArray(locale);
515            }
516    
517            public java.util.Map<java.util.Locale, java.lang.String[]> getStringArrayMap()
518                    throws com.liferay.portal.kernel.exception.PortalException,
519                            com.liferay.portal.kernel.exception.SystemException {
520                    return _expandoValue.getStringArrayMap();
521            }
522    
523            public java.util.Map<java.util.Locale, java.lang.String> getStringMap()
524                    throws com.liferay.portal.kernel.exception.PortalException,
525                            com.liferay.portal.kernel.exception.SystemException {
526                    return _expandoValue.getStringMap();
527            }
528    
529            public void setBoolean(boolean data)
530                    throws com.liferay.portal.kernel.exception.PortalException,
531                            com.liferay.portal.kernel.exception.SystemException {
532                    _expandoValue.setBoolean(data);
533            }
534    
535            public void setBooleanArray(boolean[] data)
536                    throws com.liferay.portal.kernel.exception.PortalException,
537                            com.liferay.portal.kernel.exception.SystemException {
538                    _expandoValue.setBooleanArray(data);
539            }
540    
541            public void setColumn(
542                    com.liferay.portlet.expando.model.ExpandoColumn column) {
543                    _expandoValue.setColumn(column);
544            }
545    
546            public void setDate(java.util.Date data)
547                    throws com.liferay.portal.kernel.exception.PortalException,
548                            com.liferay.portal.kernel.exception.SystemException {
549                    _expandoValue.setDate(data);
550            }
551    
552            public void setDateArray(java.util.Date[] data)
553                    throws com.liferay.portal.kernel.exception.PortalException,
554                            com.liferay.portal.kernel.exception.SystemException {
555                    _expandoValue.setDateArray(data);
556            }
557    
558            public void setDouble(double data)
559                    throws com.liferay.portal.kernel.exception.PortalException,
560                            com.liferay.portal.kernel.exception.SystemException {
561                    _expandoValue.setDouble(data);
562            }
563    
564            public void setDoubleArray(double[] data)
565                    throws com.liferay.portal.kernel.exception.PortalException,
566                            com.liferay.portal.kernel.exception.SystemException {
567                    _expandoValue.setDoubleArray(data);
568            }
569    
570            public void setFloat(float data)
571                    throws com.liferay.portal.kernel.exception.PortalException,
572                            com.liferay.portal.kernel.exception.SystemException {
573                    _expandoValue.setFloat(data);
574            }
575    
576            public void setFloatArray(float[] data)
577                    throws com.liferay.portal.kernel.exception.PortalException,
578                            com.liferay.portal.kernel.exception.SystemException {
579                    _expandoValue.setFloatArray(data);
580            }
581    
582            public void setInteger(int data)
583                    throws com.liferay.portal.kernel.exception.PortalException,
584                            com.liferay.portal.kernel.exception.SystemException {
585                    _expandoValue.setInteger(data);
586            }
587    
588            public void setIntegerArray(int[] data)
589                    throws com.liferay.portal.kernel.exception.PortalException,
590                            com.liferay.portal.kernel.exception.SystemException {
591                    _expandoValue.setIntegerArray(data);
592            }
593    
594            public void setLong(long data)
595                    throws com.liferay.portal.kernel.exception.PortalException,
596                            com.liferay.portal.kernel.exception.SystemException {
597                    _expandoValue.setLong(data);
598            }
599    
600            public void setLongArray(long[] data)
601                    throws com.liferay.portal.kernel.exception.PortalException,
602                            com.liferay.portal.kernel.exception.SystemException {
603                    _expandoValue.setLongArray(data);
604            }
605    
606            public void setNumber(java.lang.Number data)
607                    throws com.liferay.portal.kernel.exception.PortalException,
608                            com.liferay.portal.kernel.exception.SystemException {
609                    _expandoValue.setNumber(data);
610            }
611    
612            public void setNumberArray(java.lang.Number[] data)
613                    throws com.liferay.portal.kernel.exception.PortalException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    _expandoValue.setNumberArray(data);
616            }
617    
618            public void setShort(short data)
619                    throws com.liferay.portal.kernel.exception.PortalException,
620                            com.liferay.portal.kernel.exception.SystemException {
621                    _expandoValue.setShort(data);
622            }
623    
624            public void setShortArray(short[] data)
625                    throws com.liferay.portal.kernel.exception.PortalException,
626                            com.liferay.portal.kernel.exception.SystemException {
627                    _expandoValue.setShortArray(data);
628            }
629    
630            public void setString(java.lang.String data)
631                    throws com.liferay.portal.kernel.exception.PortalException,
632                            com.liferay.portal.kernel.exception.SystemException {
633                    _expandoValue.setString(data);
634            }
635    
636            public void setString(java.lang.String data, java.util.Locale locale,
637                    java.util.Locale defaultLocale)
638                    throws com.liferay.portal.kernel.exception.PortalException,
639                            com.liferay.portal.kernel.exception.SystemException {
640                    _expandoValue.setString(data, locale, defaultLocale);
641            }
642    
643            public void setStringArray(java.lang.String[] data)
644                    throws com.liferay.portal.kernel.exception.PortalException,
645                            com.liferay.portal.kernel.exception.SystemException {
646                    _expandoValue.setStringArray(data);
647            }
648    
649            public void setStringArray(java.lang.String[] data,
650                    java.util.Locale locale, java.util.Locale defaultLocale)
651                    throws com.liferay.portal.kernel.exception.PortalException,
652                            com.liferay.portal.kernel.exception.SystemException {
653                    _expandoValue.setStringArray(data, locale, defaultLocale);
654            }
655    
656            public void setStringArrayMap(
657                    java.util.Map<java.util.Locale, java.lang.String[]> dataMap,
658                    java.util.Locale defaultLocale)
659                    throws com.liferay.portal.kernel.exception.PortalException,
660                            com.liferay.portal.kernel.exception.SystemException {
661                    _expandoValue.setStringArrayMap(dataMap, defaultLocale);
662            }
663    
664            public void setStringMap(
665                    java.util.Map<java.util.Locale, java.lang.String> dataMap,
666                    java.util.Locale defaultLocale)
667                    throws com.liferay.portal.kernel.exception.PortalException,
668                            com.liferay.portal.kernel.exception.SystemException {
669                    _expandoValue.setStringMap(dataMap, defaultLocale);
670            }
671    
672            /**
673             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
674             */
675            public ExpandoValue getWrappedExpandoValue() {
676                    return _expandoValue;
677            }
678    
679            public ExpandoValue getWrappedModel() {
680                    return _expandoValue;
681            }
682    
683            public void resetOriginalValues() {
684                    _expandoValue.resetOriginalValues();
685            }
686    
687            private ExpandoValue _expandoValue;
688    }