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