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