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