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