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 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 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(Date createDate) {
341                    _webDAVProps.setCreateDate(createDate);
342            }
343    
344            @Override
345            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
346                    _webDAVProps.setExpandoBridgeAttributes(baseModel);
347            }
348    
349            @Override
350            public void setExpandoBridgeAttributes(
351                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
352                    _webDAVProps.setExpandoBridgeAttributes(expandoBridge);
353            }
354    
355            @Override
356            public void setExpandoBridgeAttributes(
357                    com.liferay.portal.service.ServiceContext serviceContext) {
358                    _webDAVProps.setExpandoBridgeAttributes(serviceContext);
359            }
360    
361            /**
362            * Sets the modified date of this web d a v props.
363            *
364            * @param modifiedDate the modified date of this web d a v props
365            */
366            @Override
367            public void setModifiedDate(Date modifiedDate) {
368                    _webDAVProps.setModifiedDate(modifiedDate);
369            }
370    
371            /**
372            * Sets the mvcc version of this web d a v props.
373            *
374            * @param mvccVersion the mvcc version of this web d a v props
375            */
376            @Override
377            public void setMvccVersion(long mvccVersion) {
378                    _webDAVProps.setMvccVersion(mvccVersion);
379            }
380    
381            @Override
382            public void setNew(boolean n) {
383                    _webDAVProps.setNew(n);
384            }
385    
386            /**
387            * Sets the primary key of this web d a v props.
388            *
389            * @param primaryKey the primary key of this web d a v props
390            */
391            @Override
392            public void setPrimaryKey(long primaryKey) {
393                    _webDAVProps.setPrimaryKey(primaryKey);
394            }
395    
396            @Override
397            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
398                    _webDAVProps.setPrimaryKeyObj(primaryKeyObj);
399            }
400    
401            /**
402            * Sets the props of this web d a v props.
403            *
404            * @param props the props of this web d a v props
405            */
406            @Override
407            public void setProps(java.lang.String props) {
408                    _webDAVProps.setProps(props);
409            }
410    
411            /**
412            * Sets the web dav props ID of this web d a v props.
413            *
414            * @param webDavPropsId the web dav props ID of this web d a v props
415            */
416            @Override
417            public void setWebDavPropsId(long webDavPropsId) {
418                    _webDAVProps.setWebDavPropsId(webDavPropsId);
419            }
420    
421            @Override
422            public void store() throws java.lang.Exception {
423                    _webDAVProps.store();
424            }
425    
426            @Override
427            public CacheModel<com.liferay.portal.model.WebDAVProps> toCacheModel() {
428                    return _webDAVProps.toCacheModel();
429            }
430    
431            @Override
432            public com.liferay.portal.model.WebDAVProps toEscapedModel() {
433                    return new WebDAVPropsWrapper(_webDAVProps.toEscapedModel());
434            }
435    
436            @Override
437            public java.lang.String toString() {
438                    return _webDAVProps.toString();
439            }
440    
441            @Override
442            public com.liferay.portal.model.WebDAVProps toUnescapedModel() {
443                    return new WebDAVPropsWrapper(_webDAVProps.toUnescapedModel());
444            }
445    
446            @Override
447            public java.lang.String toXmlString() {
448                    return _webDAVProps.toXmlString();
449            }
450    
451            @Override
452            public boolean equals(Object obj) {
453                    if (this == obj) {
454                            return true;
455                    }
456    
457                    if (!(obj instanceof WebDAVPropsWrapper)) {
458                            return false;
459                    }
460    
461                    WebDAVPropsWrapper webDAVPropsWrapper = (WebDAVPropsWrapper)obj;
462    
463                    if (Validator.equals(_webDAVProps, webDAVPropsWrapper._webDAVProps)) {
464                            return true;
465                    }
466    
467                    return false;
468            }
469    
470            @Override
471            public WebDAVProps getWrappedModel() {
472                    return _webDAVProps;
473            }
474    
475            @Override
476            public boolean isEntityCacheEnabled() {
477                    return _webDAVProps.isEntityCacheEnabled();
478            }
479    
480            @Override
481            public boolean isFinderCacheEnabled() {
482                    return _webDAVProps.isFinderCacheEnabled();
483            }
484    
485            @Override
486            public void resetOriginalValues() {
487                    _webDAVProps.resetOriginalValues();
488            }
489    
490            private final WebDAVProps _webDAVProps;
491    }