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    import com.liferay.portal.service.ServiceContext;
021    
022    import com.liferay.portlet.expando.model.ExpandoBridge;
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 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 java.lang.Object clone() {
145                    return new LayoutBranchWrapper((LayoutBranch)_layoutBranch.clone());
146            }
147    
148            @Override
149            public int compareTo(com.liferay.portal.model.LayoutBranch layoutBranch) {
150                    return _layoutBranch.compareTo(layoutBranch);
151            }
152    
153            /**
154            * Returns the company ID of this layout branch.
155            *
156            * @return the company ID of this layout branch
157            */
158            @Override
159            public long getCompanyId() {
160                    return _layoutBranch.getCompanyId();
161            }
162    
163            /**
164            * Returns the description of this layout branch.
165            *
166            * @return the description of this layout branch
167            */
168            @Override
169            public java.lang.String getDescription() {
170                    return _layoutBranch.getDescription();
171            }
172    
173            @Override
174            public ExpandoBridge getExpandoBridge() {
175                    return _layoutBranch.getExpandoBridge();
176            }
177    
178            /**
179            * Returns the group ID of this layout branch.
180            *
181            * @return the group ID of this layout branch
182            */
183            @Override
184            public long getGroupId() {
185                    return _layoutBranch.getGroupId();
186            }
187    
188            /**
189            * Returns the layout branch ID of this layout branch.
190            *
191            * @return the layout branch ID of this layout branch
192            */
193            @Override
194            public long getLayoutBranchId() {
195                    return _layoutBranch.getLayoutBranchId();
196            }
197    
198            /**
199            * Returns the layout set branch ID of this layout branch.
200            *
201            * @return the layout set branch ID of this layout branch
202            */
203            @Override
204            public long getLayoutSetBranchId() {
205                    return _layoutBranch.getLayoutSetBranchId();
206            }
207    
208            /**
209            * Returns the master of this layout branch.
210            *
211            * @return the master of this layout branch
212            */
213            @Override
214            public boolean getMaster() {
215                    return _layoutBranch.getMaster();
216            }
217    
218            /**
219            * Returns the mvcc version of this layout branch.
220            *
221            * @return the mvcc version of this layout branch
222            */
223            @Override
224            public long getMvccVersion() {
225                    return _layoutBranch.getMvccVersion();
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 plid of this layout branch.
240            *
241            * @return the plid of this layout branch
242            */
243            @Override
244            public long getPlid() {
245                    return _layoutBranch.getPlid();
246            }
247    
248            /**
249            * Returns the primary key of this layout branch.
250            *
251            * @return the primary key of this layout branch
252            */
253            @Override
254            public long getPrimaryKey() {
255                    return _layoutBranch.getPrimaryKey();
256            }
257    
258            @Override
259            public Serializable getPrimaryKeyObj() {
260                    return _layoutBranch.getPrimaryKeyObj();
261            }
262    
263            /**
264            * Returns the user ID of this layout branch.
265            *
266            * @return the user ID of this layout branch
267            */
268            @Override
269            public long getUserId() {
270                    return _layoutBranch.getUserId();
271            }
272    
273            /**
274            * Returns the user name of this layout branch.
275            *
276            * @return the user name of this layout branch
277            */
278            @Override
279            public java.lang.String getUserName() {
280                    return _layoutBranch.getUserName();
281            }
282    
283            /**
284            * Returns the user uuid of this layout branch.
285            *
286            * @return the user uuid of this layout branch
287            */
288            @Override
289            public java.lang.String getUserUuid() {
290                    return _layoutBranch.getUserUuid();
291            }
292    
293            @Override
294            public int hashCode() {
295                    return _layoutBranch.hashCode();
296            }
297    
298            @Override
299            public boolean isCachedModel() {
300                    return _layoutBranch.isCachedModel();
301            }
302    
303            @Override
304            public boolean isEscapedModel() {
305                    return _layoutBranch.isEscapedModel();
306            }
307    
308            /**
309            * Returns <code>true</code> if this layout branch is master.
310            *
311            * @return <code>true</code> if this layout branch is master; <code>false</code> otherwise
312            */
313            @Override
314            public boolean isMaster() {
315                    return _layoutBranch.isMaster();
316            }
317    
318            @Override
319            public boolean isNew() {
320                    return _layoutBranch.isNew();
321            }
322    
323            @Override
324            public void persist() {
325                    _layoutBranch.persist();
326            }
327    
328            @Override
329            public void setCachedModel(boolean cachedModel) {
330                    _layoutBranch.setCachedModel(cachedModel);
331            }
332    
333            /**
334            * Sets the company ID of this layout branch.
335            *
336            * @param companyId the company ID of this layout branch
337            */
338            @Override
339            public void setCompanyId(long companyId) {
340                    _layoutBranch.setCompanyId(companyId);
341            }
342    
343            /**
344            * Sets the description of this layout branch.
345            *
346            * @param description the description of this layout branch
347            */
348            @Override
349            public void setDescription(java.lang.String description) {
350                    _layoutBranch.setDescription(description);
351            }
352    
353            @Override
354            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
355                    _layoutBranch.setExpandoBridgeAttributes(baseModel);
356            }
357    
358            @Override
359            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
360                    _layoutBranch.setExpandoBridgeAttributes(expandoBridge);
361            }
362    
363            @Override
364            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
365                    _layoutBranch.setExpandoBridgeAttributes(serviceContext);
366            }
367    
368            /**
369            * Sets the group ID of this layout branch.
370            *
371            * @param groupId the group ID of this layout branch
372            */
373            @Override
374            public void setGroupId(long groupId) {
375                    _layoutBranch.setGroupId(groupId);
376            }
377    
378            /**
379            * Sets the layout branch ID of this layout branch.
380            *
381            * @param layoutBranchId the layout branch ID of this layout branch
382            */
383            @Override
384            public void setLayoutBranchId(long layoutBranchId) {
385                    _layoutBranch.setLayoutBranchId(layoutBranchId);
386            }
387    
388            /**
389            * Sets the layout set branch ID of this layout branch.
390            *
391            * @param layoutSetBranchId the layout set branch ID of this layout branch
392            */
393            @Override
394            public void setLayoutSetBranchId(long layoutSetBranchId) {
395                    _layoutBranch.setLayoutSetBranchId(layoutSetBranchId);
396            }
397    
398            /**
399            * Sets whether this layout branch is master.
400            *
401            * @param master the master of this layout branch
402            */
403            @Override
404            public void setMaster(boolean master) {
405                    _layoutBranch.setMaster(master);
406            }
407    
408            /**
409            * Sets the mvcc version of this layout branch.
410            *
411            * @param mvccVersion the mvcc version of this layout branch
412            */
413            @Override
414            public void setMvccVersion(long mvccVersion) {
415                    _layoutBranch.setMvccVersion(mvccVersion);
416            }
417    
418            /**
419            * Sets the name of this layout branch.
420            *
421            * @param name the name of this layout branch
422            */
423            @Override
424            public void setName(java.lang.String name) {
425                    _layoutBranch.setName(name);
426            }
427    
428            @Override
429            public void setNew(boolean n) {
430                    _layoutBranch.setNew(n);
431            }
432    
433            /**
434            * Sets the plid of this layout branch.
435            *
436            * @param plid the plid of this layout branch
437            */
438            @Override
439            public void setPlid(long plid) {
440                    _layoutBranch.setPlid(plid);
441            }
442    
443            /**
444            * Sets the primary key of this layout branch.
445            *
446            * @param primaryKey the primary key of this layout branch
447            */
448            @Override
449            public void setPrimaryKey(long primaryKey) {
450                    _layoutBranch.setPrimaryKey(primaryKey);
451            }
452    
453            @Override
454            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
455                    _layoutBranch.setPrimaryKeyObj(primaryKeyObj);
456            }
457    
458            /**
459            * Sets the user ID of this layout branch.
460            *
461            * @param userId the user ID of this layout branch
462            */
463            @Override
464            public void setUserId(long userId) {
465                    _layoutBranch.setUserId(userId);
466            }
467    
468            /**
469            * Sets the user name of this layout branch.
470            *
471            * @param userName the user name of this layout branch
472            */
473            @Override
474            public void setUserName(java.lang.String userName) {
475                    _layoutBranch.setUserName(userName);
476            }
477    
478            /**
479            * Sets the user uuid of this layout branch.
480            *
481            * @param userUuid the user uuid of this layout branch
482            */
483            @Override
484            public void setUserUuid(java.lang.String userUuid) {
485                    _layoutBranch.setUserUuid(userUuid);
486            }
487    
488            @Override
489            public CacheModel<com.liferay.portal.model.LayoutBranch> toCacheModel() {
490                    return _layoutBranch.toCacheModel();
491            }
492    
493            @Override
494            public com.liferay.portal.model.LayoutBranch toEscapedModel() {
495                    return new LayoutBranchWrapper(_layoutBranch.toEscapedModel());
496            }
497    
498            @Override
499            public java.lang.String toString() {
500                    return _layoutBranch.toString();
501            }
502    
503            @Override
504            public com.liferay.portal.model.LayoutBranch toUnescapedModel() {
505                    return new LayoutBranchWrapper(_layoutBranch.toUnescapedModel());
506            }
507    
508            @Override
509            public java.lang.String toXmlString() {
510                    return _layoutBranch.toXmlString();
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 (Validator.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    }