001    /**
002     * Copyright (c) 2000-present 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 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    /**
026     * <p>
027     * This class is a wrapper for {@link ExpandoValue}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see ExpandoValue
032     * @generated
033     */
034    @ProviderType
035    public class ExpandoValueWrapper implements ExpandoValue,
036            ModelWrapper<ExpandoValue> {
037            public ExpandoValueWrapper(ExpandoValue expandoValue) {
038                    _expandoValue = expandoValue;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return ExpandoValue.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return ExpandoValue.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("valueId", getValueId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("tableId", getTableId());
058                    attributes.put("columnId", getColumnId());
059                    attributes.put("rowId", getRowId());
060                    attributes.put("classNameId", getClassNameId());
061                    attributes.put("classPK", getClassPK());
062                    attributes.put("data", getData());
063    
064                    return attributes;
065            }
066    
067            @Override
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    Long valueId = (Long)attributes.get("valueId");
070    
071                    if (valueId != null) {
072                            setValueId(valueId);
073                    }
074    
075                    Long companyId = (Long)attributes.get("companyId");
076    
077                    if (companyId != null) {
078                            setCompanyId(companyId);
079                    }
080    
081                    Long tableId = (Long)attributes.get("tableId");
082    
083                    if (tableId != null) {
084                            setTableId(tableId);
085                    }
086    
087                    Long columnId = (Long)attributes.get("columnId");
088    
089                    if (columnId != null) {
090                            setColumnId(columnId);
091                    }
092    
093                    Long rowId = (Long)attributes.get("rowId");
094    
095                    if (rowId != null) {
096                            setRowId(rowId);
097                    }
098    
099                    Long classNameId = (Long)attributes.get("classNameId");
100    
101                    if (classNameId != null) {
102                            setClassNameId(classNameId);
103                    }
104    
105                    Long classPK = (Long)attributes.get("classPK");
106    
107                    if (classPK != null) {
108                            setClassPK(classPK);
109                    }
110    
111                    String data = (String)attributes.get("data");
112    
113                    if (data != null) {
114                            setData(data);
115                    }
116            }
117    
118            @Override
119            public java.lang.Object clone() {
120                    return new ExpandoValueWrapper((ExpandoValue)_expandoValue.clone());
121            }
122    
123            @Override
124            public int compareTo(
125                    com.liferay.portlet.expando.model.ExpandoValue expandoValue) {
126                    return _expandoValue.compareTo(expandoValue);
127            }
128    
129            @Override
130            public java.util.List<java.util.Locale> getAvailableLocales()
131                    throws com.liferay.portal.kernel.exception.PortalException {
132                    return _expandoValue.getAvailableLocales();
133            }
134    
135            @Override
136            public boolean getBoolean()
137                    throws com.liferay.portal.kernel.exception.PortalException {
138                    return _expandoValue.getBoolean();
139            }
140    
141            @Override
142            public boolean[] getBooleanArray()
143                    throws com.liferay.portal.kernel.exception.PortalException {
144                    return _expandoValue.getBooleanArray();
145            }
146    
147            /**
148            * Returns the fully qualified class name of this expando value.
149            *
150            * @return the fully qualified class name of this expando value
151            */
152            @Override
153            public java.lang.String getClassName() {
154                    return _expandoValue.getClassName();
155            }
156    
157            /**
158            * Returns the class name ID of this expando value.
159            *
160            * @return the class name ID of this expando value
161            */
162            @Override
163            public long getClassNameId() {
164                    return _expandoValue.getClassNameId();
165            }
166    
167            /**
168            * Returns the class p k of this expando value.
169            *
170            * @return the class p k of this expando value
171            */
172            @Override
173            public long getClassPK() {
174                    return _expandoValue.getClassPK();
175            }
176    
177            @Override
178            public com.liferay.portlet.expando.model.ExpandoColumn getColumn()
179                    throws com.liferay.portal.kernel.exception.PortalException {
180                    return _expandoValue.getColumn();
181            }
182    
183            /**
184            * Returns the column ID of this expando value.
185            *
186            * @return the column ID of this expando value
187            */
188            @Override
189            public long getColumnId() {
190                    return _expandoValue.getColumnId();
191            }
192    
193            /**
194            * Returns the company ID of this expando value.
195            *
196            * @return the company ID of this expando value
197            */
198            @Override
199            public long getCompanyId() {
200                    return _expandoValue.getCompanyId();
201            }
202    
203            /**
204            * Returns the data of this expando value.
205            *
206            * @return the data of this expando value
207            */
208            @Override
209            public java.lang.String getData() {
210                    return _expandoValue.getData();
211            }
212    
213            @Override
214            public java.util.Date getDate()
215                    throws com.liferay.portal.kernel.exception.PortalException {
216                    return _expandoValue.getDate();
217            }
218    
219            @Override
220            public java.util.Date[] getDateArray()
221                    throws com.liferay.portal.kernel.exception.PortalException {
222                    return _expandoValue.getDateArray();
223            }
224    
225            @Override
226            public java.util.Locale getDefaultLocale()
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return _expandoValue.getDefaultLocale();
229            }
230    
231            @Override
232            public double getDouble()
233                    throws com.liferay.portal.kernel.exception.PortalException {
234                    return _expandoValue.getDouble();
235            }
236    
237            @Override
238            public double[] getDoubleArray()
239                    throws com.liferay.portal.kernel.exception.PortalException {
240                    return _expandoValue.getDoubleArray();
241            }
242    
243            @Override
244            public ExpandoBridge getExpandoBridge() {
245                    return _expandoValue.getExpandoBridge();
246            }
247    
248            @Override
249            public float getFloat()
250                    throws com.liferay.portal.kernel.exception.PortalException {
251                    return _expandoValue.getFloat();
252            }
253    
254            @Override
255            public float[] getFloatArray()
256                    throws com.liferay.portal.kernel.exception.PortalException {
257                    return _expandoValue.getFloatArray();
258            }
259    
260            @Override
261            public int getInteger()
262                    throws com.liferay.portal.kernel.exception.PortalException {
263                    return _expandoValue.getInteger();
264            }
265    
266            @Override
267            public int[] getIntegerArray()
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    return _expandoValue.getIntegerArray();
270            }
271    
272            @Override
273            public long getLong()
274                    throws com.liferay.portal.kernel.exception.PortalException {
275                    return _expandoValue.getLong();
276            }
277    
278            @Override
279            public long[] getLongArray()
280                    throws com.liferay.portal.kernel.exception.PortalException {
281                    return _expandoValue.getLongArray();
282            }
283    
284            @Override
285            public java.lang.Number getNumber()
286                    throws com.liferay.portal.kernel.exception.PortalException {
287                    return _expandoValue.getNumber();
288            }
289    
290            @Override
291            public java.lang.Number[] getNumberArray()
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    return _expandoValue.getNumberArray();
294            }
295    
296            /**
297            * Returns the primary key of this expando value.
298            *
299            * @return the primary key of this expando value
300            */
301            @Override
302            public long getPrimaryKey() {
303                    return _expandoValue.getPrimaryKey();
304            }
305    
306            @Override
307            public java.io.Serializable getPrimaryKeyObj() {
308                    return _expandoValue.getPrimaryKeyObj();
309            }
310    
311            /**
312            * Returns the row ID of this expando value.
313            *
314            * @return the row ID of this expando value
315            */
316            @Override
317            public long getRowId() {
318                    return _expandoValue.getRowId();
319            }
320    
321            @Override
322            public java.io.Serializable getSerializable()
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    return _expandoValue.getSerializable();
325            }
326    
327            @Override
328            public short getShort()
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return _expandoValue.getShort();
331            }
332    
333            @Override
334            public short[] getShortArray()
335                    throws com.liferay.portal.kernel.exception.PortalException {
336                    return _expandoValue.getShortArray();
337            }
338    
339            @Override
340            public java.lang.String getString()
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return _expandoValue.getString();
343            }
344    
345            @Override
346            public java.lang.String getString(java.util.Locale locale)
347                    throws com.liferay.portal.kernel.exception.PortalException {
348                    return _expandoValue.getString(locale);
349            }
350    
351            @Override
352            public java.lang.String[] getStringArray()
353                    throws com.liferay.portal.kernel.exception.PortalException {
354                    return _expandoValue.getStringArray();
355            }
356    
357            @Override
358            public java.lang.String[] getStringArray(java.util.Locale locale)
359                    throws com.liferay.portal.kernel.exception.PortalException {
360                    return _expandoValue.getStringArray(locale);
361            }
362    
363            @Override
364            public Map<java.util.Locale, java.lang.String[]> getStringArrayMap()
365                    throws com.liferay.portal.kernel.exception.PortalException {
366                    return _expandoValue.getStringArrayMap();
367            }
368    
369            @Override
370            public Map<java.util.Locale, java.lang.String> getStringMap()
371                    throws com.liferay.portal.kernel.exception.PortalException {
372                    return _expandoValue.getStringMap();
373            }
374    
375            /**
376            * Returns the table ID of this expando value.
377            *
378            * @return the table ID of this expando value
379            */
380            @Override
381            public long getTableId() {
382                    return _expandoValue.getTableId();
383            }
384    
385            /**
386            * Returns the value ID of this expando value.
387            *
388            * @return the value ID of this expando value
389            */
390            @Override
391            public long getValueId() {
392                    return _expandoValue.getValueId();
393            }
394    
395            @Override
396            public int hashCode() {
397                    return _expandoValue.hashCode();
398            }
399    
400            @Override
401            public boolean isCachedModel() {
402                    return _expandoValue.isCachedModel();
403            }
404    
405            @Override
406            public boolean isEscapedModel() {
407                    return _expandoValue.isEscapedModel();
408            }
409    
410            @Override
411            public boolean isNew() {
412                    return _expandoValue.isNew();
413            }
414    
415            @Override
416            public void persist() {
417                    _expandoValue.persist();
418            }
419    
420            @Override
421            public void setBoolean(boolean data)
422                    throws com.liferay.portal.kernel.exception.PortalException {
423                    _expandoValue.setBoolean(data);
424            }
425    
426            @Override
427            public void setBooleanArray(boolean[] data)
428                    throws com.liferay.portal.kernel.exception.PortalException {
429                    _expandoValue.setBooleanArray(data);
430            }
431    
432            @Override
433            public void setCachedModel(boolean cachedModel) {
434                    _expandoValue.setCachedModel(cachedModel);
435            }
436    
437            @Override
438            public void setClassName(java.lang.String className) {
439                    _expandoValue.setClassName(className);
440            }
441    
442            /**
443            * Sets the class name ID of this expando value.
444            *
445            * @param classNameId the class name ID of this expando value
446            */
447            @Override
448            public void setClassNameId(long classNameId) {
449                    _expandoValue.setClassNameId(classNameId);
450            }
451    
452            /**
453            * Sets the class p k of this expando value.
454            *
455            * @param classPK the class p k of this expando value
456            */
457            @Override
458            public void setClassPK(long classPK) {
459                    _expandoValue.setClassPK(classPK);
460            }
461    
462            @Override
463            public void setColumn(
464                    com.liferay.portlet.expando.model.ExpandoColumn column) {
465                    _expandoValue.setColumn(column);
466            }
467    
468            /**
469            * Sets the column ID of this expando value.
470            *
471            * @param columnId the column ID of this expando value
472            */
473            @Override
474            public void setColumnId(long columnId) {
475                    _expandoValue.setColumnId(columnId);
476            }
477    
478            /**
479            * Sets the company ID of this expando value.
480            *
481            * @param companyId the company ID of this expando value
482            */
483            @Override
484            public void setCompanyId(long companyId) {
485                    _expandoValue.setCompanyId(companyId);
486            }
487    
488            /**
489            * Sets the data of this expando value.
490            *
491            * @param data the data of this expando value
492            */
493            @Override
494            public void setData(java.lang.String data) {
495                    _expandoValue.setData(data);
496            }
497    
498            @Override
499            public void setDate(java.util.Date data)
500                    throws com.liferay.portal.kernel.exception.PortalException {
501                    _expandoValue.setDate(data);
502            }
503    
504            @Override
505            public void setDateArray(java.util.Date[] data)
506                    throws com.liferay.portal.kernel.exception.PortalException {
507                    _expandoValue.setDateArray(data);
508            }
509    
510            @Override
511            public void setDouble(double data)
512                    throws com.liferay.portal.kernel.exception.PortalException {
513                    _expandoValue.setDouble(data);
514            }
515    
516            @Override
517            public void setDoubleArray(double[] data)
518                    throws com.liferay.portal.kernel.exception.PortalException {
519                    _expandoValue.setDoubleArray(data);
520            }
521    
522            @Override
523            public void setExpandoBridgeAttributes(
524                    com.liferay.portal.model.BaseModel<?> baseModel) {
525                    _expandoValue.setExpandoBridgeAttributes(baseModel);
526            }
527    
528            @Override
529            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
530                    _expandoValue.setExpandoBridgeAttributes(expandoBridge);
531            }
532    
533            @Override
534            public void setExpandoBridgeAttributes(
535                    com.liferay.portal.service.ServiceContext serviceContext) {
536                    _expandoValue.setExpandoBridgeAttributes(serviceContext);
537            }
538    
539            @Override
540            public void setFloat(float data)
541                    throws com.liferay.portal.kernel.exception.PortalException {
542                    _expandoValue.setFloat(data);
543            }
544    
545            @Override
546            public void setFloatArray(float[] data)
547                    throws com.liferay.portal.kernel.exception.PortalException {
548                    _expandoValue.setFloatArray(data);
549            }
550    
551            @Override
552            public void setInteger(int data)
553                    throws com.liferay.portal.kernel.exception.PortalException {
554                    _expandoValue.setInteger(data);
555            }
556    
557            @Override
558            public void setIntegerArray(int[] data)
559                    throws com.liferay.portal.kernel.exception.PortalException {
560                    _expandoValue.setIntegerArray(data);
561            }
562    
563            @Override
564            public void setLong(long data)
565                    throws com.liferay.portal.kernel.exception.PortalException {
566                    _expandoValue.setLong(data);
567            }
568    
569            @Override
570            public void setLongArray(long[] data)
571                    throws com.liferay.portal.kernel.exception.PortalException {
572                    _expandoValue.setLongArray(data);
573            }
574    
575            @Override
576            public void setNew(boolean n) {
577                    _expandoValue.setNew(n);
578            }
579    
580            @Override
581            public void setNumber(java.lang.Number data)
582                    throws com.liferay.portal.kernel.exception.PortalException {
583                    _expandoValue.setNumber(data);
584            }
585    
586            @Override
587            public void setNumberArray(java.lang.Number[] data)
588                    throws com.liferay.portal.kernel.exception.PortalException {
589                    _expandoValue.setNumberArray(data);
590            }
591    
592            /**
593            * Sets the primary key of this expando value.
594            *
595            * @param primaryKey the primary key of this expando value
596            */
597            @Override
598            public void setPrimaryKey(long primaryKey) {
599                    _expandoValue.setPrimaryKey(primaryKey);
600            }
601    
602            @Override
603            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
604                    _expandoValue.setPrimaryKeyObj(primaryKeyObj);
605            }
606    
607            /**
608            * Sets the row ID of this expando value.
609            *
610            * @param rowId the row ID of this expando value
611            */
612            @Override
613            public void setRowId(long rowId) {
614                    _expandoValue.setRowId(rowId);
615            }
616    
617            @Override
618            public void setShort(short data)
619                    throws com.liferay.portal.kernel.exception.PortalException {
620                    _expandoValue.setShort(data);
621            }
622    
623            @Override
624            public void setShortArray(short[] data)
625                    throws com.liferay.portal.kernel.exception.PortalException {
626                    _expandoValue.setShortArray(data);
627            }
628    
629            @Override
630            public void setString(java.lang.String data)
631                    throws com.liferay.portal.kernel.exception.PortalException {
632                    _expandoValue.setString(data);
633            }
634    
635            @Override
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                    _expandoValue.setString(data, locale, defaultLocale);
640            }
641    
642            @Override
643            public void setStringArray(java.lang.String[] data)
644                    throws com.liferay.portal.kernel.exception.PortalException {
645                    _expandoValue.setStringArray(data);
646            }
647    
648            @Override
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                    _expandoValue.setStringArray(data, locale, defaultLocale);
653            }
654    
655            @Override
656            public void setStringArrayMap(
657                    Map<java.util.Locale, java.lang.String[]> dataMap,
658                    java.util.Locale defaultLocale)
659                    throws com.liferay.portal.kernel.exception.PortalException {
660                    _expandoValue.setStringArrayMap(dataMap, defaultLocale);
661            }
662    
663            @Override
664            public void setStringMap(Map<java.util.Locale, java.lang.String> dataMap,
665                    java.util.Locale defaultLocale)
666                    throws com.liferay.portal.kernel.exception.PortalException {
667                    _expandoValue.setStringMap(dataMap, defaultLocale);
668            }
669    
670            /**
671            * Sets the table ID of this expando value.
672            *
673            * @param tableId the table ID of this expando value
674            */
675            @Override
676            public void setTableId(long tableId) {
677                    _expandoValue.setTableId(tableId);
678            }
679    
680            /**
681            * Sets the value ID of this expando value.
682            *
683            * @param valueId the value ID of this expando value
684            */
685            @Override
686            public void setValueId(long valueId) {
687                    _expandoValue.setValueId(valueId);
688            }
689    
690            @Override
691            public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoValue> toCacheModel() {
692                    return _expandoValue.toCacheModel();
693            }
694    
695            @Override
696            public com.liferay.portlet.expando.model.ExpandoValue toEscapedModel() {
697                    return new ExpandoValueWrapper(_expandoValue.toEscapedModel());
698            }
699    
700            @Override
701            public java.lang.String toString() {
702                    return _expandoValue.toString();
703            }
704    
705            @Override
706            public com.liferay.portlet.expando.model.ExpandoValue toUnescapedModel() {
707                    return new ExpandoValueWrapper(_expandoValue.toUnescapedModel());
708            }
709    
710            @Override
711            public java.lang.String toXmlString() {
712                    return _expandoValue.toXmlString();
713            }
714    
715            @Override
716            public boolean equals(Object obj) {
717                    if (this == obj) {
718                            return true;
719                    }
720    
721                    if (!(obj instanceof ExpandoValueWrapper)) {
722                            return false;
723                    }
724    
725                    ExpandoValueWrapper expandoValueWrapper = (ExpandoValueWrapper)obj;
726    
727                    if (Validator.equals(_expandoValue, expandoValueWrapper._expandoValue)) {
728                            return true;
729                    }
730    
731                    return false;
732            }
733    
734            @Override
735            public ExpandoValue getWrappedModel() {
736                    return _expandoValue;
737            }
738    
739            @Override
740            public boolean isEntityCacheEnabled() {
741                    return _expandoValue.isEntityCacheEnabled();
742            }
743    
744            @Override
745            public boolean isFinderCacheEnabled() {
746                    return _expandoValue.isFinderCacheEnabled();
747            }
748    
749            @Override
750            public void resetOriginalValues() {
751                    _expandoValue.resetOriginalValues();
752            }
753    
754            private final ExpandoValue _expandoValue;
755    }