001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.sql.Blob;
020
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class DLContentWrapper implements DLContent, ModelWrapper<DLContent> {
034 public DLContentWrapper(DLContent dlContent) {
035 _dlContent = dlContent;
036 }
037
038 public Class<?> getModelClass() {
039 return DLContent.class;
040 }
041
042 public String getModelClassName() {
043 return DLContent.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("contentId", getContentId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("repositoryId", getRepositoryId());
053 attributes.put("path", getPath());
054 attributes.put("version", getVersion());
055 attributes.put("data", getData());
056 attributes.put("size", getSize());
057
058 return attributes;
059 }
060
061 public void setModelAttributes(Map<String, Object> attributes) {
062 Long contentId = (Long)attributes.get("contentId");
063
064 if (contentId != null) {
065 setContentId(contentId);
066 }
067
068 Long groupId = (Long)attributes.get("groupId");
069
070 if (groupId != null) {
071 setGroupId(groupId);
072 }
073
074 Long companyId = (Long)attributes.get("companyId");
075
076 if (companyId != null) {
077 setCompanyId(companyId);
078 }
079
080 Long repositoryId = (Long)attributes.get("repositoryId");
081
082 if (repositoryId != null) {
083 setRepositoryId(repositoryId);
084 }
085
086 String path = (String)attributes.get("path");
087
088 if (path != null) {
089 setPath(path);
090 }
091
092 String version = (String)attributes.get("version");
093
094 if (version != null) {
095 setVersion(version);
096 }
097
098 Blob data = (Blob)attributes.get("data");
099
100 if (data != null) {
101 setData(data);
102 }
103
104 Long size = (Long)attributes.get("size");
105
106 if (size != null) {
107 setSize(size);
108 }
109 }
110
111
116 public long getPrimaryKey() {
117 return _dlContent.getPrimaryKey();
118 }
119
120
125 public void setPrimaryKey(long primaryKey) {
126 _dlContent.setPrimaryKey(primaryKey);
127 }
128
129
134 public long getContentId() {
135 return _dlContent.getContentId();
136 }
137
138
143 public void setContentId(long contentId) {
144 _dlContent.setContentId(contentId);
145 }
146
147
152 public long getGroupId() {
153 return _dlContent.getGroupId();
154 }
155
156
161 public void setGroupId(long groupId) {
162 _dlContent.setGroupId(groupId);
163 }
164
165
170 public long getCompanyId() {
171 return _dlContent.getCompanyId();
172 }
173
174
179 public void setCompanyId(long companyId) {
180 _dlContent.setCompanyId(companyId);
181 }
182
183
188 public long getRepositoryId() {
189 return _dlContent.getRepositoryId();
190 }
191
192
197 public void setRepositoryId(long repositoryId) {
198 _dlContent.setRepositoryId(repositoryId);
199 }
200
201
206 public java.lang.String getPath() {
207 return _dlContent.getPath();
208 }
209
210
215 public void setPath(java.lang.String path) {
216 _dlContent.setPath(path);
217 }
218
219
224 public java.lang.String getVersion() {
225 return _dlContent.getVersion();
226 }
227
228
233 public void setVersion(java.lang.String version) {
234 _dlContent.setVersion(version);
235 }
236
237
242 public java.sql.Blob getData() {
243 return _dlContent.getData();
244 }
245
246
251 public void setData(java.sql.Blob data) {
252 _dlContent.setData(data);
253 }
254
255
260 public long getSize() {
261 return _dlContent.getSize();
262 }
263
264
269 public void setSize(long size) {
270 _dlContent.setSize(size);
271 }
272
273 public boolean isNew() {
274 return _dlContent.isNew();
275 }
276
277 public void setNew(boolean n) {
278 _dlContent.setNew(n);
279 }
280
281 public boolean isCachedModel() {
282 return _dlContent.isCachedModel();
283 }
284
285 public void setCachedModel(boolean cachedModel) {
286 _dlContent.setCachedModel(cachedModel);
287 }
288
289 public boolean isEscapedModel() {
290 return _dlContent.isEscapedModel();
291 }
292
293 public java.io.Serializable getPrimaryKeyObj() {
294 return _dlContent.getPrimaryKeyObj();
295 }
296
297 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
298 _dlContent.setPrimaryKeyObj(primaryKeyObj);
299 }
300
301 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
302 return _dlContent.getExpandoBridge();
303 }
304
305 public void setExpandoBridgeAttributes(
306 com.liferay.portal.model.BaseModel<?> baseModel) {
307 _dlContent.setExpandoBridgeAttributes(baseModel);
308 }
309
310 public void setExpandoBridgeAttributes(
311 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
312 _dlContent.setExpandoBridgeAttributes(expandoBridge);
313 }
314
315 public void setExpandoBridgeAttributes(
316 com.liferay.portal.service.ServiceContext serviceContext) {
317 _dlContent.setExpandoBridgeAttributes(serviceContext);
318 }
319
320 @Override
321 public java.lang.Object clone() {
322 return new DLContentWrapper((DLContent)_dlContent.clone());
323 }
324
325 public int compareTo(
326 com.liferay.portlet.documentlibrary.model.DLContent dlContent) {
327 return _dlContent.compareTo(dlContent);
328 }
329
330 @Override
331 public int hashCode() {
332 return _dlContent.hashCode();
333 }
334
335 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLContent> toCacheModel() {
336 return _dlContent.toCacheModel();
337 }
338
339 public com.liferay.portlet.documentlibrary.model.DLContent toEscapedModel() {
340 return new DLContentWrapper(_dlContent.toEscapedModel());
341 }
342
343 public com.liferay.portlet.documentlibrary.model.DLContent toUnescapedModel() {
344 return new DLContentWrapper(_dlContent.toUnescapedModel());
345 }
346
347 @Override
348 public java.lang.String toString() {
349 return _dlContent.toString();
350 }
351
352 public java.lang.String toXmlString() {
353 return _dlContent.toXmlString();
354 }
355
356 public void persist()
357 throws com.liferay.portal.kernel.exception.SystemException {
358 _dlContent.persist();
359 }
360
361
364 public DLContent getWrappedDLContent() {
365 return _dlContent;
366 }
367
368 public DLContent getWrappedModel() {
369 return _dlContent;
370 }
371
372 public void resetOriginalValues() {
373 _dlContent.resetOriginalValues();
374 }
375
376 private DLContent _dlContent;
377 }