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