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.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.service.ServiceContext;
022    
023    import java.io.Serializable;
024    
025    import java.util.Date;
026    import java.util.HashMap;
027    import java.util.Map;
028    import java.util.Objects;
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 CacheModel<WebDAVProps> toCacheModel() {
125                    return _webDAVProps.toCacheModel();
126            }
127    
128            @Override
129            public WebDAVProps toEscapedModel() {
130                    return new WebDAVPropsWrapper(_webDAVProps.toEscapedModel());
131            }
132    
133            @Override
134            public WebDAVProps toUnescapedModel() {
135                    return new WebDAVPropsWrapper(_webDAVProps.toUnescapedModel());
136            }
137    
138            @Override
139            public boolean isCachedModel() {
140                    return _webDAVProps.isCachedModel();
141            }
142    
143            @Override
144            public boolean isEscapedModel() {
145                    return _webDAVProps.isEscapedModel();
146            }
147    
148            @Override
149            public boolean isNew() {
150                    return _webDAVProps.isNew();
151            }
152    
153            @Override
154            public ExpandoBridge getExpandoBridge() {
155                    return _webDAVProps.getExpandoBridge();
156            }
157    
158            @Override
159            public int compareTo(WebDAVProps webDAVProps) {
160                    return _webDAVProps.compareTo(webDAVProps);
161            }
162    
163            @Override
164            public int hashCode() {
165                    return _webDAVProps.hashCode();
166            }
167    
168            @Override
169            public Serializable getPrimaryKeyObj() {
170                    return _webDAVProps.getPrimaryKeyObj();
171            }
172    
173            @Override
174            public java.lang.Object clone() {
175                    return new WebDAVPropsWrapper((WebDAVProps)_webDAVProps.clone());
176            }
177    
178            /**
179            * Returns the fully qualified class name of this web d a v props.
180            *
181            * @return the fully qualified class name of this web d a v props
182            */
183            @Override
184            public java.lang.String getClassName() {
185                    return _webDAVProps.getClassName();
186            }
187    
188            /**
189            * Returns the props of this web d a v props.
190            *
191            * @return the props of this web d a v props
192            */
193            @Override
194            public java.lang.String getProps() {
195                    return _webDAVProps.getProps();
196            }
197    
198            @Override
199            public java.lang.String getText(java.lang.String name,
200                    java.lang.String prefix, java.lang.String uri)
201                    throws java.lang.Exception {
202                    return _webDAVProps.getText(name, prefix, uri);
203            }
204    
205            @Override
206            public java.lang.String toString() {
207                    return _webDAVProps.toString();
208            }
209    
210            @Override
211            public java.lang.String toXmlString() {
212                    return _webDAVProps.toXmlString();
213            }
214    
215            /**
216            * Returns the create date of this web d a v props.
217            *
218            * @return the create date of this web d a v props
219            */
220            @Override
221            public Date getCreateDate() {
222                    return _webDAVProps.getCreateDate();
223            }
224    
225            /**
226            * Returns the modified date of this web d a v props.
227            *
228            * @return the modified date of this web d a v props
229            */
230            @Override
231            public Date getModifiedDate() {
232                    return _webDAVProps.getModifiedDate();
233            }
234    
235            @Override
236            public java.util.Set<com.liferay.portal.kernel.xml.QName> getPropsSet()
237                    throws java.lang.Exception {
238                    return _webDAVProps.getPropsSet();
239            }
240    
241            /**
242            * Returns the class name ID of this web d a v props.
243            *
244            * @return the class name ID of this web d a v props
245            */
246            @Override
247            public long getClassNameId() {
248                    return _webDAVProps.getClassNameId();
249            }
250    
251            /**
252            * Returns the class p k of this web d a v props.
253            *
254            * @return the class p k of this web d a v props
255            */
256            @Override
257            public long getClassPK() {
258                    return _webDAVProps.getClassPK();
259            }
260    
261            /**
262            * Returns the company ID of this web d a v props.
263            *
264            * @return the company ID of this web d a v props
265            */
266            @Override
267            public long getCompanyId() {
268                    return _webDAVProps.getCompanyId();
269            }
270    
271            /**
272            * Returns the mvcc version of this web d a v props.
273            *
274            * @return the mvcc version of this web d a v props
275            */
276            @Override
277            public long getMvccVersion() {
278                    return _webDAVProps.getMvccVersion();
279            }
280    
281            /**
282            * Returns the primary key of this web d a v props.
283            *
284            * @return the primary key of this web d a v props
285            */
286            @Override
287            public long getPrimaryKey() {
288                    return _webDAVProps.getPrimaryKey();
289            }
290    
291            /**
292            * Returns the web dav props ID of this web d a v props.
293            *
294            * @return the web dav props ID of this web d a v props
295            */
296            @Override
297            public long getWebDavPropsId() {
298                    return _webDAVProps.getWebDavPropsId();
299            }
300    
301            @Override
302            public void addProp(java.lang.String name, java.lang.String prefix,
303                    java.lang.String uri) throws java.lang.Exception {
304                    _webDAVProps.addProp(name, prefix, uri);
305            }
306    
307            @Override
308            public void addProp(java.lang.String name, java.lang.String prefix,
309                    java.lang.String uri, java.lang.String text) throws java.lang.Exception {
310                    _webDAVProps.addProp(name, prefix, uri, text);
311            }
312    
313            @Override
314            public void persist() {
315                    _webDAVProps.persist();
316            }
317    
318            @Override
319            public void removeProp(java.lang.String name, java.lang.String prefix,
320                    java.lang.String uri) throws java.lang.Exception {
321                    _webDAVProps.removeProp(name, prefix, uri);
322            }
323    
324            @Override
325            public void setCachedModel(boolean cachedModel) {
326                    _webDAVProps.setCachedModel(cachedModel);
327            }
328    
329            @Override
330            public void setClassName(java.lang.String className) {
331                    _webDAVProps.setClassName(className);
332            }
333    
334            /**
335            * Sets the class name ID of this web d a v props.
336            *
337            * @param classNameId the class name ID of this web d a v props
338            */
339            @Override
340            public void setClassNameId(long classNameId) {
341                    _webDAVProps.setClassNameId(classNameId);
342            }
343    
344            /**
345            * Sets the class p k of this web d a v props.
346            *
347            * @param classPK the class p k of this web d a v props
348            */
349            @Override
350            public void setClassPK(long classPK) {
351                    _webDAVProps.setClassPK(classPK);
352            }
353    
354            /**
355            * Sets the company ID of this web d a v props.
356            *
357            * @param companyId the company ID of this web d a v props
358            */
359            @Override
360            public void setCompanyId(long companyId) {
361                    _webDAVProps.setCompanyId(companyId);
362            }
363    
364            /**
365            * Sets the create date of this web d a v props.
366            *
367            * @param createDate the create date of this web d a v props
368            */
369            @Override
370            public void setCreateDate(Date createDate) {
371                    _webDAVProps.setCreateDate(createDate);
372            }
373    
374            @Override
375            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
376                    _webDAVProps.setExpandoBridgeAttributes(baseModel);
377            }
378    
379            @Override
380            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
381                    _webDAVProps.setExpandoBridgeAttributes(expandoBridge);
382            }
383    
384            @Override
385            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
386                    _webDAVProps.setExpandoBridgeAttributes(serviceContext);
387            }
388    
389            /**
390            * Sets the modified date of this web d a v props.
391            *
392            * @param modifiedDate the modified date of this web d a v props
393            */
394            @Override
395            public void setModifiedDate(Date modifiedDate) {
396                    _webDAVProps.setModifiedDate(modifiedDate);
397            }
398    
399            /**
400            * Sets the mvcc version of this web d a v props.
401            *
402            * @param mvccVersion the mvcc version of this web d a v props
403            */
404            @Override
405            public void setMvccVersion(long mvccVersion) {
406                    _webDAVProps.setMvccVersion(mvccVersion);
407            }
408    
409            @Override
410            public void setNew(boolean n) {
411                    _webDAVProps.setNew(n);
412            }
413    
414            /**
415            * Sets the primary key of this web d a v props.
416            *
417            * @param primaryKey the primary key of this web d a v props
418            */
419            @Override
420            public void setPrimaryKey(long primaryKey) {
421                    _webDAVProps.setPrimaryKey(primaryKey);
422            }
423    
424            @Override
425            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
426                    _webDAVProps.setPrimaryKeyObj(primaryKeyObj);
427            }
428    
429            /**
430            * Sets the props of this web d a v props.
431            *
432            * @param props the props of this web d a v props
433            */
434            @Override
435            public void setProps(java.lang.String props) {
436                    _webDAVProps.setProps(props);
437            }
438    
439            /**
440            * Sets the web dav props ID of this web d a v props.
441            *
442            * @param webDavPropsId the web dav props ID of this web d a v props
443            */
444            @Override
445            public void setWebDavPropsId(long webDavPropsId) {
446                    _webDAVProps.setWebDavPropsId(webDavPropsId);
447            }
448    
449            @Override
450            public void store() throws java.lang.Exception {
451                    _webDAVProps.store();
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 (Objects.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    }