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