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    import com.liferay.portal.kernel.util.Validator;
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.expando.kernel.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.expando.kernel.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(com.liferay.expando.kernel.model.ExpandoColumn column) {
468                    _expandoValue.setColumn(column);
469            }
470    
471            /**
472            * Sets the column ID of this expando value.
473            *
474            * @param columnId the column ID of this expando value
475            */
476            @Override
477            public void setColumnId(long columnId) {
478                    _expandoValue.setColumnId(columnId);
479            }
480    
481            /**
482            * Sets the company ID of this expando value.
483            *
484            * @param companyId the company ID of this expando value
485            */
486            @Override
487            public void setCompanyId(long companyId) {
488                    _expandoValue.setCompanyId(companyId);
489            }
490    
491            /**
492            * Sets the data of this expando value.
493            *
494            * @param data the data of this expando value
495            */
496            @Override
497            public void setData(java.lang.String data) {
498                    _expandoValue.setData(data);
499            }
500    
501            @Override
502            public void setDate(Date data)
503                    throws com.liferay.portal.kernel.exception.PortalException {
504                    _expandoValue.setDate(data);
505            }
506    
507            @Override
508            public void setDateArray(Date[] data)
509                    throws com.liferay.portal.kernel.exception.PortalException {
510                    _expandoValue.setDateArray(data);
511            }
512    
513            @Override
514            public void setDouble(double data)
515                    throws com.liferay.portal.kernel.exception.PortalException {
516                    _expandoValue.setDouble(data);
517            }
518    
519            @Override
520            public void setDoubleArray(double[] data)
521                    throws com.liferay.portal.kernel.exception.PortalException {
522                    _expandoValue.setDoubleArray(data);
523            }
524    
525            @Override
526            public void setExpandoBridgeAttributes(
527                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
528                    _expandoValue.setExpandoBridgeAttributes(baseModel);
529            }
530    
531            @Override
532            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
533                    _expandoValue.setExpandoBridgeAttributes(expandoBridge);
534            }
535    
536            @Override
537            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
538                    _expandoValue.setExpandoBridgeAttributes(serviceContext);
539            }
540    
541            @Override
542            public void setFloat(float data)
543                    throws com.liferay.portal.kernel.exception.PortalException {
544                    _expandoValue.setFloat(data);
545            }
546    
547            @Override
548            public void setFloatArray(float[] data)
549                    throws com.liferay.portal.kernel.exception.PortalException {
550                    _expandoValue.setFloatArray(data);
551            }
552    
553            @Override
554            public void setInteger(int data)
555                    throws com.liferay.portal.kernel.exception.PortalException {
556                    _expandoValue.setInteger(data);
557            }
558    
559            @Override
560            public void setIntegerArray(int[] data)
561                    throws com.liferay.portal.kernel.exception.PortalException {
562                    _expandoValue.setIntegerArray(data);
563            }
564    
565            @Override
566            public void setLong(long data)
567                    throws com.liferay.portal.kernel.exception.PortalException {
568                    _expandoValue.setLong(data);
569            }
570    
571            @Override
572            public void setLongArray(long[] data)
573                    throws com.liferay.portal.kernel.exception.PortalException {
574                    _expandoValue.setLongArray(data);
575            }
576    
577            @Override
578            public void setNew(boolean n) {
579                    _expandoValue.setNew(n);
580            }
581    
582            @Override
583            public void setNumber(java.lang.Number data)
584                    throws com.liferay.portal.kernel.exception.PortalException {
585                    _expandoValue.setNumber(data);
586            }
587    
588            @Override
589            public void setNumberArray(java.lang.Number[] data)
590                    throws com.liferay.portal.kernel.exception.PortalException {
591                    _expandoValue.setNumberArray(data);
592            }
593    
594            /**
595            * Sets the primary key of this expando value.
596            *
597            * @param primaryKey the primary key of this expando value
598            */
599            @Override
600            public void setPrimaryKey(long primaryKey) {
601                    _expandoValue.setPrimaryKey(primaryKey);
602            }
603    
604            @Override
605            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
606                    _expandoValue.setPrimaryKeyObj(primaryKeyObj);
607            }
608    
609            /**
610            * Sets the row ID of this expando value.
611            *
612            * @param rowId the row ID of this expando value
613            */
614            @Override
615            public void setRowId(long rowId) {
616                    _expandoValue.setRowId(rowId);
617            }
618    
619            @Override
620            public void setShort(short data)
621                    throws com.liferay.portal.kernel.exception.PortalException {
622                    _expandoValue.setShort(data);
623            }
624    
625            @Override
626            public void setShortArray(short[] data)
627                    throws com.liferay.portal.kernel.exception.PortalException {
628                    _expandoValue.setShortArray(data);
629            }
630    
631            @Override
632            public void setString(java.lang.String data)
633                    throws com.liferay.portal.kernel.exception.PortalException {
634                    _expandoValue.setString(data);
635            }
636    
637            @Override
638            public void setString(java.lang.String data, java.util.Locale locale,
639                    java.util.Locale defaultLocale)
640                    throws com.liferay.portal.kernel.exception.PortalException {
641                    _expandoValue.setString(data, locale, defaultLocale);
642            }
643    
644            @Override
645            public void setStringArray(java.lang.String[] data)
646                    throws com.liferay.portal.kernel.exception.PortalException {
647                    _expandoValue.setStringArray(data);
648            }
649    
650            @Override
651            public void setStringArray(java.lang.String[] data,
652                    java.util.Locale locale, java.util.Locale defaultLocale)
653                    throws com.liferay.portal.kernel.exception.PortalException {
654                    _expandoValue.setStringArray(data, locale, defaultLocale);
655            }
656    
657            @Override
658            public void setStringArrayMap(
659                    Map<java.util.Locale, java.lang.String[]> dataMap,
660                    java.util.Locale defaultLocale)
661                    throws com.liferay.portal.kernel.exception.PortalException {
662                    _expandoValue.setStringArrayMap(dataMap, defaultLocale);
663            }
664    
665            @Override
666            public void setStringMap(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.kernel.model.CacheModel<com.liferay.expando.kernel.model.ExpandoValue> toCacheModel() {
694                    return _expandoValue.toCacheModel();
695            }
696    
697            @Override
698            public com.liferay.expando.kernel.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.expando.kernel.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            @Override
737            public ExpandoValue getWrappedModel() {
738                    return _expandoValue;
739            }
740    
741            @Override
742            public boolean isEntityCacheEnabled() {
743                    return _expandoValue.isEntityCacheEnabled();
744            }
745    
746            @Override
747            public boolean isFinderCacheEnabled() {
748                    return _expandoValue.isFinderCacheEnabled();
749            }
750    
751            @Override
752            public void resetOriginalValues() {
753                    _expandoValue.resetOriginalValues();
754            }
755    
756            private final ExpandoValue _expandoValue;
757    }