001    /**
002     * Copyright (c) 2000-present 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.portlet.trash.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.Date;
023    import java.util.HashMap;
024    import java.util.Map;
025    
026    /**
027     * <p>
028     * This class is a wrapper for {@link TrashEntry}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see TrashEntry
033     * @generated
034     */
035    @ProviderType
036    public class TrashEntryWrapper implements TrashEntry, ModelWrapper<TrashEntry> {
037            public TrashEntryWrapper(TrashEntry trashEntry) {
038                    _trashEntry = trashEntry;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return TrashEntry.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return TrashEntry.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("entryId", getEntryId());
056                    attributes.put("groupId", getGroupId());
057                    attributes.put("companyId", getCompanyId());
058                    attributes.put("userId", getUserId());
059                    attributes.put("userName", getUserName());
060                    attributes.put("createDate", getCreateDate());
061                    attributes.put("classNameId", getClassNameId());
062                    attributes.put("classPK", getClassPK());
063                    attributes.put("systemEventSetKey", getSystemEventSetKey());
064                    attributes.put("typeSettings", getTypeSettings());
065                    attributes.put("status", getStatus());
066    
067                    return attributes;
068            }
069    
070            @Override
071            public void setModelAttributes(Map<String, Object> attributes) {
072                    Long entryId = (Long)attributes.get("entryId");
073    
074                    if (entryId != null) {
075                            setEntryId(entryId);
076                    }
077    
078                    Long groupId = (Long)attributes.get("groupId");
079    
080                    if (groupId != null) {
081                            setGroupId(groupId);
082                    }
083    
084                    Long companyId = (Long)attributes.get("companyId");
085    
086                    if (companyId != null) {
087                            setCompanyId(companyId);
088                    }
089    
090                    Long userId = (Long)attributes.get("userId");
091    
092                    if (userId != null) {
093                            setUserId(userId);
094                    }
095    
096                    String userName = (String)attributes.get("userName");
097    
098                    if (userName != null) {
099                            setUserName(userName);
100                    }
101    
102                    Date createDate = (Date)attributes.get("createDate");
103    
104                    if (createDate != null) {
105                            setCreateDate(createDate);
106                    }
107    
108                    Long classNameId = (Long)attributes.get("classNameId");
109    
110                    if (classNameId != null) {
111                            setClassNameId(classNameId);
112                    }
113    
114                    Long classPK = (Long)attributes.get("classPK");
115    
116                    if (classPK != null) {
117                            setClassPK(classPK);
118                    }
119    
120                    Long systemEventSetKey = (Long)attributes.get("systemEventSetKey");
121    
122                    if (systemEventSetKey != null) {
123                            setSystemEventSetKey(systemEventSetKey);
124                    }
125    
126                    String typeSettings = (String)attributes.get("typeSettings");
127    
128                    if (typeSettings != null) {
129                            setTypeSettings(typeSettings);
130                    }
131    
132                    Integer status = (Integer)attributes.get("status");
133    
134                    if (status != null) {
135                            setStatus(status);
136                    }
137            }
138    
139            @Override
140            public java.lang.Object clone() {
141                    return new TrashEntryWrapper((TrashEntry)_trashEntry.clone());
142            }
143    
144            @Override
145            public int compareTo(com.liferay.portlet.trash.model.TrashEntry trashEntry) {
146                    return _trashEntry.compareTo(trashEntry);
147            }
148    
149            /**
150            * Returns the fully qualified class name of this trash entry.
151            *
152            * @return the fully qualified class name of this trash entry
153            */
154            @Override
155            public java.lang.String getClassName() {
156                    return _trashEntry.getClassName();
157            }
158    
159            /**
160            * Returns the class name ID of this trash entry.
161            *
162            * @return the class name ID of this trash entry
163            */
164            @Override
165            public long getClassNameId() {
166                    return _trashEntry.getClassNameId();
167            }
168    
169            /**
170            * Returns the class p k of this trash entry.
171            *
172            * @return the class p k of this trash entry
173            */
174            @Override
175            public long getClassPK() {
176                    return _trashEntry.getClassPK();
177            }
178    
179            /**
180            * Returns the company ID of this trash entry.
181            *
182            * @return the company ID of this trash entry
183            */
184            @Override
185            public long getCompanyId() {
186                    return _trashEntry.getCompanyId();
187            }
188    
189            /**
190            * Returns the create date of this trash entry.
191            *
192            * @return the create date of this trash entry
193            */
194            @Override
195            public Date getCreateDate() {
196                    return _trashEntry.getCreateDate();
197            }
198    
199            /**
200            * Returns the entry ID of this trash entry.
201            *
202            * @return the entry ID of this trash entry
203            */
204            @Override
205            public long getEntryId() {
206                    return _trashEntry.getEntryId();
207            }
208    
209            @Override
210            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
211                    return _trashEntry.getExpandoBridge();
212            }
213    
214            /**
215            * Returns the group ID of this trash entry.
216            *
217            * @return the group ID of this trash entry
218            */
219            @Override
220            public long getGroupId() {
221                    return _trashEntry.getGroupId();
222            }
223    
224            /**
225            * Returns the primary key of this trash entry.
226            *
227            * @return the primary key of this trash entry
228            */
229            @Override
230            public long getPrimaryKey() {
231                    return _trashEntry.getPrimaryKey();
232            }
233    
234            @Override
235            public java.io.Serializable getPrimaryKeyObj() {
236                    return _trashEntry.getPrimaryKeyObj();
237            }
238    
239            @Override
240            public com.liferay.portlet.trash.model.TrashEntry getRootEntry() {
241                    return _trashEntry.getRootEntry();
242            }
243    
244            /**
245            * Returns the status of this trash entry.
246            *
247            * @return the status of this trash entry
248            */
249            @Override
250            public int getStatus() {
251                    return _trashEntry.getStatus();
252            }
253    
254            /**
255            * Returns the system event set key of this trash entry.
256            *
257            * @return the system event set key of this trash entry
258            */
259            @Override
260            public long getSystemEventSetKey() {
261                    return _trashEntry.getSystemEventSetKey();
262            }
263    
264            /**
265            * Returns the type settings of this trash entry.
266            *
267            * @return the type settings of this trash entry
268            */
269            @Override
270            public java.lang.String getTypeSettings() {
271                    return _trashEntry.getTypeSettings();
272            }
273    
274            @Override
275            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
276                    return _trashEntry.getTypeSettingsProperties();
277            }
278    
279            @Override
280            public java.lang.String getTypeSettingsProperty(java.lang.String key) {
281                    return _trashEntry.getTypeSettingsProperty(key);
282            }
283    
284            @Override
285            public java.lang.String getTypeSettingsProperty(java.lang.String key,
286                    java.lang.String defaultValue) {
287                    return _trashEntry.getTypeSettingsProperty(key, defaultValue);
288            }
289    
290            /**
291            * Returns the user ID of this trash entry.
292            *
293            * @return the user ID of this trash entry
294            */
295            @Override
296            public long getUserId() {
297                    return _trashEntry.getUserId();
298            }
299    
300            /**
301            * Returns the user name of this trash entry.
302            *
303            * @return the user name of this trash entry
304            */
305            @Override
306            public java.lang.String getUserName() {
307                    return _trashEntry.getUserName();
308            }
309    
310            /**
311            * Returns the user uuid of this trash entry.
312            *
313            * @return the user uuid of this trash entry
314            */
315            @Override
316            public java.lang.String getUserUuid() {
317                    return _trashEntry.getUserUuid();
318            }
319    
320            @Override
321            public int hashCode() {
322                    return _trashEntry.hashCode();
323            }
324    
325            @Override
326            public boolean isCachedModel() {
327                    return _trashEntry.isCachedModel();
328            }
329    
330            @Override
331            public boolean isEscapedModel() {
332                    return _trashEntry.isEscapedModel();
333            }
334    
335            @Override
336            public boolean isNew() {
337                    return _trashEntry.isNew();
338            }
339    
340            @Override
341            public boolean isTrashEntry(java.lang.String className, long classPK) {
342                    return _trashEntry.isTrashEntry(className, classPK);
343            }
344    
345            @Override
346            public boolean isTrashEntry(java.lang.Class<?> clazz, long classPK) {
347                    return _trashEntry.isTrashEntry(clazz, classPK);
348            }
349    
350            @Override
351            public void persist() {
352                    _trashEntry.persist();
353            }
354    
355            @Override
356            public void setCachedModel(boolean cachedModel) {
357                    _trashEntry.setCachedModel(cachedModel);
358            }
359    
360            @Override
361            public void setClassName(java.lang.String className) {
362                    _trashEntry.setClassName(className);
363            }
364    
365            /**
366            * Sets the class name ID of this trash entry.
367            *
368            * @param classNameId the class name ID of this trash entry
369            */
370            @Override
371            public void setClassNameId(long classNameId) {
372                    _trashEntry.setClassNameId(classNameId);
373            }
374    
375            /**
376            * Sets the class p k of this trash entry.
377            *
378            * @param classPK the class p k of this trash entry
379            */
380            @Override
381            public void setClassPK(long classPK) {
382                    _trashEntry.setClassPK(classPK);
383            }
384    
385            /**
386            * Sets the company ID of this trash entry.
387            *
388            * @param companyId the company ID of this trash entry
389            */
390            @Override
391            public void setCompanyId(long companyId) {
392                    _trashEntry.setCompanyId(companyId);
393            }
394    
395            /**
396            * Sets the create date of this trash entry.
397            *
398            * @param createDate the create date of this trash entry
399            */
400            @Override
401            public void setCreateDate(Date createDate) {
402                    _trashEntry.setCreateDate(createDate);
403            }
404    
405            /**
406            * Sets the entry ID of this trash entry.
407            *
408            * @param entryId the entry ID of this trash entry
409            */
410            @Override
411            public void setEntryId(long entryId) {
412                    _trashEntry.setEntryId(entryId);
413            }
414    
415            @Override
416            public void setExpandoBridgeAttributes(
417                    com.liferay.portal.model.BaseModel<?> baseModel) {
418                    _trashEntry.setExpandoBridgeAttributes(baseModel);
419            }
420    
421            @Override
422            public void setExpandoBridgeAttributes(
423                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
424                    _trashEntry.setExpandoBridgeAttributes(expandoBridge);
425            }
426    
427            @Override
428            public void setExpandoBridgeAttributes(
429                    com.liferay.portal.service.ServiceContext serviceContext) {
430                    _trashEntry.setExpandoBridgeAttributes(serviceContext);
431            }
432    
433            /**
434            * Sets the group ID of this trash entry.
435            *
436            * @param groupId the group ID of this trash entry
437            */
438            @Override
439            public void setGroupId(long groupId) {
440                    _trashEntry.setGroupId(groupId);
441            }
442    
443            @Override
444            public void setNew(boolean n) {
445                    _trashEntry.setNew(n);
446            }
447    
448            /**
449            * Sets the primary key of this trash entry.
450            *
451            * @param primaryKey the primary key of this trash entry
452            */
453            @Override
454            public void setPrimaryKey(long primaryKey) {
455                    _trashEntry.setPrimaryKey(primaryKey);
456            }
457    
458            @Override
459            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
460                    _trashEntry.setPrimaryKeyObj(primaryKeyObj);
461            }
462    
463            @Override
464            public void setRootEntry(
465                    com.liferay.portlet.trash.model.TrashEntry rootEntry) {
466                    _trashEntry.setRootEntry(rootEntry);
467            }
468    
469            /**
470            * Sets the status of this trash entry.
471            *
472            * @param status the status of this trash entry
473            */
474            @Override
475            public void setStatus(int status) {
476                    _trashEntry.setStatus(status);
477            }
478    
479            /**
480            * Sets the system event set key of this trash entry.
481            *
482            * @param systemEventSetKey the system event set key of this trash entry
483            */
484            @Override
485            public void setSystemEventSetKey(long systemEventSetKey) {
486                    _trashEntry.setSystemEventSetKey(systemEventSetKey);
487            }
488    
489            /**
490            * Sets the type settings of this trash entry.
491            *
492            * @param typeSettings the type settings of this trash entry
493            */
494            @Override
495            public void setTypeSettings(java.lang.String typeSettings) {
496                    _trashEntry.setTypeSettings(typeSettings);
497            }
498    
499            @Override
500            public void setTypeSettingsProperties(
501                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
502                    _trashEntry.setTypeSettingsProperties(typeSettingsProperties);
503            }
504    
505            /**
506            * Sets the user ID of this trash entry.
507            *
508            * @param userId the user ID of this trash entry
509            */
510            @Override
511            public void setUserId(long userId) {
512                    _trashEntry.setUserId(userId);
513            }
514    
515            /**
516            * Sets the user name of this trash entry.
517            *
518            * @param userName the user name of this trash entry
519            */
520            @Override
521            public void setUserName(java.lang.String userName) {
522                    _trashEntry.setUserName(userName);
523            }
524    
525            /**
526            * Sets the user uuid of this trash entry.
527            *
528            * @param userUuid the user uuid of this trash entry
529            */
530            @Override
531            public void setUserUuid(java.lang.String userUuid) {
532                    _trashEntry.setUserUuid(userUuid);
533            }
534    
535            @Override
536            public com.liferay.portal.model.CacheModel<com.liferay.portlet.trash.model.TrashEntry> toCacheModel() {
537                    return _trashEntry.toCacheModel();
538            }
539    
540            @Override
541            public com.liferay.portlet.trash.model.TrashEntry toEscapedModel() {
542                    return new TrashEntryWrapper(_trashEntry.toEscapedModel());
543            }
544    
545            @Override
546            public java.lang.String toString() {
547                    return _trashEntry.toString();
548            }
549    
550            @Override
551            public com.liferay.portlet.trash.model.TrashEntry toUnescapedModel() {
552                    return new TrashEntryWrapper(_trashEntry.toUnescapedModel());
553            }
554    
555            @Override
556            public java.lang.String toXmlString() {
557                    return _trashEntry.toXmlString();
558            }
559    
560            @Override
561            public boolean equals(Object obj) {
562                    if (this == obj) {
563                            return true;
564                    }
565    
566                    if (!(obj instanceof TrashEntryWrapper)) {
567                            return false;
568                    }
569    
570                    TrashEntryWrapper trashEntryWrapper = (TrashEntryWrapper)obj;
571    
572                    if (Validator.equals(_trashEntry, trashEntryWrapper._trashEntry)) {
573                            return true;
574                    }
575    
576                    return false;
577            }
578    
579            @Override
580            public TrashEntry getWrappedModel() {
581                    return _trashEntry;
582            }
583    
584            @Override
585            public boolean isEntityCacheEnabled() {
586                    return _trashEntry.isEntityCacheEnabled();
587            }
588    
589            @Override
590            public boolean isFinderCacheEnabled() {
591                    return _trashEntry.isFinderCacheEnabled();
592            }
593    
594            @Override
595            public void resetOriginalValues() {
596                    _trashEntry.resetOriginalValues();
597            }
598    
599            private final TrashEntry _trashEntry;
600    }