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(BaseModel<?> baseModel) {
350                    _layoutBranch.setExpandoBridgeAttributes(baseModel);
351            }
352    
353            @Override
354            public void setExpandoBridgeAttributes(
355                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
356                    _layoutBranch.setExpandoBridgeAttributes(expandoBridge);
357            }
358    
359            @Override
360            public void setExpandoBridgeAttributes(
361                    com.liferay.portal.service.ServiceContext serviceContext) {
362                    _layoutBranch.setExpandoBridgeAttributes(serviceContext);
363            }
364    
365            /**
366            * Sets the group ID of this layout branch.
367            *
368            * @param groupId the group ID of this layout branch
369            */
370            @Override
371            public void setGroupId(long groupId) {
372                    _layoutBranch.setGroupId(groupId);
373            }
374    
375            /**
376            * Sets the layout branch ID of this layout branch.
377            *
378            * @param layoutBranchId the layout branch ID of this layout branch
379            */
380            @Override
381            public void setLayoutBranchId(long layoutBranchId) {
382                    _layoutBranch.setLayoutBranchId(layoutBranchId);
383            }
384    
385            /**
386            * Sets the layout set branch ID of this layout branch.
387            *
388            * @param layoutSetBranchId the layout set branch ID of this layout branch
389            */
390            @Override
391            public void setLayoutSetBranchId(long layoutSetBranchId) {
392                    _layoutBranch.setLayoutSetBranchId(layoutSetBranchId);
393            }
394    
395            /**
396            * Sets whether this layout branch is master.
397            *
398            * @param master the master of this layout branch
399            */
400            @Override
401            public void setMaster(boolean master) {
402                    _layoutBranch.setMaster(master);
403            }
404    
405            /**
406            * Sets the mvcc version of this layout branch.
407            *
408            * @param mvccVersion the mvcc version of this layout branch
409            */
410            @Override
411            public void setMvccVersion(long mvccVersion) {
412                    _layoutBranch.setMvccVersion(mvccVersion);
413            }
414    
415            /**
416            * Sets the name of this layout branch.
417            *
418            * @param name the name of this layout branch
419            */
420            @Override
421            public void setName(java.lang.String name) {
422                    _layoutBranch.setName(name);
423            }
424    
425            @Override
426            public void setNew(boolean n) {
427                    _layoutBranch.setNew(n);
428            }
429    
430            /**
431            * Sets the plid of this layout branch.
432            *
433            * @param plid the plid of this layout branch
434            */
435            @Override
436            public void setPlid(long plid) {
437                    _layoutBranch.setPlid(plid);
438            }
439    
440            /**
441            * Sets the primary key of this layout branch.
442            *
443            * @param primaryKey the primary key of this layout branch
444            */
445            @Override
446            public void setPrimaryKey(long primaryKey) {
447                    _layoutBranch.setPrimaryKey(primaryKey);
448            }
449    
450            @Override
451            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
452                    _layoutBranch.setPrimaryKeyObj(primaryKeyObj);
453            }
454    
455            /**
456            * Sets the user ID of this layout branch.
457            *
458            * @param userId the user ID of this layout branch
459            */
460            @Override
461            public void setUserId(long userId) {
462                    _layoutBranch.setUserId(userId);
463            }
464    
465            /**
466            * Sets the user name of this layout branch.
467            *
468            * @param userName the user name of this layout branch
469            */
470            @Override
471            public void setUserName(java.lang.String userName) {
472                    _layoutBranch.setUserName(userName);
473            }
474    
475            /**
476            * Sets the user uuid of this layout branch.
477            *
478            * @param userUuid the user uuid of this layout branch
479            */
480            @Override
481            public void setUserUuid(java.lang.String userUuid) {
482                    _layoutBranch.setUserUuid(userUuid);
483            }
484    
485            @Override
486            public CacheModel<com.liferay.portal.model.LayoutBranch> toCacheModel() {
487                    return _layoutBranch.toCacheModel();
488            }
489    
490            @Override
491            public com.liferay.portal.model.LayoutBranch toEscapedModel() {
492                    return new LayoutBranchWrapper(_layoutBranch.toEscapedModel());
493            }
494    
495            @Override
496            public java.lang.String toString() {
497                    return _layoutBranch.toString();
498            }
499    
500            @Override
501            public com.liferay.portal.model.LayoutBranch toUnescapedModel() {
502                    return new LayoutBranchWrapper(_layoutBranch.toUnescapedModel());
503            }
504    
505            @Override
506            public java.lang.String toXmlString() {
507                    return _layoutBranch.toXmlString();
508            }
509    
510            @Override
511            public boolean equals(Object obj) {
512                    if (this == obj) {
513                            return true;
514                    }
515    
516                    if (!(obj instanceof LayoutBranchWrapper)) {
517                            return false;
518                    }
519    
520                    LayoutBranchWrapper layoutBranchWrapper = (LayoutBranchWrapper)obj;
521    
522                    if (Validator.equals(_layoutBranch, layoutBranchWrapper._layoutBranch)) {
523                            return true;
524                    }
525    
526                    return false;
527            }
528    
529            @Override
530            public LayoutBranch getWrappedModel() {
531                    return _layoutBranch;
532            }
533    
534            @Override
535            public boolean isEntityCacheEnabled() {
536                    return _layoutBranch.isEntityCacheEnabled();
537            }
538    
539            @Override
540            public boolean isFinderCacheEnabled() {
541                    return _layoutBranch.isFinderCacheEnabled();
542            }
543    
544            @Override
545            public void resetOriginalValues() {
546                    _layoutBranch.resetOriginalValues();
547            }
548    
549            private final LayoutBranch _layoutBranch;
550    }