001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class DLFileEntryMetadataWrapper implements DLFileEntryMetadata,
036 ModelWrapper<DLFileEntryMetadata> {
037 public DLFileEntryMetadataWrapper(DLFileEntryMetadata dlFileEntryMetadata) {
038 _dlFileEntryMetadata = dlFileEntryMetadata;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return DLFileEntryMetadata.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return DLFileEntryMetadata.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("uuid", getUuid());
056 attributes.put("fileEntryMetadataId", getFileEntryMetadataId());
057 attributes.put("DDMStorageId", getDDMStorageId());
058 attributes.put("DDMStructureId", getDDMStructureId());
059 attributes.put("fileEntryTypeId", getFileEntryTypeId());
060 attributes.put("fileEntryId", getFileEntryId());
061 attributes.put("fileVersionId", getFileVersionId());
062
063 return attributes;
064 }
065
066 @Override
067 public void setModelAttributes(Map<String, Object> attributes) {
068 String uuid = (String)attributes.get("uuid");
069
070 if (uuid != null) {
071 setUuid(uuid);
072 }
073
074 Long fileEntryMetadataId = (Long)attributes.get("fileEntryMetadataId");
075
076 if (fileEntryMetadataId != null) {
077 setFileEntryMetadataId(fileEntryMetadataId);
078 }
079
080 Long DDMStorageId = (Long)attributes.get("DDMStorageId");
081
082 if (DDMStorageId != null) {
083 setDDMStorageId(DDMStorageId);
084 }
085
086 Long DDMStructureId = (Long)attributes.get("DDMStructureId");
087
088 if (DDMStructureId != null) {
089 setDDMStructureId(DDMStructureId);
090 }
091
092 Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
093
094 if (fileEntryTypeId != null) {
095 setFileEntryTypeId(fileEntryTypeId);
096 }
097
098 Long fileEntryId = (Long)attributes.get("fileEntryId");
099
100 if (fileEntryId != null) {
101 setFileEntryId(fileEntryId);
102 }
103
104 Long fileVersionId = (Long)attributes.get("fileVersionId");
105
106 if (fileVersionId != null) {
107 setFileVersionId(fileVersionId);
108 }
109 }
110
111
116 @Override
117 public long getPrimaryKey() {
118 return _dlFileEntryMetadata.getPrimaryKey();
119 }
120
121
126 @Override
127 public void setPrimaryKey(long primaryKey) {
128 _dlFileEntryMetadata.setPrimaryKey(primaryKey);
129 }
130
131
136 @Override
137 public java.lang.String getUuid() {
138 return _dlFileEntryMetadata.getUuid();
139 }
140
141
146 @Override
147 public void setUuid(java.lang.String uuid) {
148 _dlFileEntryMetadata.setUuid(uuid);
149 }
150
151
156 @Override
157 public long getFileEntryMetadataId() {
158 return _dlFileEntryMetadata.getFileEntryMetadataId();
159 }
160
161
166 @Override
167 public void setFileEntryMetadataId(long fileEntryMetadataId) {
168 _dlFileEntryMetadata.setFileEntryMetadataId(fileEntryMetadataId);
169 }
170
171
176 @Override
177 public long getDDMStorageId() {
178 return _dlFileEntryMetadata.getDDMStorageId();
179 }
180
181
186 @Override
187 public void setDDMStorageId(long DDMStorageId) {
188 _dlFileEntryMetadata.setDDMStorageId(DDMStorageId);
189 }
190
191
196 @Override
197 public long getDDMStructureId() {
198 return _dlFileEntryMetadata.getDDMStructureId();
199 }
200
201
206 @Override
207 public void setDDMStructureId(long DDMStructureId) {
208 _dlFileEntryMetadata.setDDMStructureId(DDMStructureId);
209 }
210
211
216 @Override
217 public long getFileEntryTypeId() {
218 return _dlFileEntryMetadata.getFileEntryTypeId();
219 }
220
221
226 @Override
227 public void setFileEntryTypeId(long fileEntryTypeId) {
228 _dlFileEntryMetadata.setFileEntryTypeId(fileEntryTypeId);
229 }
230
231
236 @Override
237 public long getFileEntryId() {
238 return _dlFileEntryMetadata.getFileEntryId();
239 }
240
241
246 @Override
247 public void setFileEntryId(long fileEntryId) {
248 _dlFileEntryMetadata.setFileEntryId(fileEntryId);
249 }
250
251
256 @Override
257 public long getFileVersionId() {
258 return _dlFileEntryMetadata.getFileVersionId();
259 }
260
261
266 @Override
267 public void setFileVersionId(long fileVersionId) {
268 _dlFileEntryMetadata.setFileVersionId(fileVersionId);
269 }
270
271 @Override
272 public boolean isNew() {
273 return _dlFileEntryMetadata.isNew();
274 }
275
276 @Override
277 public void setNew(boolean n) {
278 _dlFileEntryMetadata.setNew(n);
279 }
280
281 @Override
282 public boolean isCachedModel() {
283 return _dlFileEntryMetadata.isCachedModel();
284 }
285
286 @Override
287 public void setCachedModel(boolean cachedModel) {
288 _dlFileEntryMetadata.setCachedModel(cachedModel);
289 }
290
291 @Override
292 public boolean isEscapedModel() {
293 return _dlFileEntryMetadata.isEscapedModel();
294 }
295
296 @Override
297 public java.io.Serializable getPrimaryKeyObj() {
298 return _dlFileEntryMetadata.getPrimaryKeyObj();
299 }
300
301 @Override
302 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
303 _dlFileEntryMetadata.setPrimaryKeyObj(primaryKeyObj);
304 }
305
306 @Override
307 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
308 return _dlFileEntryMetadata.getExpandoBridge();
309 }
310
311 @Override
312 public void setExpandoBridgeAttributes(
313 com.liferay.portal.model.BaseModel<?> baseModel) {
314 _dlFileEntryMetadata.setExpandoBridgeAttributes(baseModel);
315 }
316
317 @Override
318 public void setExpandoBridgeAttributes(
319 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
320 _dlFileEntryMetadata.setExpandoBridgeAttributes(expandoBridge);
321 }
322
323 @Override
324 public void setExpandoBridgeAttributes(
325 com.liferay.portal.service.ServiceContext serviceContext) {
326 _dlFileEntryMetadata.setExpandoBridgeAttributes(serviceContext);
327 }
328
329 @Override
330 public java.lang.Object clone() {
331 return new DLFileEntryMetadataWrapper((DLFileEntryMetadata)_dlFileEntryMetadata.clone());
332 }
333
334 @Override
335 public int compareTo(
336 com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
337 return _dlFileEntryMetadata.compareTo(dlFileEntryMetadata);
338 }
339
340 @Override
341 public int hashCode() {
342 return _dlFileEntryMetadata.hashCode();
343 }
344
345 @Override
346 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> toCacheModel() {
347 return _dlFileEntryMetadata.toCacheModel();
348 }
349
350 @Override
351 public com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata toEscapedModel() {
352 return new DLFileEntryMetadataWrapper(_dlFileEntryMetadata.toEscapedModel());
353 }
354
355 @Override
356 public com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata toUnescapedModel() {
357 return new DLFileEntryMetadataWrapper(_dlFileEntryMetadata.toUnescapedModel());
358 }
359
360 @Override
361 public java.lang.String toString() {
362 return _dlFileEntryMetadata.toString();
363 }
364
365 @Override
366 public java.lang.String toXmlString() {
367 return _dlFileEntryMetadata.toXmlString();
368 }
369
370 @Override
371 public void persist()
372 throws com.liferay.portal.kernel.exception.SystemException {
373 _dlFileEntryMetadata.persist();
374 }
375
376 @Override
377 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getDDMStructure()
378 throws com.liferay.portal.kernel.exception.PortalException,
379 com.liferay.portal.kernel.exception.SystemException {
380 return _dlFileEntryMetadata.getDDMStructure();
381 }
382
383 @Override
384 public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType()
385 throws com.liferay.portal.kernel.exception.PortalException,
386 com.liferay.portal.kernel.exception.SystemException {
387 return _dlFileEntryMetadata.getFileEntryType();
388 }
389
390 @Override
391 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion()
392 throws com.liferay.portal.kernel.exception.PortalException,
393 com.liferay.portal.kernel.exception.SystemException {
394 return _dlFileEntryMetadata.getFileVersion();
395 }
396
397 @Override
398 public boolean equals(Object obj) {
399 if (this == obj) {
400 return true;
401 }
402
403 if (!(obj instanceof DLFileEntryMetadataWrapper)) {
404 return false;
405 }
406
407 DLFileEntryMetadataWrapper dlFileEntryMetadataWrapper = (DLFileEntryMetadataWrapper)obj;
408
409 if (Validator.equals(_dlFileEntryMetadata,
410 dlFileEntryMetadataWrapper._dlFileEntryMetadata)) {
411 return true;
412 }
413
414 return false;
415 }
416
417
420 public DLFileEntryMetadata getWrappedDLFileEntryMetadata() {
421 return _dlFileEntryMetadata;
422 }
423
424 @Override
425 public DLFileEntryMetadata getWrappedModel() {
426 return _dlFileEntryMetadata;
427 }
428
429 @Override
430 public void resetOriginalValues() {
431 _dlFileEntryMetadata.resetOriginalValues();
432 }
433
434 private DLFileEntryMetadata _dlFileEntryMetadata;
435 }