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