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