001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class DLFileEntryMetadataWrapper implements DLFileEntryMetadata,
033 ModelWrapper<DLFileEntryMetadata> {
034 public DLFileEntryMetadataWrapper(DLFileEntryMetadata dlFileEntryMetadata) {
035 _dlFileEntryMetadata = dlFileEntryMetadata;
036 }
037
038 public Class<?> getModelClass() {
039 return DLFileEntryMetadata.class;
040 }
041
042 public String getModelClassName() {
043 return DLFileEntryMetadata.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("fileEntryMetadataId", getFileEntryMetadataId());
051 attributes.put("DDMStorageId", getDDMStorageId());
052 attributes.put("DDMStructureId", getDDMStructureId());
053 attributes.put("fileEntryTypeId", getFileEntryTypeId());
054 attributes.put("fileEntryId", getFileEntryId());
055 attributes.put("fileVersionId", getFileVersionId());
056
057 return attributes;
058 }
059
060 public void setModelAttributes(Map<String, Object> attributes) {
061 String uuid = (String)attributes.get("uuid");
062
063 if (uuid != null) {
064 setUuid(uuid);
065 }
066
067 Long fileEntryMetadataId = (Long)attributes.get("fileEntryMetadataId");
068
069 if (fileEntryMetadataId != null) {
070 setFileEntryMetadataId(fileEntryMetadataId);
071 }
072
073 Long DDMStorageId = (Long)attributes.get("DDMStorageId");
074
075 if (DDMStorageId != null) {
076 setDDMStorageId(DDMStorageId);
077 }
078
079 Long DDMStructureId = (Long)attributes.get("DDMStructureId");
080
081 if (DDMStructureId != null) {
082 setDDMStructureId(DDMStructureId);
083 }
084
085 Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
086
087 if (fileEntryTypeId != null) {
088 setFileEntryTypeId(fileEntryTypeId);
089 }
090
091 Long fileEntryId = (Long)attributes.get("fileEntryId");
092
093 if (fileEntryId != null) {
094 setFileEntryId(fileEntryId);
095 }
096
097 Long fileVersionId = (Long)attributes.get("fileVersionId");
098
099 if (fileVersionId != null) {
100 setFileVersionId(fileVersionId);
101 }
102 }
103
104
109 public long getPrimaryKey() {
110 return _dlFileEntryMetadata.getPrimaryKey();
111 }
112
113
118 public void setPrimaryKey(long primaryKey) {
119 _dlFileEntryMetadata.setPrimaryKey(primaryKey);
120 }
121
122
127 public java.lang.String getUuid() {
128 return _dlFileEntryMetadata.getUuid();
129 }
130
131
136 public void setUuid(java.lang.String uuid) {
137 _dlFileEntryMetadata.setUuid(uuid);
138 }
139
140
145 public long getFileEntryMetadataId() {
146 return _dlFileEntryMetadata.getFileEntryMetadataId();
147 }
148
149
154 public void setFileEntryMetadataId(long fileEntryMetadataId) {
155 _dlFileEntryMetadata.setFileEntryMetadataId(fileEntryMetadataId);
156 }
157
158
163 public long getDDMStorageId() {
164 return _dlFileEntryMetadata.getDDMStorageId();
165 }
166
167
172 public void setDDMStorageId(long DDMStorageId) {
173 _dlFileEntryMetadata.setDDMStorageId(DDMStorageId);
174 }
175
176
181 public long getDDMStructureId() {
182 return _dlFileEntryMetadata.getDDMStructureId();
183 }
184
185
190 public void setDDMStructureId(long DDMStructureId) {
191 _dlFileEntryMetadata.setDDMStructureId(DDMStructureId);
192 }
193
194
199 public long getFileEntryTypeId() {
200 return _dlFileEntryMetadata.getFileEntryTypeId();
201 }
202
203
208 public void setFileEntryTypeId(long fileEntryTypeId) {
209 _dlFileEntryMetadata.setFileEntryTypeId(fileEntryTypeId);
210 }
211
212
217 public long getFileEntryId() {
218 return _dlFileEntryMetadata.getFileEntryId();
219 }
220
221
226 public void setFileEntryId(long fileEntryId) {
227 _dlFileEntryMetadata.setFileEntryId(fileEntryId);
228 }
229
230
235 public long getFileVersionId() {
236 return _dlFileEntryMetadata.getFileVersionId();
237 }
238
239
244 public void setFileVersionId(long fileVersionId) {
245 _dlFileEntryMetadata.setFileVersionId(fileVersionId);
246 }
247
248 public boolean isNew() {
249 return _dlFileEntryMetadata.isNew();
250 }
251
252 public void setNew(boolean n) {
253 _dlFileEntryMetadata.setNew(n);
254 }
255
256 public boolean isCachedModel() {
257 return _dlFileEntryMetadata.isCachedModel();
258 }
259
260 public void setCachedModel(boolean cachedModel) {
261 _dlFileEntryMetadata.setCachedModel(cachedModel);
262 }
263
264 public boolean isEscapedModel() {
265 return _dlFileEntryMetadata.isEscapedModel();
266 }
267
268 public java.io.Serializable getPrimaryKeyObj() {
269 return _dlFileEntryMetadata.getPrimaryKeyObj();
270 }
271
272 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
273 _dlFileEntryMetadata.setPrimaryKeyObj(primaryKeyObj);
274 }
275
276 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
277 return _dlFileEntryMetadata.getExpandoBridge();
278 }
279
280 public void setExpandoBridgeAttributes(
281 com.liferay.portal.service.ServiceContext serviceContext) {
282 _dlFileEntryMetadata.setExpandoBridgeAttributes(serviceContext);
283 }
284
285 @Override
286 public java.lang.Object clone() {
287 return new DLFileEntryMetadataWrapper((DLFileEntryMetadata)_dlFileEntryMetadata.clone());
288 }
289
290 public int compareTo(
291 com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
292 return _dlFileEntryMetadata.compareTo(dlFileEntryMetadata);
293 }
294
295 @Override
296 public int hashCode() {
297 return _dlFileEntryMetadata.hashCode();
298 }
299
300 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> toCacheModel() {
301 return _dlFileEntryMetadata.toCacheModel();
302 }
303
304 public com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata toEscapedModel() {
305 return new DLFileEntryMetadataWrapper(_dlFileEntryMetadata.toEscapedModel());
306 }
307
308 public com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata toUnescapedModel() {
309 return new DLFileEntryMetadataWrapper(_dlFileEntryMetadata.toUnescapedModel());
310 }
311
312 @Override
313 public java.lang.String toString() {
314 return _dlFileEntryMetadata.toString();
315 }
316
317 public java.lang.String toXmlString() {
318 return _dlFileEntryMetadata.toXmlString();
319 }
320
321 public void persist()
322 throws com.liferay.portal.kernel.exception.SystemException {
323 _dlFileEntryMetadata.persist();
324 }
325
326 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getDDMStructure()
327 throws com.liferay.portal.kernel.exception.PortalException,
328 com.liferay.portal.kernel.exception.SystemException {
329 return _dlFileEntryMetadata.getDDMStructure();
330 }
331
332 public com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType()
333 throws com.liferay.portal.kernel.exception.PortalException,
334 com.liferay.portal.kernel.exception.SystemException {
335 return _dlFileEntryMetadata.getFileEntryType();
336 }
337
338 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion()
339 throws com.liferay.portal.kernel.exception.PortalException,
340 com.liferay.portal.kernel.exception.SystemException {
341 return _dlFileEntryMetadata.getFileVersion();
342 }
343
344 @Override
345 public boolean equals(Object obj) {
346 if (this == obj) {
347 return true;
348 }
349
350 if (!(obj instanceof DLFileEntryMetadataWrapper)) {
351 return false;
352 }
353
354 DLFileEntryMetadataWrapper dlFileEntryMetadataWrapper = (DLFileEntryMetadataWrapper)obj;
355
356 if (Validator.equals(_dlFileEntryMetadata,
357 dlFileEntryMetadataWrapper._dlFileEntryMetadata)) {
358 return true;
359 }
360
361 return false;
362 }
363
364
367 public DLFileEntryMetadata getWrappedDLFileEntryMetadata() {
368 return _dlFileEntryMetadata;
369 }
370
371 public DLFileEntryMetadata getWrappedModel() {
372 return _dlFileEntryMetadata;
373 }
374
375 public void resetOriginalValues() {
376 _dlFileEntryMetadata.resetOriginalValues();
377 }
378
379 private DLFileEntryMetadata _dlFileEntryMetadata;
380 }