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.lar.StagedModelType;
018    import com.liferay.portal.kernel.util.Validator;
019    
020    import java.util.Date;
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link Organization}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see Organization
031     * @generated
032     */
033    public class OrganizationWrapper implements Organization,
034            ModelWrapper<Organization> {
035            public OrganizationWrapper(Organization organization) {
036                    _organization = organization;
037            }
038    
039            @Override
040            public Class<?> getModelClass() {
041                    return Organization.class;
042            }
043    
044            @Override
045            public String getModelClassName() {
046                    return Organization.class.getName();
047            }
048    
049            @Override
050            public Map<String, Object> getModelAttributes() {
051                    Map<String, Object> attributes = new HashMap<String, Object>();
052    
053                    attributes.put("uuid", getUuid());
054                    attributes.put("organizationId", getOrganizationId());
055                    attributes.put("companyId", getCompanyId());
056                    attributes.put("userId", getUserId());
057                    attributes.put("userName", getUserName());
058                    attributes.put("createDate", getCreateDate());
059                    attributes.put("modifiedDate", getModifiedDate());
060                    attributes.put("parentOrganizationId", getParentOrganizationId());
061                    attributes.put("treePath", getTreePath());
062                    attributes.put("name", getName());
063                    attributes.put("type", getType());
064                    attributes.put("recursable", getRecursable());
065                    attributes.put("regionId", getRegionId());
066                    attributes.put("countryId", getCountryId());
067                    attributes.put("statusId", getStatusId());
068                    attributes.put("comments", getComments());
069    
070                    return attributes;
071            }
072    
073            @Override
074            public void setModelAttributes(Map<String, Object> attributes) {
075                    String uuid = (String)attributes.get("uuid");
076    
077                    if (uuid != null) {
078                            setUuid(uuid);
079                    }
080    
081                    Long organizationId = (Long)attributes.get("organizationId");
082    
083                    if (organizationId != null) {
084                            setOrganizationId(organizationId);
085                    }
086    
087                    Long companyId = (Long)attributes.get("companyId");
088    
089                    if (companyId != null) {
090                            setCompanyId(companyId);
091                    }
092    
093                    Long userId = (Long)attributes.get("userId");
094    
095                    if (userId != null) {
096                            setUserId(userId);
097                    }
098    
099                    String userName = (String)attributes.get("userName");
100    
101                    if (userName != null) {
102                            setUserName(userName);
103                    }
104    
105                    Date createDate = (Date)attributes.get("createDate");
106    
107                    if (createDate != null) {
108                            setCreateDate(createDate);
109                    }
110    
111                    Date modifiedDate = (Date)attributes.get("modifiedDate");
112    
113                    if (modifiedDate != null) {
114                            setModifiedDate(modifiedDate);
115                    }
116    
117                    Long parentOrganizationId = (Long)attributes.get("parentOrganizationId");
118    
119                    if (parentOrganizationId != null) {
120                            setParentOrganizationId(parentOrganizationId);
121                    }
122    
123                    String treePath = (String)attributes.get("treePath");
124    
125                    if (treePath != null) {
126                            setTreePath(treePath);
127                    }
128    
129                    String name = (String)attributes.get("name");
130    
131                    if (name != null) {
132                            setName(name);
133                    }
134    
135                    String type = (String)attributes.get("type");
136    
137                    if (type != null) {
138                            setType(type);
139                    }
140    
141                    Boolean recursable = (Boolean)attributes.get("recursable");
142    
143                    if (recursable != null) {
144                            setRecursable(recursable);
145                    }
146    
147                    Long regionId = (Long)attributes.get("regionId");
148    
149                    if (regionId != null) {
150                            setRegionId(regionId);
151                    }
152    
153                    Long countryId = (Long)attributes.get("countryId");
154    
155                    if (countryId != null) {
156                            setCountryId(countryId);
157                    }
158    
159                    Integer statusId = (Integer)attributes.get("statusId");
160    
161                    if (statusId != null) {
162                            setStatusId(statusId);
163                    }
164    
165                    String comments = (String)attributes.get("comments");
166    
167                    if (comments != null) {
168                            setComments(comments);
169                    }
170            }
171    
172            /**
173            * Returns the primary key of this organization.
174            *
175            * @return the primary key of this organization
176            */
177            @Override
178            public long getPrimaryKey() {
179                    return _organization.getPrimaryKey();
180            }
181    
182            /**
183            * Sets the primary key of this organization.
184            *
185            * @param primaryKey the primary key of this organization
186            */
187            @Override
188            public void setPrimaryKey(long primaryKey) {
189                    _organization.setPrimaryKey(primaryKey);
190            }
191    
192            /**
193            * Returns the uuid of this organization.
194            *
195            * @return the uuid of this organization
196            */
197            @Override
198            public java.lang.String getUuid() {
199                    return _organization.getUuid();
200            }
201    
202            /**
203            * Sets the uuid of this organization.
204            *
205            * @param uuid the uuid of this organization
206            */
207            @Override
208            public void setUuid(java.lang.String uuid) {
209                    _organization.setUuid(uuid);
210            }
211    
212            /**
213            * Returns the organization ID of this organization.
214            *
215            * @return the organization ID of this organization
216            */
217            @Override
218            public long getOrganizationId() {
219                    return _organization.getOrganizationId();
220            }
221    
222            /**
223            * Sets the organization ID of this organization.
224            *
225            * @param organizationId the organization ID of this organization
226            */
227            @Override
228            public void setOrganizationId(long organizationId) {
229                    _organization.setOrganizationId(organizationId);
230            }
231    
232            /**
233            * Returns the company ID of this organization.
234            *
235            * @return the company ID of this organization
236            */
237            @Override
238            public long getCompanyId() {
239                    return _organization.getCompanyId();
240            }
241    
242            /**
243            * Sets the company ID of this organization.
244            *
245            * @param companyId the company ID of this organization
246            */
247            @Override
248            public void setCompanyId(long companyId) {
249                    _organization.setCompanyId(companyId);
250            }
251    
252            /**
253            * Returns the user ID of this organization.
254            *
255            * @return the user ID of this organization
256            */
257            @Override
258            public long getUserId() {
259                    return _organization.getUserId();
260            }
261    
262            /**
263            * Sets the user ID of this organization.
264            *
265            * @param userId the user ID of this organization
266            */
267            @Override
268            public void setUserId(long userId) {
269                    _organization.setUserId(userId);
270            }
271    
272            /**
273            * Returns the user uuid of this organization.
274            *
275            * @return the user uuid of this organization
276            * @throws SystemException if a system exception occurred
277            */
278            @Override
279            public java.lang.String getUserUuid()
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return _organization.getUserUuid();
282            }
283    
284            /**
285            * Sets the user uuid of this organization.
286            *
287            * @param userUuid the user uuid of this organization
288            */
289            @Override
290            public void setUserUuid(java.lang.String userUuid) {
291                    _organization.setUserUuid(userUuid);
292            }
293    
294            /**
295            * Returns the user name of this organization.
296            *
297            * @return the user name of this organization
298            */
299            @Override
300            public java.lang.String getUserName() {
301                    return _organization.getUserName();
302            }
303    
304            /**
305            * Sets the user name of this organization.
306            *
307            * @param userName the user name of this organization
308            */
309            @Override
310            public void setUserName(java.lang.String userName) {
311                    _organization.setUserName(userName);
312            }
313    
314            /**
315            * Returns the create date of this organization.
316            *
317            * @return the create date of this organization
318            */
319            @Override
320            public java.util.Date getCreateDate() {
321                    return _organization.getCreateDate();
322            }
323    
324            /**
325            * Sets the create date of this organization.
326            *
327            * @param createDate the create date of this organization
328            */
329            @Override
330            public void setCreateDate(java.util.Date createDate) {
331                    _organization.setCreateDate(createDate);
332            }
333    
334            /**
335            * Returns the modified date of this organization.
336            *
337            * @return the modified date of this organization
338            */
339            @Override
340            public java.util.Date getModifiedDate() {
341                    return _organization.getModifiedDate();
342            }
343    
344            /**
345            * Sets the modified date of this organization.
346            *
347            * @param modifiedDate the modified date of this organization
348            */
349            @Override
350            public void setModifiedDate(java.util.Date modifiedDate) {
351                    _organization.setModifiedDate(modifiedDate);
352            }
353    
354            /**
355            * Returns the parent organization ID of this organization.
356            *
357            * @return the parent organization ID of this organization
358            */
359            @Override
360            public long getParentOrganizationId() {
361                    return _organization.getParentOrganizationId();
362            }
363    
364            /**
365            * Sets the parent organization ID of this organization.
366            *
367            * @param parentOrganizationId the parent organization ID of this organization
368            */
369            @Override
370            public void setParentOrganizationId(long parentOrganizationId) {
371                    _organization.setParentOrganizationId(parentOrganizationId);
372            }
373    
374            /**
375            * Returns the tree path of this organization.
376            *
377            * @return the tree path of this organization
378            */
379            @Override
380            public java.lang.String getTreePath() {
381                    return _organization.getTreePath();
382            }
383    
384            /**
385            * Sets the tree path of this organization.
386            *
387            * @param treePath the tree path of this organization
388            */
389            @Override
390            public void setTreePath(java.lang.String treePath) {
391                    _organization.setTreePath(treePath);
392            }
393    
394            /**
395            * Returns the name of this organization.
396            *
397            * @return the name of this organization
398            */
399            @Override
400            public java.lang.String getName() {
401                    return _organization.getName();
402            }
403    
404            /**
405            * Sets the name of this organization.
406            *
407            * @param name the name of this organization
408            */
409            @Override
410            public void setName(java.lang.String name) {
411                    _organization.setName(name);
412            }
413    
414            /**
415            * Returns the type of this organization.
416            *
417            * @return the type of this organization
418            */
419            @Override
420            public java.lang.String getType() {
421                    return _organization.getType();
422            }
423    
424            /**
425            * Sets the type of this organization.
426            *
427            * @param type the type of this organization
428            */
429            @Override
430            public void setType(java.lang.String type) {
431                    _organization.setType(type);
432            }
433    
434            /**
435            * Returns the recursable of this organization.
436            *
437            * @return the recursable of this organization
438            */
439            @Override
440            public boolean getRecursable() {
441                    return _organization.getRecursable();
442            }
443    
444            /**
445            * Returns <code>true</code> if this organization is recursable.
446            *
447            * @return <code>true</code> if this organization is recursable; <code>false</code> otherwise
448            */
449            @Override
450            public boolean isRecursable() {
451                    return _organization.isRecursable();
452            }
453    
454            /**
455            * Sets whether this organization is recursable.
456            *
457            * @param recursable the recursable of this organization
458            */
459            @Override
460            public void setRecursable(boolean recursable) {
461                    _organization.setRecursable(recursable);
462            }
463    
464            /**
465            * Returns the region ID of this organization.
466            *
467            * @return the region ID of this organization
468            */
469            @Override
470            public long getRegionId() {
471                    return _organization.getRegionId();
472            }
473    
474            /**
475            * Sets the region ID of this organization.
476            *
477            * @param regionId the region ID of this organization
478            */
479            @Override
480            public void setRegionId(long regionId) {
481                    _organization.setRegionId(regionId);
482            }
483    
484            /**
485            * Returns the country ID of this organization.
486            *
487            * @return the country ID of this organization
488            */
489            @Override
490            public long getCountryId() {
491                    return _organization.getCountryId();
492            }
493    
494            /**
495            * Sets the country ID of this organization.
496            *
497            * @param countryId the country ID of this organization
498            */
499            @Override
500            public void setCountryId(long countryId) {
501                    _organization.setCountryId(countryId);
502            }
503    
504            /**
505            * Returns the status ID of this organization.
506            *
507            * @return the status ID of this organization
508            */
509            @Override
510            public int getStatusId() {
511                    return _organization.getStatusId();
512            }
513    
514            /**
515            * Sets the status ID of this organization.
516            *
517            * @param statusId the status ID of this organization
518            */
519            @Override
520            public void setStatusId(int statusId) {
521                    _organization.setStatusId(statusId);
522            }
523    
524            /**
525            * Returns the comments of this organization.
526            *
527            * @return the comments of this organization
528            */
529            @Override
530            public java.lang.String getComments() {
531                    return _organization.getComments();
532            }
533    
534            /**
535            * Sets the comments of this organization.
536            *
537            * @param comments the comments of this organization
538            */
539            @Override
540            public void setComments(java.lang.String comments) {
541                    _organization.setComments(comments);
542            }
543    
544            @Override
545            public boolean isNew() {
546                    return _organization.isNew();
547            }
548    
549            @Override
550            public void setNew(boolean n) {
551                    _organization.setNew(n);
552            }
553    
554            @Override
555            public boolean isCachedModel() {
556                    return _organization.isCachedModel();
557            }
558    
559            @Override
560            public void setCachedModel(boolean cachedModel) {
561                    _organization.setCachedModel(cachedModel);
562            }
563    
564            @Override
565            public boolean isEscapedModel() {
566                    return _organization.isEscapedModel();
567            }
568    
569            @Override
570            public java.io.Serializable getPrimaryKeyObj() {
571                    return _organization.getPrimaryKeyObj();
572            }
573    
574            @Override
575            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
576                    _organization.setPrimaryKeyObj(primaryKeyObj);
577            }
578    
579            @Override
580            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
581                    return _organization.getExpandoBridge();
582            }
583    
584            @Override
585            public void setExpandoBridgeAttributes(
586                    com.liferay.portal.model.BaseModel<?> baseModel) {
587                    _organization.setExpandoBridgeAttributes(baseModel);
588            }
589    
590            @Override
591            public void setExpandoBridgeAttributes(
592                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
593                    _organization.setExpandoBridgeAttributes(expandoBridge);
594            }
595    
596            @Override
597            public void setExpandoBridgeAttributes(
598                    com.liferay.portal.service.ServiceContext serviceContext) {
599                    _organization.setExpandoBridgeAttributes(serviceContext);
600            }
601    
602            @Override
603            public java.lang.Object clone() {
604                    return new OrganizationWrapper((Organization)_organization.clone());
605            }
606    
607            @Override
608            public int compareTo(com.liferay.portal.model.Organization organization) {
609                    return _organization.compareTo(organization);
610            }
611    
612            @Override
613            public int hashCode() {
614                    return _organization.hashCode();
615            }
616    
617            @Override
618            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Organization> toCacheModel() {
619                    return _organization.toCacheModel();
620            }
621    
622            @Override
623            public com.liferay.portal.model.Organization toEscapedModel() {
624                    return new OrganizationWrapper(_organization.toEscapedModel());
625            }
626    
627            @Override
628            public com.liferay.portal.model.Organization toUnescapedModel() {
629                    return new OrganizationWrapper(_organization.toUnescapedModel());
630            }
631    
632            @Override
633            public java.lang.String toString() {
634                    return _organization.toString();
635            }
636    
637            @Override
638            public java.lang.String toXmlString() {
639                    return _organization.toXmlString();
640            }
641    
642            @Override
643            public void persist()
644                    throws com.liferay.portal.kernel.exception.SystemException {
645                    _organization.persist();
646            }
647    
648            @Override
649            public java.lang.String buildTreePath()
650                    throws com.liferay.portal.kernel.exception.PortalException,
651                            com.liferay.portal.kernel.exception.SystemException {
652                    return _organization.buildTreePath();
653            }
654    
655            @Override
656            public com.liferay.portal.model.Address getAddress() {
657                    return _organization.getAddress();
658            }
659    
660            @Override
661            public java.util.List<com.liferay.portal.model.Address> getAddresses()
662                    throws com.liferay.portal.kernel.exception.SystemException {
663                    return _organization.getAddresses();
664            }
665    
666            @Override
667            public java.util.List<com.liferay.portal.model.Organization> getAncestors()
668                    throws com.liferay.portal.kernel.exception.PortalException,
669                            com.liferay.portal.kernel.exception.SystemException {
670                    return _organization.getAncestors();
671            }
672    
673            @Override
674            public java.lang.String[] getChildrenTypes() {
675                    return _organization.getChildrenTypes();
676            }
677    
678            @Override
679            public java.util.List<com.liferay.portal.model.Organization> getDescendants()
680                    throws com.liferay.portal.kernel.exception.SystemException {
681                    return _organization.getDescendants();
682            }
683    
684            @Override
685            public com.liferay.portal.model.Group getGroup() {
686                    return _organization.getGroup();
687            }
688    
689            @Override
690            public long getGroupId() {
691                    return _organization.getGroupId();
692            }
693    
694            @Override
695            public long getLogoId() {
696                    return _organization.getLogoId();
697            }
698    
699            @Override
700            public com.liferay.portal.model.Organization getParentOrganization()
701                    throws com.liferay.portal.kernel.exception.PortalException,
702                            com.liferay.portal.kernel.exception.SystemException {
703                    return _organization.getParentOrganization();
704            }
705    
706            @Override
707            public javax.portlet.PortletPreferences getPreferences()
708                    throws com.liferay.portal.kernel.exception.SystemException {
709                    return _organization.getPreferences();
710            }
711    
712            @Override
713            public int getPrivateLayoutsPageCount() {
714                    return _organization.getPrivateLayoutsPageCount();
715            }
716    
717            @Override
718            public int getPublicLayoutsPageCount() {
719                    return _organization.getPublicLayoutsPageCount();
720            }
721    
722            @Override
723            public java.util.Set<java.lang.String> getReminderQueryQuestions(
724                    java.util.Locale locale)
725                    throws com.liferay.portal.kernel.exception.SystemException {
726                    return _organization.getReminderQueryQuestions(locale);
727            }
728    
729            @Override
730            public java.util.Set<java.lang.String> getReminderQueryQuestions(
731                    java.lang.String languageId)
732                    throws com.liferay.portal.kernel.exception.SystemException {
733                    return _organization.getReminderQueryQuestions(languageId);
734            }
735    
736            @Override
737            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations()
738                    throws com.liferay.portal.kernel.exception.SystemException {
739                    return _organization.getSuborganizations();
740            }
741    
742            @Override
743            public int getSuborganizationsSize()
744                    throws com.liferay.portal.kernel.exception.SystemException {
745                    return _organization.getSuborganizationsSize();
746            }
747    
748            @Override
749            public int getTypeOrder() {
750                    return _organization.getTypeOrder();
751            }
752    
753            @Override
754            public boolean hasPrivateLayouts() {
755                    return _organization.hasPrivateLayouts();
756            }
757    
758            @Override
759            public boolean hasPublicLayouts() {
760                    return _organization.hasPublicLayouts();
761            }
762    
763            @Override
764            public boolean hasSuborganizations()
765                    throws com.liferay.portal.kernel.exception.SystemException {
766                    return _organization.hasSuborganizations();
767            }
768    
769            @Override
770            public boolean isParentable() {
771                    return _organization.isParentable();
772            }
773    
774            @Override
775            public boolean isRoot() {
776                    return _organization.isRoot();
777            }
778    
779            @Override
780            public boolean equals(Object obj) {
781                    if (this == obj) {
782                            return true;
783                    }
784    
785                    if (!(obj instanceof OrganizationWrapper)) {
786                            return false;
787                    }
788    
789                    OrganizationWrapper organizationWrapper = (OrganizationWrapper)obj;
790    
791                    if (Validator.equals(_organization, organizationWrapper._organization)) {
792                            return true;
793                    }
794    
795                    return false;
796            }
797    
798            @Override
799            public StagedModelType getStagedModelType() {
800                    return _organization.getStagedModelType();
801            }
802    
803            /**
804             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
805             */
806            public Organization getWrappedOrganization() {
807                    return _organization;
808            }
809    
810            @Override
811            public Organization getWrappedModel() {
812                    return _organization;
813            }
814    
815            @Override
816            public void resetOriginalValues() {
817                    _organization.resetOriginalValues();
818            }
819    
820            private Organization _organization;
821    }