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