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 ExpandoColumn}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       ExpandoColumn
029     * @generated
030     */
031    public class ExpandoColumnWrapper implements ExpandoColumn,
032            ModelWrapper<ExpandoColumn> {
033            public ExpandoColumnWrapper(ExpandoColumn expandoColumn) {
034                    _expandoColumn = expandoColumn;
035            }
036    
037            public Class<?> getModelClass() {
038                    return ExpandoColumn.class;
039            }
040    
041            public String getModelClassName() {
042                    return ExpandoColumn.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("columnId", getColumnId());
049                    attributes.put("companyId", getCompanyId());
050                    attributes.put("tableId", getTableId());
051                    attributes.put("name", getName());
052                    attributes.put("type", getType());
053                    attributes.put("defaultData", getDefaultData());
054                    attributes.put("typeSettings", getTypeSettings());
055    
056                    return attributes;
057            }
058    
059            public void setModelAttributes(Map<String, Object> attributes) {
060                    Long columnId = (Long)attributes.get("columnId");
061    
062                    if (columnId != null) {
063                            setColumnId(columnId);
064                    }
065    
066                    Long companyId = (Long)attributes.get("companyId");
067    
068                    if (companyId != null) {
069                            setCompanyId(companyId);
070                    }
071    
072                    Long tableId = (Long)attributes.get("tableId");
073    
074                    if (tableId != null) {
075                            setTableId(tableId);
076                    }
077    
078                    String name = (String)attributes.get("name");
079    
080                    if (name != null) {
081                            setName(name);
082                    }
083    
084                    Integer type = (Integer)attributes.get("type");
085    
086                    if (type != null) {
087                            setType(type);
088                    }
089    
090                    String defaultData = (String)attributes.get("defaultData");
091    
092                    if (defaultData != null) {
093                            setDefaultData(defaultData);
094                    }
095    
096                    String typeSettings = (String)attributes.get("typeSettings");
097    
098                    if (typeSettings != null) {
099                            setTypeSettings(typeSettings);
100                    }
101            }
102    
103            /**
104            * Returns the primary key of this expando column.
105            *
106            * @return the primary key of this expando column
107            */
108            public long getPrimaryKey() {
109                    return _expandoColumn.getPrimaryKey();
110            }
111    
112            /**
113            * Sets the primary key of this expando column.
114            *
115            * @param primaryKey the primary key of this expando column
116            */
117            public void setPrimaryKey(long primaryKey) {
118                    _expandoColumn.setPrimaryKey(primaryKey);
119            }
120    
121            /**
122            * Returns the column ID of this expando column.
123            *
124            * @return the column ID of this expando column
125            */
126            public long getColumnId() {
127                    return _expandoColumn.getColumnId();
128            }
129    
130            /**
131            * Sets the column ID of this expando column.
132            *
133            * @param columnId the column ID of this expando column
134            */
135            public void setColumnId(long columnId) {
136                    _expandoColumn.setColumnId(columnId);
137            }
138    
139            /**
140            * Returns the company ID of this expando column.
141            *
142            * @return the company ID of this expando column
143            */
144            public long getCompanyId() {
145                    return _expandoColumn.getCompanyId();
146            }
147    
148            /**
149            * Sets the company ID of this expando column.
150            *
151            * @param companyId the company ID of this expando column
152            */
153            public void setCompanyId(long companyId) {
154                    _expandoColumn.setCompanyId(companyId);
155            }
156    
157            /**
158            * Returns the table ID of this expando column.
159            *
160            * @return the table ID of this expando column
161            */
162            public long getTableId() {
163                    return _expandoColumn.getTableId();
164            }
165    
166            /**
167            * Sets the table ID of this expando column.
168            *
169            * @param tableId the table ID of this expando column
170            */
171            public void setTableId(long tableId) {
172                    _expandoColumn.setTableId(tableId);
173            }
174    
175            /**
176            * Returns the name of this expando column.
177            *
178            * @return the name of this expando column
179            */
180            public java.lang.String getName() {
181                    return _expandoColumn.getName();
182            }
183    
184            /**
185            * Sets the name of this expando column.
186            *
187            * @param name the name of this expando column
188            */
189            public void setName(java.lang.String name) {
190                    _expandoColumn.setName(name);
191            }
192    
193            /**
194            * Returns the type of this expando column.
195            *
196            * @return the type of this expando column
197            */
198            public int getType() {
199                    return _expandoColumn.getType();
200            }
201    
202            /**
203            * Sets the type of this expando column.
204            *
205            * @param type the type of this expando column
206            */
207            public void setType(int type) {
208                    _expandoColumn.setType(type);
209            }
210    
211            /**
212            * Returns the default data of this expando column.
213            *
214            * @return the default data of this expando column
215            */
216            public java.lang.String getDefaultData() {
217                    return _expandoColumn.getDefaultData();
218            }
219    
220            /**
221            * Sets the default data of this expando column.
222            *
223            * @param defaultData the default data of this expando column
224            */
225            public void setDefaultData(java.lang.String defaultData) {
226                    _expandoColumn.setDefaultData(defaultData);
227            }
228    
229            /**
230            * Returns the type settings of this expando column.
231            *
232            * @return the type settings of this expando column
233            */
234            public java.lang.String getTypeSettings() {
235                    return _expandoColumn.getTypeSettings();
236            }
237    
238            /**
239            * Sets the type settings of this expando column.
240            *
241            * @param typeSettings the type settings of this expando column
242            */
243            public void setTypeSettings(java.lang.String typeSettings) {
244                    _expandoColumn.setTypeSettings(typeSettings);
245            }
246    
247            public boolean isNew() {
248                    return _expandoColumn.isNew();
249            }
250    
251            public void setNew(boolean n) {
252                    _expandoColumn.setNew(n);
253            }
254    
255            public boolean isCachedModel() {
256                    return _expandoColumn.isCachedModel();
257            }
258    
259            public void setCachedModel(boolean cachedModel) {
260                    _expandoColumn.setCachedModel(cachedModel);
261            }
262    
263            public boolean isEscapedModel() {
264                    return _expandoColumn.isEscapedModel();
265            }
266    
267            public java.io.Serializable getPrimaryKeyObj() {
268                    return _expandoColumn.getPrimaryKeyObj();
269            }
270    
271            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
272                    _expandoColumn.setPrimaryKeyObj(primaryKeyObj);
273            }
274    
275            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
276                    return _expandoColumn.getExpandoBridge();
277            }
278    
279            public void setExpandoBridgeAttributes(
280                    com.liferay.portal.service.ServiceContext serviceContext) {
281                    _expandoColumn.setExpandoBridgeAttributes(serviceContext);
282            }
283    
284            @Override
285            public java.lang.Object clone() {
286                    return new ExpandoColumnWrapper((ExpandoColumn)_expandoColumn.clone());
287            }
288    
289            public int compareTo(
290                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn) {
291                    return _expandoColumn.compareTo(expandoColumn);
292            }
293    
294            @Override
295            public int hashCode() {
296                    return _expandoColumn.hashCode();
297            }
298    
299            public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoColumn> toCacheModel() {
300                    return _expandoColumn.toCacheModel();
301            }
302    
303            public com.liferay.portlet.expando.model.ExpandoColumn toEscapedModel() {
304                    return new ExpandoColumnWrapper(_expandoColumn.toEscapedModel());
305            }
306    
307            public com.liferay.portlet.expando.model.ExpandoColumn toUnescapedModel() {
308                    return new ExpandoColumnWrapper(_expandoColumn.toUnescapedModel());
309            }
310    
311            @Override
312            public java.lang.String toString() {
313                    return _expandoColumn.toString();
314            }
315    
316            public java.lang.String toXmlString() {
317                    return _expandoColumn.toXmlString();
318            }
319    
320            public void persist()
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    _expandoColumn.persist();
323            }
324    
325            public java.io.Serializable getDefaultValue() {
326                    return _expandoColumn.getDefaultValue();
327            }
328    
329            public java.lang.String getDisplayName(java.util.Locale locale) {
330                    return _expandoColumn.getDisplayName(locale);
331            }
332    
333            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
334                    return _expandoColumn.getTypeSettingsProperties();
335            }
336    
337            public void setTypeSettingsProperties(
338                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
339                    _expandoColumn.setTypeSettingsProperties(typeSettingsProperties);
340            }
341    
342            /**
343             * @deprecated Renamed to {@link #getWrappedModel}
344             */
345            public ExpandoColumn getWrappedExpandoColumn() {
346                    return _expandoColumn;
347            }
348    
349            public ExpandoColumn getWrappedModel() {
350                    return _expandoColumn;
351            }
352    
353            public void resetOriginalValues() {
354                    _expandoColumn.resetOriginalValues();
355            }
356    
357            private ExpandoColumn _expandoColumn;
358    }