001
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
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
109 public long getPrimaryKey() {
110 return _webDAVProps.getPrimaryKey();
111 }
112
113
118 public void setPrimaryKey(long primaryKey) {
119 _webDAVProps.setPrimaryKey(primaryKey);
120 }
121
122
127 public long getWebDavPropsId() {
128 return _webDAVProps.getWebDavPropsId();
129 }
130
131
136 public void setWebDavPropsId(long webDavPropsId) {
137 _webDAVProps.setWebDavPropsId(webDavPropsId);
138 }
139
140
145 public long getCompanyId() {
146 return _webDAVProps.getCompanyId();
147 }
148
149
154 public void setCompanyId(long companyId) {
155 _webDAVProps.setCompanyId(companyId);
156 }
157
158
163 public java.util.Date getCreateDate() {
164 return _webDAVProps.getCreateDate();
165 }
166
167
172 public void setCreateDate(java.util.Date createDate) {
173 _webDAVProps.setCreateDate(createDate);
174 }
175
176
181 public java.util.Date getModifiedDate() {
182 return _webDAVProps.getModifiedDate();
183 }
184
185
190 public void setModifiedDate(java.util.Date modifiedDate) {
191 _webDAVProps.setModifiedDate(modifiedDate);
192 }
193
194
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
212 public long getClassNameId() {
213 return _webDAVProps.getClassNameId();
214 }
215
216
221 public void setClassNameId(long classNameId) {
222 _webDAVProps.setClassNameId(classNameId);
223 }
224
225
230 public long getClassPK() {
231 return _webDAVProps.getClassPK();
232 }
233
234
239 public void setClassPK(long classPK) {
240 _webDAVProps.setClassPK(classPK);
241 }
242
243
248 public java.lang.String getProps() {
249 return _webDAVProps.getProps();
250 }
251
252
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
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 }