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