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