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