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