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