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