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