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