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