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