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