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 Organization}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       Organization
029     * @generated
030     */
031    public class OrganizationWrapper implements Organization,
032            ModelWrapper<Organization> {
033            public OrganizationWrapper(Organization organization) {
034                    _organization = organization;
035            }
036    
037            public Class<?> getModelClass() {
038                    return Organization.class;
039            }
040    
041            public String getModelClassName() {
042                    return Organization.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("organizationId", getOrganizationId());
049                    attributes.put("companyId", getCompanyId());
050                    attributes.put("parentOrganizationId", getParentOrganizationId());
051                    attributes.put("treePath", getTreePath());
052                    attributes.put("name", getName());
053                    attributes.put("type", getType());
054                    attributes.put("recursable", getRecursable());
055                    attributes.put("regionId", getRegionId());
056                    attributes.put("countryId", getCountryId());
057                    attributes.put("statusId", getStatusId());
058                    attributes.put("comments", getComments());
059    
060                    return attributes;
061            }
062    
063            public void setModelAttributes(Map<String, Object> attributes) {
064                    Long organizationId = (Long)attributes.get("organizationId");
065    
066                    if (organizationId != null) {
067                            setOrganizationId(organizationId);
068                    }
069    
070                    Long companyId = (Long)attributes.get("companyId");
071    
072                    if (companyId != null) {
073                            setCompanyId(companyId);
074                    }
075    
076                    Long parentOrganizationId = (Long)attributes.get("parentOrganizationId");
077    
078                    if (parentOrganizationId != null) {
079                            setParentOrganizationId(parentOrganizationId);
080                    }
081    
082                    String treePath = (String)attributes.get("treePath");
083    
084                    if (treePath != null) {
085                            setTreePath(treePath);
086                    }
087    
088                    String name = (String)attributes.get("name");
089    
090                    if (name != null) {
091                            setName(name);
092                    }
093    
094                    String type = (String)attributes.get("type");
095    
096                    if (type != null) {
097                            setType(type);
098                    }
099    
100                    Boolean recursable = (Boolean)attributes.get("recursable");
101    
102                    if (recursable != null) {
103                            setRecursable(recursable);
104                    }
105    
106                    Long regionId = (Long)attributes.get("regionId");
107    
108                    if (regionId != null) {
109                            setRegionId(regionId);
110                    }
111    
112                    Long countryId = (Long)attributes.get("countryId");
113    
114                    if (countryId != null) {
115                            setCountryId(countryId);
116                    }
117    
118                    Integer statusId = (Integer)attributes.get("statusId");
119    
120                    if (statusId != null) {
121                            setStatusId(statusId);
122                    }
123    
124                    String comments = (String)attributes.get("comments");
125    
126                    if (comments != null) {
127                            setComments(comments);
128                    }
129            }
130    
131            /**
132            * Returns the primary key of this organization.
133            *
134            * @return the primary key of this organization
135            */
136            public long getPrimaryKey() {
137                    return _organization.getPrimaryKey();
138            }
139    
140            /**
141            * Sets the primary key of this organization.
142            *
143            * @param primaryKey the primary key of this organization
144            */
145            public void setPrimaryKey(long primaryKey) {
146                    _organization.setPrimaryKey(primaryKey);
147            }
148    
149            /**
150            * Returns the organization ID of this organization.
151            *
152            * @return the organization ID of this organization
153            */
154            public long getOrganizationId() {
155                    return _organization.getOrganizationId();
156            }
157    
158            /**
159            * Sets the organization ID of this organization.
160            *
161            * @param organizationId the organization ID of this organization
162            */
163            public void setOrganizationId(long organizationId) {
164                    _organization.setOrganizationId(organizationId);
165            }
166    
167            /**
168            * Returns the company ID of this organization.
169            *
170            * @return the company ID of this organization
171            */
172            public long getCompanyId() {
173                    return _organization.getCompanyId();
174            }
175    
176            /**
177            * Sets the company ID of this organization.
178            *
179            * @param companyId the company ID of this organization
180            */
181            public void setCompanyId(long companyId) {
182                    _organization.setCompanyId(companyId);
183            }
184    
185            /**
186            * Returns the parent organization ID of this organization.
187            *
188            * @return the parent organization ID of this organization
189            */
190            public long getParentOrganizationId() {
191                    return _organization.getParentOrganizationId();
192            }
193    
194            /**
195            * Sets the parent organization ID of this organization.
196            *
197            * @param parentOrganizationId the parent organization ID of this organization
198            */
199            public void setParentOrganizationId(long parentOrganizationId) {
200                    _organization.setParentOrganizationId(parentOrganizationId);
201            }
202    
203            /**
204            * Returns the tree path of this organization.
205            *
206            * @return the tree path of this organization
207            */
208            public java.lang.String getTreePath() {
209                    return _organization.getTreePath();
210            }
211    
212            /**
213            * Sets the tree path of this organization.
214            *
215            * @param treePath the tree path of this organization
216            */
217            public void setTreePath(java.lang.String treePath) {
218                    _organization.setTreePath(treePath);
219            }
220    
221            /**
222            * Returns the name of this organization.
223            *
224            * @return the name of this organization
225            */
226            public java.lang.String getName() {
227                    return _organization.getName();
228            }
229    
230            /**
231            * Sets the name of this organization.
232            *
233            * @param name the name of this organization
234            */
235            public void setName(java.lang.String name) {
236                    _organization.setName(name);
237            }
238    
239            /**
240            * Returns the type of this organization.
241            *
242            * @return the type of this organization
243            */
244            public java.lang.String getType() {
245                    return _organization.getType();
246            }
247    
248            /**
249            * Sets the type of this organization.
250            *
251            * @param type the type of this organization
252            */
253            public void setType(java.lang.String type) {
254                    _organization.setType(type);
255            }
256    
257            /**
258            * Returns the recursable of this organization.
259            *
260            * @return the recursable of this organization
261            */
262            public boolean getRecursable() {
263                    return _organization.getRecursable();
264            }
265    
266            /**
267            * Returns <code>true</code> if this organization is recursable.
268            *
269            * @return <code>true</code> if this organization is recursable; <code>false</code> otherwise
270            */
271            public boolean isRecursable() {
272                    return _organization.isRecursable();
273            }
274    
275            /**
276            * Sets whether this organization is recursable.
277            *
278            * @param recursable the recursable of this organization
279            */
280            public void setRecursable(boolean recursable) {
281                    _organization.setRecursable(recursable);
282            }
283    
284            /**
285            * Returns the region ID of this organization.
286            *
287            * @return the region ID of this organization
288            */
289            public long getRegionId() {
290                    return _organization.getRegionId();
291            }
292    
293            /**
294            * Sets the region ID of this organization.
295            *
296            * @param regionId the region ID of this organization
297            */
298            public void setRegionId(long regionId) {
299                    _organization.setRegionId(regionId);
300            }
301    
302            /**
303            * Returns the country ID of this organization.
304            *
305            * @return the country ID of this organization
306            */
307            public long getCountryId() {
308                    return _organization.getCountryId();
309            }
310    
311            /**
312            * Sets the country ID of this organization.
313            *
314            * @param countryId the country ID of this organization
315            */
316            public void setCountryId(long countryId) {
317                    _organization.setCountryId(countryId);
318            }
319    
320            /**
321            * Returns the status ID of this organization.
322            *
323            * @return the status ID of this organization
324            */
325            public int getStatusId() {
326                    return _organization.getStatusId();
327            }
328    
329            /**
330            * Sets the status ID of this organization.
331            *
332            * @param statusId the status ID of this organization
333            */
334            public void setStatusId(int statusId) {
335                    _organization.setStatusId(statusId);
336            }
337    
338            /**
339            * Returns the comments of this organization.
340            *
341            * @return the comments of this organization
342            */
343            public java.lang.String getComments() {
344                    return _organization.getComments();
345            }
346    
347            /**
348            * Sets the comments of this organization.
349            *
350            * @param comments the comments of this organization
351            */
352            public void setComments(java.lang.String comments) {
353                    _organization.setComments(comments);
354            }
355    
356            public boolean isNew() {
357                    return _organization.isNew();
358            }
359    
360            public void setNew(boolean n) {
361                    _organization.setNew(n);
362            }
363    
364            public boolean isCachedModel() {
365                    return _organization.isCachedModel();
366            }
367    
368            public void setCachedModel(boolean cachedModel) {
369                    _organization.setCachedModel(cachedModel);
370            }
371    
372            public boolean isEscapedModel() {
373                    return _organization.isEscapedModel();
374            }
375    
376            public java.io.Serializable getPrimaryKeyObj() {
377                    return _organization.getPrimaryKeyObj();
378            }
379    
380            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
381                    _organization.setPrimaryKeyObj(primaryKeyObj);
382            }
383    
384            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
385                    return _organization.getExpandoBridge();
386            }
387    
388            public void setExpandoBridgeAttributes(
389                    com.liferay.portal.service.ServiceContext serviceContext) {
390                    _organization.setExpandoBridgeAttributes(serviceContext);
391            }
392    
393            @Override
394            public java.lang.Object clone() {
395                    return new OrganizationWrapper((Organization)_organization.clone());
396            }
397    
398            public int compareTo(com.liferay.portal.model.Organization organization) {
399                    return _organization.compareTo(organization);
400            }
401    
402            @Override
403            public int hashCode() {
404                    return _organization.hashCode();
405            }
406    
407            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Organization> toCacheModel() {
408                    return _organization.toCacheModel();
409            }
410    
411            public com.liferay.portal.model.Organization toEscapedModel() {
412                    return new OrganizationWrapper(_organization.toEscapedModel());
413            }
414    
415            public com.liferay.portal.model.Organization toUnescapedModel() {
416                    return new OrganizationWrapper(_organization.toUnescapedModel());
417            }
418    
419            @Override
420            public java.lang.String toString() {
421                    return _organization.toString();
422            }
423    
424            public java.lang.String toXmlString() {
425                    return _organization.toXmlString();
426            }
427    
428            public void persist()
429                    throws com.liferay.portal.kernel.exception.SystemException {
430                    _organization.persist();
431            }
432    
433            public java.lang.String buildTreePath()
434                    throws com.liferay.portal.kernel.exception.PortalException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    return _organization.buildTreePath();
437            }
438    
439            public com.liferay.portal.model.Address getAddress() {
440                    return _organization.getAddress();
441            }
442    
443            public java.util.List<com.liferay.portal.model.Address> getAddresses()
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return _organization.getAddresses();
446            }
447    
448            public java.util.List<com.liferay.portal.model.Organization> getAncestors()
449                    throws com.liferay.portal.kernel.exception.PortalException,
450                            com.liferay.portal.kernel.exception.SystemException {
451                    return _organization.getAncestors();
452            }
453    
454            public java.lang.String[] getChildrenTypes() {
455                    return _organization.getChildrenTypes();
456            }
457    
458            public java.util.List<com.liferay.portal.model.Organization> getDescendants()
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return _organization.getDescendants();
461            }
462    
463            public com.liferay.portal.model.Group getGroup() {
464                    return _organization.getGroup();
465            }
466    
467            public long getGroupId() {
468                    return _organization.getGroupId();
469            }
470    
471            public long getLogoId() {
472                    return _organization.getLogoId();
473            }
474    
475            public com.liferay.portal.model.Organization getParentOrganization()
476                    throws com.liferay.portal.kernel.exception.PortalException,
477                            com.liferay.portal.kernel.exception.SystemException {
478                    return _organization.getParentOrganization();
479            }
480    
481            public javax.portlet.PortletPreferences getPreferences()
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return _organization.getPreferences();
484            }
485    
486            public int getPrivateLayoutsPageCount() {
487                    return _organization.getPrivateLayoutsPageCount();
488            }
489    
490            public int getPublicLayoutsPageCount() {
491                    return _organization.getPublicLayoutsPageCount();
492            }
493    
494            public java.util.Set<java.lang.String> getReminderQueryQuestions(
495                    java.util.Locale locale)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return _organization.getReminderQueryQuestions(locale);
498            }
499    
500            public java.util.Set<java.lang.String> getReminderQueryQuestions(
501                    java.lang.String languageId)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return _organization.getReminderQueryQuestions(languageId);
504            }
505    
506            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations()
507                    throws com.liferay.portal.kernel.exception.SystemException {
508                    return _organization.getSuborganizations();
509            }
510    
511            public int getSuborganizationsSize()
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    return _organization.getSuborganizationsSize();
514            }
515    
516            public int getTypeOrder() {
517                    return _organization.getTypeOrder();
518            }
519    
520            public boolean hasPrivateLayouts() {
521                    return _organization.hasPrivateLayouts();
522            }
523    
524            public boolean hasPublicLayouts() {
525                    return _organization.hasPublicLayouts();
526            }
527    
528            public boolean hasSuborganizations()
529                    throws com.liferay.portal.kernel.exception.SystemException {
530                    return _organization.hasSuborganizations();
531            }
532    
533            public boolean isParentable() {
534                    return _organization.isParentable();
535            }
536    
537            public boolean isRoot() {
538                    return _organization.isRoot();
539            }
540    
541            @Override
542            public boolean equals(Object obj) {
543                    if (this == obj) {
544                            return true;
545                    }
546    
547                    if (!(obj instanceof OrganizationWrapper)) {
548                            return false;
549                    }
550    
551                    OrganizationWrapper organizationWrapper = (OrganizationWrapper)obj;
552    
553                    if (Validator.equals(_organization, organizationWrapper._organization)) {
554                            return true;
555                    }
556    
557                    return false;
558            }
559    
560            /**
561             * @deprecated Renamed to {@link #getWrappedModel}
562             */
563            public Organization getWrappedOrganization() {
564                    return _organization;
565            }
566    
567            public Organization getWrappedModel() {
568                    return _organization;
569            }
570    
571            public void resetOriginalValues() {
572                    _organization.resetOriginalValues();
573            }
574    
575            private Organization _organization;
576    }