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