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