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