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