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    import com.liferay.portal.kernel.util.Validator;
023    
024    import java.io.Serializable;
025    
026    import java.util.HashMap;
027    import java.util.Map;
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 java.lang.Object clone() {
126                    return new RecentLayoutRevisionWrapper((RecentLayoutRevision)_recentLayoutRevision.clone());
127            }
128    
129            @Override
130            public int compareTo(
131                    com.liferay.portal.kernel.model.RecentLayoutRevision recentLayoutRevision) {
132                    return _recentLayoutRevision.compareTo(recentLayoutRevision);
133            }
134    
135            /**
136            * Returns the company ID of this recent layout revision.
137            *
138            * @return the company ID of this recent layout revision
139            */
140            @Override
141            public long getCompanyId() {
142                    return _recentLayoutRevision.getCompanyId();
143            }
144    
145            @Override
146            public ExpandoBridge getExpandoBridge() {
147                    return _recentLayoutRevision.getExpandoBridge();
148            }
149    
150            /**
151            * Returns the group ID of this recent layout revision.
152            *
153            * @return the group ID of this recent layout revision
154            */
155            @Override
156            public long getGroupId() {
157                    return _recentLayoutRevision.getGroupId();
158            }
159    
160            /**
161            * Returns the layout revision ID of this recent layout revision.
162            *
163            * @return the layout revision ID of this recent layout revision
164            */
165            @Override
166            public long getLayoutRevisionId() {
167                    return _recentLayoutRevision.getLayoutRevisionId();
168            }
169    
170            /**
171            * Returns the layout set branch ID of this recent layout revision.
172            *
173            * @return the layout set branch ID of this recent layout revision
174            */
175            @Override
176            public long getLayoutSetBranchId() {
177                    return _recentLayoutRevision.getLayoutSetBranchId();
178            }
179    
180            /**
181            * Returns the mvcc version of this recent layout revision.
182            *
183            * @return the mvcc version of this recent layout revision
184            */
185            @Override
186            public long getMvccVersion() {
187                    return _recentLayoutRevision.getMvccVersion();
188            }
189    
190            /**
191            * Returns the plid of this recent layout revision.
192            *
193            * @return the plid of this recent layout revision
194            */
195            @Override
196            public long getPlid() {
197                    return _recentLayoutRevision.getPlid();
198            }
199    
200            /**
201            * Returns the primary key of this recent layout revision.
202            *
203            * @return the primary key of this recent layout revision
204            */
205            @Override
206            public long getPrimaryKey() {
207                    return _recentLayoutRevision.getPrimaryKey();
208            }
209    
210            @Override
211            public Serializable getPrimaryKeyObj() {
212                    return _recentLayoutRevision.getPrimaryKeyObj();
213            }
214    
215            /**
216            * Returns the recent layout revision ID of this recent layout revision.
217            *
218            * @return the recent layout revision ID of this recent layout revision
219            */
220            @Override
221            public long getRecentLayoutRevisionId() {
222                    return _recentLayoutRevision.getRecentLayoutRevisionId();
223            }
224    
225            /**
226            * Returns the user ID of this recent layout revision.
227            *
228            * @return the user ID of this recent layout revision
229            */
230            @Override
231            public long getUserId() {
232                    return _recentLayoutRevision.getUserId();
233            }
234    
235            /**
236            * Returns the user uuid of this recent layout revision.
237            *
238            * @return the user uuid of this recent layout revision
239            */
240            @Override
241            public java.lang.String getUserUuid() {
242                    return _recentLayoutRevision.getUserUuid();
243            }
244    
245            @Override
246            public int hashCode() {
247                    return _recentLayoutRevision.hashCode();
248            }
249    
250            @Override
251            public boolean isCachedModel() {
252                    return _recentLayoutRevision.isCachedModel();
253            }
254    
255            @Override
256            public boolean isEscapedModel() {
257                    return _recentLayoutRevision.isEscapedModel();
258            }
259    
260            @Override
261            public boolean isNew() {
262                    return _recentLayoutRevision.isNew();
263            }
264    
265            @Override
266            public void persist() {
267                    _recentLayoutRevision.persist();
268            }
269    
270            @Override
271            public void setCachedModel(boolean cachedModel) {
272                    _recentLayoutRevision.setCachedModel(cachedModel);
273            }
274    
275            /**
276            * Sets the company ID of this recent layout revision.
277            *
278            * @param companyId the company ID of this recent layout revision
279            */
280            @Override
281            public void setCompanyId(long companyId) {
282                    _recentLayoutRevision.setCompanyId(companyId);
283            }
284    
285            @Override
286            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
287                    _recentLayoutRevision.setExpandoBridgeAttributes(baseModel);
288            }
289    
290            @Override
291            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
292                    _recentLayoutRevision.setExpandoBridgeAttributes(expandoBridge);
293            }
294    
295            @Override
296            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
297                    _recentLayoutRevision.setExpandoBridgeAttributes(serviceContext);
298            }
299    
300            /**
301            * Sets the group ID of this recent layout revision.
302            *
303            * @param groupId the group ID of this recent layout revision
304            */
305            @Override
306            public void setGroupId(long groupId) {
307                    _recentLayoutRevision.setGroupId(groupId);
308            }
309    
310            /**
311            * Sets the layout revision ID of this recent layout revision.
312            *
313            * @param layoutRevisionId the layout revision ID of this recent layout revision
314            */
315            @Override
316            public void setLayoutRevisionId(long layoutRevisionId) {
317                    _recentLayoutRevision.setLayoutRevisionId(layoutRevisionId);
318            }
319    
320            /**
321            * Sets the layout set branch ID of this recent layout revision.
322            *
323            * @param layoutSetBranchId the layout set branch ID of this recent layout revision
324            */
325            @Override
326            public void setLayoutSetBranchId(long layoutSetBranchId) {
327                    _recentLayoutRevision.setLayoutSetBranchId(layoutSetBranchId);
328            }
329    
330            /**
331            * Sets the mvcc version of this recent layout revision.
332            *
333            * @param mvccVersion the mvcc version of this recent layout revision
334            */
335            @Override
336            public void setMvccVersion(long mvccVersion) {
337                    _recentLayoutRevision.setMvccVersion(mvccVersion);
338            }
339    
340            @Override
341            public void setNew(boolean n) {
342                    _recentLayoutRevision.setNew(n);
343            }
344    
345            /**
346            * Sets the plid of this recent layout revision.
347            *
348            * @param plid the plid of this recent layout revision
349            */
350            @Override
351            public void setPlid(long plid) {
352                    _recentLayoutRevision.setPlid(plid);
353            }
354    
355            /**
356            * Sets the primary key of this recent layout revision.
357            *
358            * @param primaryKey the primary key of this recent layout revision
359            */
360            @Override
361            public void setPrimaryKey(long primaryKey) {
362                    _recentLayoutRevision.setPrimaryKey(primaryKey);
363            }
364    
365            @Override
366            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
367                    _recentLayoutRevision.setPrimaryKeyObj(primaryKeyObj);
368            }
369    
370            /**
371            * Sets the recent layout revision ID of this recent layout revision.
372            *
373            * @param recentLayoutRevisionId the recent layout revision ID of this recent layout revision
374            */
375            @Override
376            public void setRecentLayoutRevisionId(long recentLayoutRevisionId) {
377                    _recentLayoutRevision.setRecentLayoutRevisionId(recentLayoutRevisionId);
378            }
379    
380            /**
381            * Sets the user ID of this recent layout revision.
382            *
383            * @param userId the user ID of this recent layout revision
384            */
385            @Override
386            public void setUserId(long userId) {
387                    _recentLayoutRevision.setUserId(userId);
388            }
389    
390            /**
391            * Sets the user uuid of this recent layout revision.
392            *
393            * @param userUuid the user uuid of this recent layout revision
394            */
395            @Override
396            public void setUserUuid(java.lang.String userUuid) {
397                    _recentLayoutRevision.setUserUuid(userUuid);
398            }
399    
400            @Override
401            public CacheModel<com.liferay.portal.kernel.model.RecentLayoutRevision> toCacheModel() {
402                    return _recentLayoutRevision.toCacheModel();
403            }
404    
405            @Override
406            public com.liferay.portal.kernel.model.RecentLayoutRevision toEscapedModel() {
407                    return new RecentLayoutRevisionWrapper(_recentLayoutRevision.toEscapedModel());
408            }
409    
410            @Override
411            public java.lang.String toString() {
412                    return _recentLayoutRevision.toString();
413            }
414    
415            @Override
416            public com.liferay.portal.kernel.model.RecentLayoutRevision toUnescapedModel() {
417                    return new RecentLayoutRevisionWrapper(_recentLayoutRevision.toUnescapedModel());
418            }
419    
420            @Override
421            public java.lang.String toXmlString() {
422                    return _recentLayoutRevision.toXmlString();
423            }
424    
425            @Override
426            public boolean equals(Object obj) {
427                    if (this == obj) {
428                            return true;
429                    }
430    
431                    if (!(obj instanceof RecentLayoutRevisionWrapper)) {
432                            return false;
433                    }
434    
435                    RecentLayoutRevisionWrapper recentLayoutRevisionWrapper = (RecentLayoutRevisionWrapper)obj;
436    
437                    if (Validator.equals(_recentLayoutRevision,
438                                            recentLayoutRevisionWrapper._recentLayoutRevision)) {
439                            return true;
440                    }
441    
442                    return false;
443            }
444    
445            @Override
446            public RecentLayoutRevision getWrappedModel() {
447                    return _recentLayoutRevision;
448            }
449    
450            @Override
451            public boolean isEntityCacheEnabled() {
452                    return _recentLayoutRevision.isEntityCacheEnabled();
453            }
454    
455            @Override
456            public boolean isFinderCacheEnabled() {
457                    return _recentLayoutRevision.isFinderCacheEnabled();
458            }
459    
460            @Override
461            public void resetOriginalValues() {
462                    _recentLayoutRevision.resetOriginalValues();
463            }
464    
465            private final RecentLayoutRevision _recentLayoutRevision;
466    }