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