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 com.liferay.portlet.expando.model.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 java.util.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 java.util.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(
530                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
531                    _expandoValue.setExpandoBridgeAttributes(expandoBridge);
532            }
533    
534            @Override
535            public void setExpandoBridgeAttributes(
536                    com.liferay.portal.service.ServiceContext serviceContext) {
537                    _expandoValue.setExpandoBridgeAttributes(serviceContext);
538            }
539    
540            @Override
541            public void setFloat(float data)
542                    throws com.liferay.portal.kernel.exception.PortalException {
543                    _expandoValue.setFloat(data);
544            }
545    
546            @Override
547            public void setFloatArray(float[] data)
548                    throws com.liferay.portal.kernel.exception.PortalException {
549                    _expandoValue.setFloatArray(data);
550            }
551    
552            @Override
553            public void setInteger(int data)
554                    throws com.liferay.portal.kernel.exception.PortalException {
555                    _expandoValue.setInteger(data);
556            }
557    
558            @Override
559            public void setIntegerArray(int[] data)
560                    throws com.liferay.portal.kernel.exception.PortalException {
561                    _expandoValue.setIntegerArray(data);
562            }
563    
564            @Override
565            public void setLong(long data)
566                    throws com.liferay.portal.kernel.exception.PortalException {
567                    _expandoValue.setLong(data);
568            }
569    
570            @Override
571            public void setLongArray(long[] data)
572                    throws com.liferay.portal.kernel.exception.PortalException {
573                    _expandoValue.setLongArray(data);
574            }
575    
576            @Override
577            public void setNew(boolean n) {
578                    _expandoValue.setNew(n);
579            }
580    
581            @Override
582            public void setNumber(java.lang.Number data)
583                    throws com.liferay.portal.kernel.exception.PortalException {
584                    _expandoValue.setNumber(data);
585            }
586    
587            @Override
588            public void setNumberArray(java.lang.Number[] data)
589                    throws com.liferay.portal.kernel.exception.PortalException {
590                    _expandoValue.setNumberArray(data);
591            }
592    
593            /**
594            * Sets the primary key of this expando value.
595            *
596            * @param primaryKey the primary key of this expando value
597            */
598            @Override
599            public void setPrimaryKey(long primaryKey) {
600                    _expandoValue.setPrimaryKey(primaryKey);
601            }
602    
603            @Override
604            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
605                    _expandoValue.setPrimaryKeyObj(primaryKeyObj);
606            }
607    
608            /**
609            * Sets the row ID of this expando value.
610            *
611            * @param rowId the row ID of this expando value
612            */
613            @Override
614            public void setRowId(long rowId) {
615                    _expandoValue.setRowId(rowId);
616            }
617    
618            @Override
619            public void setShort(short data)
620                    throws com.liferay.portal.kernel.exception.PortalException {
621                    _expandoValue.setShort(data);
622            }
623    
624            @Override
625            public void setShortArray(short[] data)
626                    throws com.liferay.portal.kernel.exception.PortalException {
627                    _expandoValue.setShortArray(data);
628            }
629    
630            @Override
631            public void setString(java.lang.String data)
632                    throws com.liferay.portal.kernel.exception.PortalException {
633                    _expandoValue.setString(data);
634            }
635    
636            @Override
637            public void setString(java.lang.String data, java.util.Locale locale,
638                    java.util.Locale defaultLocale)
639                    throws com.liferay.portal.kernel.exception.PortalException {
640                    _expandoValue.setString(data, locale, defaultLocale);
641            }
642    
643            @Override
644            public void setStringArray(java.lang.String[] data)
645                    throws com.liferay.portal.kernel.exception.PortalException {
646                    _expandoValue.setStringArray(data);
647            }
648    
649            @Override
650            public void setStringArray(java.lang.String[] data,
651                    java.util.Locale locale, java.util.Locale defaultLocale)
652                    throws com.liferay.portal.kernel.exception.PortalException {
653                    _expandoValue.setStringArray(data, locale, defaultLocale);
654            }
655    
656            @Override
657            public void setStringArrayMap(
658                    java.util.Map<java.util.Locale, java.lang.String[]> dataMap,
659                    java.util.Locale defaultLocale)
660                    throws com.liferay.portal.kernel.exception.PortalException {
661                    _expandoValue.setStringArrayMap(dataMap, defaultLocale);
662            }
663    
664            @Override
665            public void setStringMap(
666                    java.util.Map<java.util.Locale, java.lang.String> dataMap,
667                    java.util.Locale defaultLocale)
668                    throws com.liferay.portal.kernel.exception.PortalException {
669                    _expandoValue.setStringMap(dataMap, defaultLocale);
670            }
671    
672            /**
673            * Sets the table ID of this expando value.
674            *
675            * @param tableId the table ID of this expando value
676            */
677            @Override
678            public void setTableId(long tableId) {
679                    _expandoValue.setTableId(tableId);
680            }
681    
682            /**
683            * Sets the value ID of this expando value.
684            *
685            * @param valueId the value ID of this expando value
686            */
687            @Override
688            public void setValueId(long valueId) {
689                    _expandoValue.setValueId(valueId);
690            }
691    
692            @Override
693            public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoValue> toCacheModel() {
694                    return _expandoValue.toCacheModel();
695            }
696    
697            @Override
698            public com.liferay.portlet.expando.model.ExpandoValue toEscapedModel() {
699                    return new ExpandoValueWrapper(_expandoValue.toEscapedModel());
700            }
701    
702            @Override
703            public java.lang.String toString() {
704                    return _expandoValue.toString();
705            }
706    
707            @Override
708            public com.liferay.portlet.expando.model.ExpandoValue toUnescapedModel() {
709                    return new ExpandoValueWrapper(_expandoValue.toUnescapedModel());
710            }
711    
712            @Override
713            public java.lang.String toXmlString() {
714                    return _expandoValue.toXmlString();
715            }
716    
717            @Override
718            public boolean equals(Object obj) {
719                    if (this == obj) {
720                            return true;
721                    }
722    
723                    if (!(obj instanceof ExpandoValueWrapper)) {
724                            return false;
725                    }
726    
727                    ExpandoValueWrapper expandoValueWrapper = (ExpandoValueWrapper)obj;
728    
729                    if (Validator.equals(_expandoValue, expandoValueWrapper._expandoValue)) {
730                            return true;
731                    }
732    
733                    return false;
734            }
735    
736            /**
737             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
738             */
739            @Deprecated
740            public ExpandoValue getWrappedExpandoValue() {
741                    return _expandoValue;
742            }
743    
744            @Override
745            public ExpandoValue getWrappedModel() {
746                    return _expandoValue;
747            }
748    
749            @Override
750            public boolean isEntityCacheEnabled() {
751                    return _expandoValue.isEntityCacheEnabled();
752            }
753    
754            @Override
755            public boolean isFinderCacheEnabled() {
756                    return _expandoValue.isFinderCacheEnabled();
757            }
758    
759            @Override
760            public void resetOriginalValues() {
761                    _expandoValue.resetOriginalValues();
762            }
763    
764            private final ExpandoValue _expandoValue;
765    }