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