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