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