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