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