001    /**
002     * Copyright (c) 2000-2013 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.asset.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    import com.liferay.portal.model.ModelWrapper;
019    
020    import java.util.Date;
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link AssetCategoryProperty}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       AssetCategoryProperty
031     * @generated
032     */
033    public class AssetCategoryPropertyWrapper implements AssetCategoryProperty,
034            ModelWrapper<AssetCategoryProperty> {
035            public AssetCategoryPropertyWrapper(
036                    AssetCategoryProperty assetCategoryProperty) {
037                    _assetCategoryProperty = assetCategoryProperty;
038            }
039    
040            public Class<?> getModelClass() {
041                    return AssetCategoryProperty.class;
042            }
043    
044            public String getModelClassName() {
045                    return AssetCategoryProperty.class.getName();
046            }
047    
048            public Map<String, Object> getModelAttributes() {
049                    Map<String, Object> attributes = new HashMap<String, Object>();
050    
051                    attributes.put("categoryPropertyId", getCategoryPropertyId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("userName", getUserName());
055                    attributes.put("createDate", getCreateDate());
056                    attributes.put("modifiedDate", getModifiedDate());
057                    attributes.put("categoryId", getCategoryId());
058                    attributes.put("key", getKey());
059                    attributes.put("value", getValue());
060    
061                    return attributes;
062            }
063    
064            public void setModelAttributes(Map<String, Object> attributes) {
065                    Long categoryPropertyId = (Long)attributes.get("categoryPropertyId");
066    
067                    if (categoryPropertyId != null) {
068                            setCategoryPropertyId(categoryPropertyId);
069                    }
070    
071                    Long companyId = (Long)attributes.get("companyId");
072    
073                    if (companyId != null) {
074                            setCompanyId(companyId);
075                    }
076    
077                    Long userId = (Long)attributes.get("userId");
078    
079                    if (userId != null) {
080                            setUserId(userId);
081                    }
082    
083                    String userName = (String)attributes.get("userName");
084    
085                    if (userName != null) {
086                            setUserName(userName);
087                    }
088    
089                    Date createDate = (Date)attributes.get("createDate");
090    
091                    if (createDate != null) {
092                            setCreateDate(createDate);
093                    }
094    
095                    Date modifiedDate = (Date)attributes.get("modifiedDate");
096    
097                    if (modifiedDate != null) {
098                            setModifiedDate(modifiedDate);
099                    }
100    
101                    Long categoryId = (Long)attributes.get("categoryId");
102    
103                    if (categoryId != null) {
104                            setCategoryId(categoryId);
105                    }
106    
107                    String key = (String)attributes.get("key");
108    
109                    if (key != null) {
110                            setKey(key);
111                    }
112    
113                    String value = (String)attributes.get("value");
114    
115                    if (value != null) {
116                            setValue(value);
117                    }
118            }
119    
120            /**
121            * Returns the primary key of this asset category property.
122            *
123            * @return the primary key of this asset category property
124            */
125            public long getPrimaryKey() {
126                    return _assetCategoryProperty.getPrimaryKey();
127            }
128    
129            /**
130            * Sets the primary key of this asset category property.
131            *
132            * @param primaryKey the primary key of this asset category property
133            */
134            public void setPrimaryKey(long primaryKey) {
135                    _assetCategoryProperty.setPrimaryKey(primaryKey);
136            }
137    
138            /**
139            * Returns the category property ID of this asset category property.
140            *
141            * @return the category property ID of this asset category property
142            */
143            public long getCategoryPropertyId() {
144                    return _assetCategoryProperty.getCategoryPropertyId();
145            }
146    
147            /**
148            * Sets the category property ID of this asset category property.
149            *
150            * @param categoryPropertyId the category property ID of this asset category property
151            */
152            public void setCategoryPropertyId(long categoryPropertyId) {
153                    _assetCategoryProperty.setCategoryPropertyId(categoryPropertyId);
154            }
155    
156            /**
157            * Returns the company ID of this asset category property.
158            *
159            * @return the company ID of this asset category property
160            */
161            public long getCompanyId() {
162                    return _assetCategoryProperty.getCompanyId();
163            }
164    
165            /**
166            * Sets the company ID of this asset category property.
167            *
168            * @param companyId the company ID of this asset category property
169            */
170            public void setCompanyId(long companyId) {
171                    _assetCategoryProperty.setCompanyId(companyId);
172            }
173    
174            /**
175            * Returns the user ID of this asset category property.
176            *
177            * @return the user ID of this asset category property
178            */
179            public long getUserId() {
180                    return _assetCategoryProperty.getUserId();
181            }
182    
183            /**
184            * Sets the user ID of this asset category property.
185            *
186            * @param userId the user ID of this asset category property
187            */
188            public void setUserId(long userId) {
189                    _assetCategoryProperty.setUserId(userId);
190            }
191    
192            /**
193            * Returns the user uuid of this asset category property.
194            *
195            * @return the user uuid of this asset category property
196            * @throws SystemException if a system exception occurred
197            */
198            public java.lang.String getUserUuid()
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return _assetCategoryProperty.getUserUuid();
201            }
202    
203            /**
204            * Sets the user uuid of this asset category property.
205            *
206            * @param userUuid the user uuid of this asset category property
207            */
208            public void setUserUuid(java.lang.String userUuid) {
209                    _assetCategoryProperty.setUserUuid(userUuid);
210            }
211    
212            /**
213            * Returns the user name of this asset category property.
214            *
215            * @return the user name of this asset category property
216            */
217            public java.lang.String getUserName() {
218                    return _assetCategoryProperty.getUserName();
219            }
220    
221            /**
222            * Sets the user name of this asset category property.
223            *
224            * @param userName the user name of this asset category property
225            */
226            public void setUserName(java.lang.String userName) {
227                    _assetCategoryProperty.setUserName(userName);
228            }
229    
230            /**
231            * Returns the create date of this asset category property.
232            *
233            * @return the create date of this asset category property
234            */
235            public java.util.Date getCreateDate() {
236                    return _assetCategoryProperty.getCreateDate();
237            }
238    
239            /**
240            * Sets the create date of this asset category property.
241            *
242            * @param createDate the create date of this asset category property
243            */
244            public void setCreateDate(java.util.Date createDate) {
245                    _assetCategoryProperty.setCreateDate(createDate);
246            }
247    
248            /**
249            * Returns the modified date of this asset category property.
250            *
251            * @return the modified date of this asset category property
252            */
253            public java.util.Date getModifiedDate() {
254                    return _assetCategoryProperty.getModifiedDate();
255            }
256    
257            /**
258            * Sets the modified date of this asset category property.
259            *
260            * @param modifiedDate the modified date of this asset category property
261            */
262            public void setModifiedDate(java.util.Date modifiedDate) {
263                    _assetCategoryProperty.setModifiedDate(modifiedDate);
264            }
265    
266            /**
267            * Returns the category ID of this asset category property.
268            *
269            * @return the category ID of this asset category property
270            */
271            public long getCategoryId() {
272                    return _assetCategoryProperty.getCategoryId();
273            }
274    
275            /**
276            * Sets the category ID of this asset category property.
277            *
278            * @param categoryId the category ID of this asset category property
279            */
280            public void setCategoryId(long categoryId) {
281                    _assetCategoryProperty.setCategoryId(categoryId);
282            }
283    
284            /**
285            * Returns the key of this asset category property.
286            *
287            * @return the key of this asset category property
288            */
289            public java.lang.String getKey() {
290                    return _assetCategoryProperty.getKey();
291            }
292    
293            /**
294            * Sets the key of this asset category property.
295            *
296            * @param key the key of this asset category property
297            */
298            public void setKey(java.lang.String key) {
299                    _assetCategoryProperty.setKey(key);
300            }
301    
302            /**
303            * Returns the value of this asset category property.
304            *
305            * @return the value of this asset category property
306            */
307            public java.lang.String getValue() {
308                    return _assetCategoryProperty.getValue();
309            }
310    
311            /**
312            * Sets the value of this asset category property.
313            *
314            * @param value the value of this asset category property
315            */
316            public void setValue(java.lang.String value) {
317                    _assetCategoryProperty.setValue(value);
318            }
319    
320            public boolean isNew() {
321                    return _assetCategoryProperty.isNew();
322            }
323    
324            public void setNew(boolean n) {
325                    _assetCategoryProperty.setNew(n);
326            }
327    
328            public boolean isCachedModel() {
329                    return _assetCategoryProperty.isCachedModel();
330            }
331    
332            public void setCachedModel(boolean cachedModel) {
333                    _assetCategoryProperty.setCachedModel(cachedModel);
334            }
335    
336            public boolean isEscapedModel() {
337                    return _assetCategoryProperty.isEscapedModel();
338            }
339    
340            public java.io.Serializable getPrimaryKeyObj() {
341                    return _assetCategoryProperty.getPrimaryKeyObj();
342            }
343    
344            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
345                    _assetCategoryProperty.setPrimaryKeyObj(primaryKeyObj);
346            }
347    
348            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
349                    return _assetCategoryProperty.getExpandoBridge();
350            }
351    
352            public void setExpandoBridgeAttributes(
353                    com.liferay.portal.service.ServiceContext serviceContext) {
354                    _assetCategoryProperty.setExpandoBridgeAttributes(serviceContext);
355            }
356    
357            @Override
358            public java.lang.Object clone() {
359                    return new AssetCategoryPropertyWrapper((AssetCategoryProperty)_assetCategoryProperty.clone());
360            }
361    
362            public int compareTo(
363                    com.liferay.portlet.asset.model.AssetCategoryProperty assetCategoryProperty) {
364                    return _assetCategoryProperty.compareTo(assetCategoryProperty);
365            }
366    
367            @Override
368            public int hashCode() {
369                    return _assetCategoryProperty.hashCode();
370            }
371    
372            public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetCategoryProperty> toCacheModel() {
373                    return _assetCategoryProperty.toCacheModel();
374            }
375    
376            public com.liferay.portlet.asset.model.AssetCategoryProperty toEscapedModel() {
377                    return new AssetCategoryPropertyWrapper(_assetCategoryProperty.toEscapedModel());
378            }
379    
380            public com.liferay.portlet.asset.model.AssetCategoryProperty toUnescapedModel() {
381                    return new AssetCategoryPropertyWrapper(_assetCategoryProperty.toUnescapedModel());
382            }
383    
384            @Override
385            public java.lang.String toString() {
386                    return _assetCategoryProperty.toString();
387            }
388    
389            public java.lang.String toXmlString() {
390                    return _assetCategoryProperty.toXmlString();
391            }
392    
393            public void persist()
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    _assetCategoryProperty.persist();
396            }
397    
398            @Override
399            public boolean equals(Object obj) {
400                    if (this == obj) {
401                            return true;
402                    }
403    
404                    if (!(obj instanceof AssetCategoryPropertyWrapper)) {
405                            return false;
406                    }
407    
408                    AssetCategoryPropertyWrapper assetCategoryPropertyWrapper = (AssetCategoryPropertyWrapper)obj;
409    
410                    if (Validator.equals(_assetCategoryProperty,
411                                            assetCategoryPropertyWrapper._assetCategoryProperty)) {
412                            return true;
413                    }
414    
415                    return false;
416            }
417    
418            /**
419             * @deprecated Renamed to {@link #getWrappedModel}
420             */
421            public AssetCategoryProperty getWrappedAssetCategoryProperty() {
422                    return _assetCategoryProperty;
423            }
424    
425            public AssetCategoryProperty getWrappedModel() {
426                    return _assetCategoryProperty;
427            }
428    
429            public void resetOriginalValues() {
430                    _assetCategoryProperty.resetOriginalValues();
431            }
432    
433            private AssetCategoryProperty _assetCategoryProperty;
434    }