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