001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link TrashEntry}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       TrashEntry
030     * @generated
031     */
032    public class TrashEntryWrapper implements TrashEntry, ModelWrapper<TrashEntry> {
033            public TrashEntryWrapper(TrashEntry trashEntry) {
034                    _trashEntry = trashEntry;
035            }
036    
037            public Class<?> getModelClass() {
038                    return TrashEntry.class;
039            }
040    
041            public String getModelClassName() {
042                    return TrashEntry.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("entryId", getEntryId());
049                    attributes.put("groupId", getGroupId());
050                    attributes.put("companyId", getCompanyId());
051                    attributes.put("userId", getUserId());
052                    attributes.put("userName", getUserName());
053                    attributes.put("createDate", getCreateDate());
054                    attributes.put("classNameId", getClassNameId());
055                    attributes.put("classPK", getClassPK());
056                    attributes.put("typeSettings", getTypeSettings());
057                    attributes.put("status", getStatus());
058    
059                    return attributes;
060            }
061    
062            public void setModelAttributes(Map<String, Object> attributes) {
063                    Long entryId = (Long)attributes.get("entryId");
064    
065                    if (entryId != null) {
066                            setEntryId(entryId);
067                    }
068    
069                    Long groupId = (Long)attributes.get("groupId");
070    
071                    if (groupId != null) {
072                            setGroupId(groupId);
073                    }
074    
075                    Long companyId = (Long)attributes.get("companyId");
076    
077                    if (companyId != null) {
078                            setCompanyId(companyId);
079                    }
080    
081                    Long userId = (Long)attributes.get("userId");
082    
083                    if (userId != null) {
084                            setUserId(userId);
085                    }
086    
087                    String userName = (String)attributes.get("userName");
088    
089                    if (userName != null) {
090                            setUserName(userName);
091                    }
092    
093                    Date createDate = (Date)attributes.get("createDate");
094    
095                    if (createDate != null) {
096                            setCreateDate(createDate);
097                    }
098    
099                    Long classNameId = (Long)attributes.get("classNameId");
100    
101                    if (classNameId != null) {
102                            setClassNameId(classNameId);
103                    }
104    
105                    Long classPK = (Long)attributes.get("classPK");
106    
107                    if (classPK != null) {
108                            setClassPK(classPK);
109                    }
110    
111                    String typeSettings = (String)attributes.get("typeSettings");
112    
113                    if (typeSettings != null) {
114                            setTypeSettings(typeSettings);
115                    }
116    
117                    Integer status = (Integer)attributes.get("status");
118    
119                    if (status != null) {
120                            setStatus(status);
121                    }
122            }
123    
124            /**
125            * Returns the primary key of this trash entry.
126            *
127            * @return the primary key of this trash entry
128            */
129            public long getPrimaryKey() {
130                    return _trashEntry.getPrimaryKey();
131            }
132    
133            /**
134            * Sets the primary key of this trash entry.
135            *
136            * @param primaryKey the primary key of this trash entry
137            */
138            public void setPrimaryKey(long primaryKey) {
139                    _trashEntry.setPrimaryKey(primaryKey);
140            }
141    
142            /**
143            * Returns the entry ID of this trash entry.
144            *
145            * @return the entry ID of this trash entry
146            */
147            public long getEntryId() {
148                    return _trashEntry.getEntryId();
149            }
150    
151            /**
152            * Sets the entry ID of this trash entry.
153            *
154            * @param entryId the entry ID of this trash entry
155            */
156            public void setEntryId(long entryId) {
157                    _trashEntry.setEntryId(entryId);
158            }
159    
160            /**
161            * Returns the group ID of this trash entry.
162            *
163            * @return the group ID of this trash entry
164            */
165            public long getGroupId() {
166                    return _trashEntry.getGroupId();
167            }
168    
169            /**
170            * Sets the group ID of this trash entry.
171            *
172            * @param groupId the group ID of this trash entry
173            */
174            public void setGroupId(long groupId) {
175                    _trashEntry.setGroupId(groupId);
176            }
177    
178            /**
179            * Returns the company ID of this trash entry.
180            *
181            * @return the company ID of this trash entry
182            */
183            public long getCompanyId() {
184                    return _trashEntry.getCompanyId();
185            }
186    
187            /**
188            * Sets the company ID of this trash entry.
189            *
190            * @param companyId the company ID of this trash entry
191            */
192            public void setCompanyId(long companyId) {
193                    _trashEntry.setCompanyId(companyId);
194            }
195    
196            /**
197            * Returns the user ID of this trash entry.
198            *
199            * @return the user ID of this trash entry
200            */
201            public long getUserId() {
202                    return _trashEntry.getUserId();
203            }
204    
205            /**
206            * Sets the user ID of this trash entry.
207            *
208            * @param userId the user ID of this trash entry
209            */
210            public void setUserId(long userId) {
211                    _trashEntry.setUserId(userId);
212            }
213    
214            /**
215            * Returns the user uuid of this trash entry.
216            *
217            * @return the user uuid of this trash entry
218            * @throws SystemException if a system exception occurred
219            */
220            public java.lang.String getUserUuid()
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return _trashEntry.getUserUuid();
223            }
224    
225            /**
226            * Sets the user uuid of this trash entry.
227            *
228            * @param userUuid the user uuid of this trash entry
229            */
230            public void setUserUuid(java.lang.String userUuid) {
231                    _trashEntry.setUserUuid(userUuid);
232            }
233    
234            /**
235            * Returns the user name of this trash entry.
236            *
237            * @return the user name of this trash entry
238            */
239            public java.lang.String getUserName() {
240                    return _trashEntry.getUserName();
241            }
242    
243            /**
244            * Sets the user name of this trash entry.
245            *
246            * @param userName the user name of this trash entry
247            */
248            public void setUserName(java.lang.String userName) {
249                    _trashEntry.setUserName(userName);
250            }
251    
252            /**
253            * Returns the create date of this trash entry.
254            *
255            * @return the create date of this trash entry
256            */
257            public java.util.Date getCreateDate() {
258                    return _trashEntry.getCreateDate();
259            }
260    
261            /**
262            * Sets the create date of this trash entry.
263            *
264            * @param createDate the create date of this trash entry
265            */
266            public void setCreateDate(java.util.Date createDate) {
267                    _trashEntry.setCreateDate(createDate);
268            }
269    
270            /**
271            * Returns the fully qualified class name of this trash entry.
272            *
273            * @return the fully qualified class name of this trash entry
274            */
275            public java.lang.String getClassName() {
276                    return _trashEntry.getClassName();
277            }
278    
279            public void setClassName(java.lang.String className) {
280                    _trashEntry.setClassName(className);
281            }
282    
283            /**
284            * Returns the class name ID of this trash entry.
285            *
286            * @return the class name ID of this trash entry
287            */
288            public long getClassNameId() {
289                    return _trashEntry.getClassNameId();
290            }
291    
292            /**
293            * Sets the class name ID of this trash entry.
294            *
295            * @param classNameId the class name ID of this trash entry
296            */
297            public void setClassNameId(long classNameId) {
298                    _trashEntry.setClassNameId(classNameId);
299            }
300    
301            /**
302            * Returns the class p k of this trash entry.
303            *
304            * @return the class p k of this trash entry
305            */
306            public long getClassPK() {
307                    return _trashEntry.getClassPK();
308            }
309    
310            /**
311            * Sets the class p k of this trash entry.
312            *
313            * @param classPK the class p k of this trash entry
314            */
315            public void setClassPK(long classPK) {
316                    _trashEntry.setClassPK(classPK);
317            }
318    
319            /**
320            * Returns the type settings of this trash entry.
321            *
322            * @return the type settings of this trash entry
323            */
324            public java.lang.String getTypeSettings() {
325                    return _trashEntry.getTypeSettings();
326            }
327    
328            /**
329            * Sets the type settings of this trash entry.
330            *
331            * @param typeSettings the type settings of this trash entry
332            */
333            public void setTypeSettings(java.lang.String typeSettings) {
334                    _trashEntry.setTypeSettings(typeSettings);
335            }
336    
337            /**
338            * Returns the status of this trash entry.
339            *
340            * @return the status of this trash entry
341            */
342            public int getStatus() {
343                    return _trashEntry.getStatus();
344            }
345    
346            /**
347            * Sets the status of this trash entry.
348            *
349            * @param status the status of this trash entry
350            */
351            public void setStatus(int status) {
352                    _trashEntry.setStatus(status);
353            }
354    
355            public boolean isNew() {
356                    return _trashEntry.isNew();
357            }
358    
359            public void setNew(boolean n) {
360                    _trashEntry.setNew(n);
361            }
362    
363            public boolean isCachedModel() {
364                    return _trashEntry.isCachedModel();
365            }
366    
367            public void setCachedModel(boolean cachedModel) {
368                    _trashEntry.setCachedModel(cachedModel);
369            }
370    
371            public boolean isEscapedModel() {
372                    return _trashEntry.isEscapedModel();
373            }
374    
375            public java.io.Serializable getPrimaryKeyObj() {
376                    return _trashEntry.getPrimaryKeyObj();
377            }
378    
379            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
380                    _trashEntry.setPrimaryKeyObj(primaryKeyObj);
381            }
382    
383            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
384                    return _trashEntry.getExpandoBridge();
385            }
386    
387            public void setExpandoBridgeAttributes(
388                    com.liferay.portal.service.ServiceContext serviceContext) {
389                    _trashEntry.setExpandoBridgeAttributes(serviceContext);
390            }
391    
392            @Override
393            public java.lang.Object clone() {
394                    return new TrashEntryWrapper((TrashEntry)_trashEntry.clone());
395            }
396    
397            public int compareTo(com.liferay.portlet.trash.model.TrashEntry trashEntry) {
398                    return _trashEntry.compareTo(trashEntry);
399            }
400    
401            @Override
402            public int hashCode() {
403                    return _trashEntry.hashCode();
404            }
405    
406            public com.liferay.portal.model.CacheModel<com.liferay.portlet.trash.model.TrashEntry> toCacheModel() {
407                    return _trashEntry.toCacheModel();
408            }
409    
410            public com.liferay.portlet.trash.model.TrashEntry toEscapedModel() {
411                    return new TrashEntryWrapper(_trashEntry.toEscapedModel());
412            }
413    
414            public com.liferay.portlet.trash.model.TrashEntry toUnescapedModel() {
415                    return new TrashEntryWrapper(_trashEntry.toUnescapedModel());
416            }
417    
418            @Override
419            public java.lang.String toString() {
420                    return _trashEntry.toString();
421            }
422    
423            public java.lang.String toXmlString() {
424                    return _trashEntry.toXmlString();
425            }
426    
427            public void persist()
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    _trashEntry.persist();
430            }
431    
432            public com.liferay.portlet.trash.model.TrashEntry getRootEntry() {
433                    return _trashEntry.getRootEntry();
434            }
435    
436            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
437                    return _trashEntry.getTypeSettingsProperties();
438            }
439    
440            public java.lang.String getTypeSettingsProperty(java.lang.String key) {
441                    return _trashEntry.getTypeSettingsProperty(key);
442            }
443    
444            public java.lang.String getTypeSettingsProperty(java.lang.String key,
445                    java.lang.String defaultValue) {
446                    return _trashEntry.getTypeSettingsProperty(key, defaultValue);
447            }
448    
449            public void setRootEntry(
450                    com.liferay.portlet.trash.model.TrashEntry rootEntry) {
451                    _trashEntry.setRootEntry(rootEntry);
452            }
453    
454            public void setTypeSettingsProperties(
455                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
456                    _trashEntry.setTypeSettingsProperties(typeSettingsProperties);
457            }
458    
459            /**
460             * @deprecated Renamed to {@link #getWrappedModel}
461             */
462            public TrashEntry getWrappedTrashEntry() {
463                    return _trashEntry;
464            }
465    
466            public TrashEntry getWrappedModel() {
467                    return _trashEntry;
468            }
469    
470            public void resetOriginalValues() {
471                    _trashEntry.resetOriginalValues();
472            }
473    
474            private TrashEntry _trashEntry;
475    }