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