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