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