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