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    import com.liferay.portal.kernel.util.Validator;
024    
025    import java.io.Serializable;
026    
027    import java.util.Date;
028    import java.util.HashMap;
029    import java.util.Map;
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 java.lang.Object clone() {
134                    return new AssetCategoryPropertyWrapper((AssetCategoryProperty)_assetCategoryProperty.clone());
135            }
136    
137            @Override
138            public int compareTo(
139                    com.liferay.asset.kernel.model.AssetCategoryProperty assetCategoryProperty) {
140                    return _assetCategoryProperty.compareTo(assetCategoryProperty);
141            }
142    
143            /**
144            * Returns the category ID of this asset category property.
145            *
146            * @return the category ID of this asset category property
147            */
148            @Override
149            public long getCategoryId() {
150                    return _assetCategoryProperty.getCategoryId();
151            }
152    
153            /**
154            * Returns the category property ID of this asset category property.
155            *
156            * @return the category property ID of this asset category property
157            */
158            @Override
159            public long getCategoryPropertyId() {
160                    return _assetCategoryProperty.getCategoryPropertyId();
161            }
162    
163            /**
164            * Returns the company ID of this asset category property.
165            *
166            * @return the company ID of this asset category property
167            */
168            @Override
169            public long getCompanyId() {
170                    return _assetCategoryProperty.getCompanyId();
171            }
172    
173            /**
174            * Returns the create date of this asset category property.
175            *
176            * @return the create date of this asset category property
177            */
178            @Override
179            public Date getCreateDate() {
180                    return _assetCategoryProperty.getCreateDate();
181            }
182    
183            @Override
184            public ExpandoBridge getExpandoBridge() {
185                    return _assetCategoryProperty.getExpandoBridge();
186            }
187    
188            /**
189            * Returns the key of this asset category property.
190            *
191            * @return the key of this asset category property
192            */
193            @Override
194            public java.lang.String getKey() {
195                    return _assetCategoryProperty.getKey();
196            }
197    
198            /**
199            * Returns the modified date of this asset category property.
200            *
201            * @return the modified date of this asset category property
202            */
203            @Override
204            public Date getModifiedDate() {
205                    return _assetCategoryProperty.getModifiedDate();
206            }
207    
208            /**
209            * Returns the primary key of this asset category property.
210            *
211            * @return the primary key of this asset category property
212            */
213            @Override
214            public long getPrimaryKey() {
215                    return _assetCategoryProperty.getPrimaryKey();
216            }
217    
218            @Override
219            public Serializable getPrimaryKeyObj() {
220                    return _assetCategoryProperty.getPrimaryKeyObj();
221            }
222    
223            /**
224            * Returns the user ID of this asset category property.
225            *
226            * @return the user ID of this asset category property
227            */
228            @Override
229            public long getUserId() {
230                    return _assetCategoryProperty.getUserId();
231            }
232    
233            /**
234            * Returns the user name of this asset category property.
235            *
236            * @return the user name of this asset category property
237            */
238            @Override
239            public java.lang.String getUserName() {
240                    return _assetCategoryProperty.getUserName();
241            }
242    
243            /**
244            * Returns the user uuid of this asset category property.
245            *
246            * @return the user uuid of this asset category property
247            */
248            @Override
249            public java.lang.String getUserUuid() {
250                    return _assetCategoryProperty.getUserUuid();
251            }
252    
253            /**
254            * Returns the value of this asset category property.
255            *
256            * @return the value of this asset category property
257            */
258            @Override
259            public java.lang.String getValue() {
260                    return _assetCategoryProperty.getValue();
261            }
262    
263            @Override
264            public int hashCode() {
265                    return _assetCategoryProperty.hashCode();
266            }
267    
268            @Override
269            public boolean isCachedModel() {
270                    return _assetCategoryProperty.isCachedModel();
271            }
272    
273            @Override
274            public boolean isEscapedModel() {
275                    return _assetCategoryProperty.isEscapedModel();
276            }
277    
278            @Override
279            public boolean isNew() {
280                    return _assetCategoryProperty.isNew();
281            }
282    
283            @Override
284            public void persist() {
285                    _assetCategoryProperty.persist();
286            }
287    
288            @Override
289            public void setCachedModel(boolean cachedModel) {
290                    _assetCategoryProperty.setCachedModel(cachedModel);
291            }
292    
293            /**
294            * Sets the category ID of this asset category property.
295            *
296            * @param categoryId the category ID of this asset category property
297            */
298            @Override
299            public void setCategoryId(long categoryId) {
300                    _assetCategoryProperty.setCategoryId(categoryId);
301            }
302    
303            /**
304            * Sets the category property ID of this asset category property.
305            *
306            * @param categoryPropertyId the category property ID of this asset category property
307            */
308            @Override
309            public void setCategoryPropertyId(long categoryPropertyId) {
310                    _assetCategoryProperty.setCategoryPropertyId(categoryPropertyId);
311            }
312    
313            /**
314            * Sets the company ID of this asset category property.
315            *
316            * @param companyId the company ID of this asset category property
317            */
318            @Override
319            public void setCompanyId(long companyId) {
320                    _assetCategoryProperty.setCompanyId(companyId);
321            }
322    
323            /**
324            * Sets the create date of this asset category property.
325            *
326            * @param createDate the create date of this asset category property
327            */
328            @Override
329            public void setCreateDate(Date createDate) {
330                    _assetCategoryProperty.setCreateDate(createDate);
331            }
332    
333            @Override
334            public void setExpandoBridgeAttributes(
335                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
336                    _assetCategoryProperty.setExpandoBridgeAttributes(baseModel);
337            }
338    
339            @Override
340            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
341                    _assetCategoryProperty.setExpandoBridgeAttributes(expandoBridge);
342            }
343    
344            @Override
345            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
346                    _assetCategoryProperty.setExpandoBridgeAttributes(serviceContext);
347            }
348    
349            /**
350            * Sets the key of this asset category property.
351            *
352            * @param key the key of this asset category property
353            */
354            @Override
355            public void setKey(java.lang.String key) {
356                    _assetCategoryProperty.setKey(key);
357            }
358    
359            /**
360            * Sets the modified date of this asset category property.
361            *
362            * @param modifiedDate the modified date of this asset category property
363            */
364            @Override
365            public void setModifiedDate(Date modifiedDate) {
366                    _assetCategoryProperty.setModifiedDate(modifiedDate);
367            }
368    
369            @Override
370            public void setNew(boolean n) {
371                    _assetCategoryProperty.setNew(n);
372            }
373    
374            /**
375            * Sets the primary key of this asset category property.
376            *
377            * @param primaryKey the primary key of this asset category property
378            */
379            @Override
380            public void setPrimaryKey(long primaryKey) {
381                    _assetCategoryProperty.setPrimaryKey(primaryKey);
382            }
383    
384            @Override
385            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
386                    _assetCategoryProperty.setPrimaryKeyObj(primaryKeyObj);
387            }
388    
389            /**
390            * Sets the user ID of this asset category property.
391            *
392            * @param userId the user ID of this asset category property
393            */
394            @Override
395            public void setUserId(long userId) {
396                    _assetCategoryProperty.setUserId(userId);
397            }
398    
399            /**
400            * Sets the user name of this asset category property.
401            *
402            * @param userName the user name of this asset category property
403            */
404            @Override
405            public void setUserName(java.lang.String userName) {
406                    _assetCategoryProperty.setUserName(userName);
407            }
408    
409            /**
410            * Sets the user uuid of this asset category property.
411            *
412            * @param userUuid the user uuid of this asset category property
413            */
414            @Override
415            public void setUserUuid(java.lang.String userUuid) {
416                    _assetCategoryProperty.setUserUuid(userUuid);
417            }
418    
419            /**
420            * Sets the value of this asset category property.
421            *
422            * @param value the value of this asset category property
423            */
424            @Override
425            public void setValue(java.lang.String value) {
426                    _assetCategoryProperty.setValue(value);
427            }
428    
429            @Override
430            public com.liferay.portal.kernel.model.CacheModel<com.liferay.asset.kernel.model.AssetCategoryProperty> toCacheModel() {
431                    return _assetCategoryProperty.toCacheModel();
432            }
433    
434            @Override
435            public com.liferay.asset.kernel.model.AssetCategoryProperty toEscapedModel() {
436                    return new AssetCategoryPropertyWrapper(_assetCategoryProperty.toEscapedModel());
437            }
438    
439            @Override
440            public java.lang.String toString() {
441                    return _assetCategoryProperty.toString();
442            }
443    
444            @Override
445            public com.liferay.asset.kernel.model.AssetCategoryProperty toUnescapedModel() {
446                    return new AssetCategoryPropertyWrapper(_assetCategoryProperty.toUnescapedModel());
447            }
448    
449            @Override
450            public java.lang.String toXmlString() {
451                    return _assetCategoryProperty.toXmlString();
452            }
453    
454            @Override
455            public boolean equals(Object obj) {
456                    if (this == obj) {
457                            return true;
458                    }
459    
460                    if (!(obj instanceof AssetCategoryPropertyWrapper)) {
461                            return false;
462                    }
463    
464                    AssetCategoryPropertyWrapper assetCategoryPropertyWrapper = (AssetCategoryPropertyWrapper)obj;
465    
466                    if (Validator.equals(_assetCategoryProperty,
467                                            assetCategoryPropertyWrapper._assetCategoryProperty)) {
468                            return true;
469                    }
470    
471                    return false;
472            }
473    
474            @Override
475            public AssetCategoryProperty getWrappedModel() {
476                    return _assetCategoryProperty;
477            }
478    
479            @Override
480            public boolean isEntityCacheEnabled() {
481                    return _assetCategoryProperty.isEntityCacheEnabled();
482            }
483    
484            @Override
485            public boolean isFinderCacheEnabled() {
486                    return _assetCategoryProperty.isFinderCacheEnabled();
487            }
488    
489            @Override
490            public void resetOriginalValues() {
491                    _assetCategoryProperty.resetOriginalValues();
492            }
493    
494            private final AssetCategoryProperty _assetCategoryProperty;
495    }