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