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