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            public Class<?> getModelClass() {
039                    return DLFileRank.class;
040            }
041    
042            public String getModelClassName() {
043                    return DLFileRank.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("fileRankId", getFileRankId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("companyId", getCompanyId());
052                    attributes.put("userId", getUserId());
053                    attributes.put("createDate", getCreateDate());
054                    attributes.put("fileEntryId", getFileEntryId());
055    
056                    return attributes;
057            }
058    
059            public void setModelAttributes(Map<String, Object> attributes) {
060                    Long fileRankId = (Long)attributes.get("fileRankId");
061    
062                    if (fileRankId != null) {
063                            setFileRankId(fileRankId);
064                    }
065    
066                    Long groupId = (Long)attributes.get("groupId");
067    
068                    if (groupId != null) {
069                            setGroupId(groupId);
070                    }
071    
072                    Long companyId = (Long)attributes.get("companyId");
073    
074                    if (companyId != null) {
075                            setCompanyId(companyId);
076                    }
077    
078                    Long userId = (Long)attributes.get("userId");
079    
080                    if (userId != null) {
081                            setUserId(userId);
082                    }
083    
084                    Date createDate = (Date)attributes.get("createDate");
085    
086                    if (createDate != null) {
087                            setCreateDate(createDate);
088                    }
089    
090                    Long fileEntryId = (Long)attributes.get("fileEntryId");
091    
092                    if (fileEntryId != null) {
093                            setFileEntryId(fileEntryId);
094                    }
095            }
096    
097            /**
098            * Returns the primary key of this document library file rank.
099            *
100            * @return the primary key of this document library file rank
101            */
102            public long getPrimaryKey() {
103                    return _dlFileRank.getPrimaryKey();
104            }
105    
106            /**
107            * Sets the primary key of this document library file rank.
108            *
109            * @param primaryKey the primary key of this document library file rank
110            */
111            public void setPrimaryKey(long primaryKey) {
112                    _dlFileRank.setPrimaryKey(primaryKey);
113            }
114    
115            /**
116            * Returns the file rank ID of this document library file rank.
117            *
118            * @return the file rank ID of this document library file rank
119            */
120            public long getFileRankId() {
121                    return _dlFileRank.getFileRankId();
122            }
123    
124            /**
125            * Sets the file rank ID of this document library file rank.
126            *
127            * @param fileRankId the file rank ID of this document library file rank
128            */
129            public void setFileRankId(long fileRankId) {
130                    _dlFileRank.setFileRankId(fileRankId);
131            }
132    
133            /**
134            * Returns the group ID of this document library file rank.
135            *
136            * @return the group ID of this document library file rank
137            */
138            public long getGroupId() {
139                    return _dlFileRank.getGroupId();
140            }
141    
142            /**
143            * Sets the group ID of this document library file rank.
144            *
145            * @param groupId the group ID of this document library file rank
146            */
147            public void setGroupId(long groupId) {
148                    _dlFileRank.setGroupId(groupId);
149            }
150    
151            /**
152            * Returns the company ID of this document library file rank.
153            *
154            * @return the company ID of this document library file rank
155            */
156            public long getCompanyId() {
157                    return _dlFileRank.getCompanyId();
158            }
159    
160            /**
161            * Sets the company ID of this document library file rank.
162            *
163            * @param companyId the company ID of this document library file rank
164            */
165            public void setCompanyId(long companyId) {
166                    _dlFileRank.setCompanyId(companyId);
167            }
168    
169            /**
170            * Returns the user ID of this document library file rank.
171            *
172            * @return the user ID of this document library file rank
173            */
174            public long getUserId() {
175                    return _dlFileRank.getUserId();
176            }
177    
178            /**
179            * Sets the user ID of this document library file rank.
180            *
181            * @param userId the user ID of this document library file rank
182            */
183            public void setUserId(long userId) {
184                    _dlFileRank.setUserId(userId);
185            }
186    
187            /**
188            * Returns the user uuid of this document library file rank.
189            *
190            * @return the user uuid of this document library file rank
191            * @throws SystemException if a system exception occurred
192            */
193            public java.lang.String getUserUuid()
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return _dlFileRank.getUserUuid();
196            }
197    
198            /**
199            * Sets the user uuid of this document library file rank.
200            *
201            * @param userUuid the user uuid of this document library file rank
202            */
203            public void setUserUuid(java.lang.String userUuid) {
204                    _dlFileRank.setUserUuid(userUuid);
205            }
206    
207            /**
208            * Returns the create date of this document library file rank.
209            *
210            * @return the create date of this document library file rank
211            */
212            public java.util.Date getCreateDate() {
213                    return _dlFileRank.getCreateDate();
214            }
215    
216            /**
217            * Sets the create date of this document library file rank.
218            *
219            * @param createDate the create date of this document library file rank
220            */
221            public void setCreateDate(java.util.Date createDate) {
222                    _dlFileRank.setCreateDate(createDate);
223            }
224    
225            /**
226            * Returns the file entry ID of this document library file rank.
227            *
228            * @return the file entry ID of this document library file rank
229            */
230            public long getFileEntryId() {
231                    return _dlFileRank.getFileEntryId();
232            }
233    
234            /**
235            * Sets the file entry ID of this document library file rank.
236            *
237            * @param fileEntryId the file entry ID of this document library file rank
238            */
239            public void setFileEntryId(long fileEntryId) {
240                    _dlFileRank.setFileEntryId(fileEntryId);
241            }
242    
243            public boolean isNew() {
244                    return _dlFileRank.isNew();
245            }
246    
247            public void setNew(boolean n) {
248                    _dlFileRank.setNew(n);
249            }
250    
251            public boolean isCachedModel() {
252                    return _dlFileRank.isCachedModel();
253            }
254    
255            public void setCachedModel(boolean cachedModel) {
256                    _dlFileRank.setCachedModel(cachedModel);
257            }
258    
259            public boolean isEscapedModel() {
260                    return _dlFileRank.isEscapedModel();
261            }
262    
263            public java.io.Serializable getPrimaryKeyObj() {
264                    return _dlFileRank.getPrimaryKeyObj();
265            }
266    
267            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
268                    _dlFileRank.setPrimaryKeyObj(primaryKeyObj);
269            }
270    
271            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
272                    return _dlFileRank.getExpandoBridge();
273            }
274    
275            public void setExpandoBridgeAttributes(
276                    com.liferay.portal.service.ServiceContext serviceContext) {
277                    _dlFileRank.setExpandoBridgeAttributes(serviceContext);
278            }
279    
280            @Override
281            public java.lang.Object clone() {
282                    return new DLFileRankWrapper((DLFileRank)_dlFileRank.clone());
283            }
284    
285            public int compareTo(
286                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) {
287                    return _dlFileRank.compareTo(dlFileRank);
288            }
289    
290            @Override
291            public int hashCode() {
292                    return _dlFileRank.hashCode();
293            }
294    
295            public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileRank> toCacheModel() {
296                    return _dlFileRank.toCacheModel();
297            }
298    
299            public com.liferay.portlet.documentlibrary.model.DLFileRank toEscapedModel() {
300                    return new DLFileRankWrapper(_dlFileRank.toEscapedModel());
301            }
302    
303            public com.liferay.portlet.documentlibrary.model.DLFileRank toUnescapedModel() {
304                    return new DLFileRankWrapper(_dlFileRank.toUnescapedModel());
305            }
306    
307            @Override
308            public java.lang.String toString() {
309                    return _dlFileRank.toString();
310            }
311    
312            public java.lang.String toXmlString() {
313                    return _dlFileRank.toXmlString();
314            }
315    
316            public void persist()
317                    throws com.liferay.portal.kernel.exception.SystemException {
318                    _dlFileRank.persist();
319            }
320    
321            @Override
322            public boolean equals(Object obj) {
323                    if (this == obj) {
324                            return true;
325                    }
326    
327                    if (!(obj instanceof DLFileRankWrapper)) {
328                            return false;
329                    }
330    
331                    DLFileRankWrapper dlFileRankWrapper = (DLFileRankWrapper)obj;
332    
333                    if (Validator.equals(_dlFileRank, dlFileRankWrapper._dlFileRank)) {
334                            return true;
335                    }
336    
337                    return false;
338            }
339    
340            /**
341             * @deprecated Renamed to {@link #getWrappedModel}
342             */
343            public DLFileRank getWrappedDLFileRank() {
344                    return _dlFileRank;
345            }
346    
347            public DLFileRank getWrappedModel() {
348                    return _dlFileRank;
349            }
350    
351            public void resetOriginalValues() {
352                    _dlFileRank.resetOriginalValues();
353            }
354    
355            private DLFileRank _dlFileRank;
356    }