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