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