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 long[] getAncestorOrganizationIds()
217                    throws com.liferay.portal.kernel.exception.PortalException {
218                    return _organization.getAncestorOrganizationIds();
219            }
220    
221            @Override
222            public java.util.List<com.liferay.portal.model.Organization> getAncestors()
223                    throws com.liferay.portal.kernel.exception.PortalException {
224                    return _organization.getAncestors();
225            }
226    
227            @Override
228            public java.lang.String[] getChildrenTypes() {
229                    return _organization.getChildrenTypes();
230            }
231    
232            /**
233            * Returns the comments of this organization.
234            *
235            * @return the comments of this organization
236            */
237            @Override
238            public java.lang.String getComments() {
239                    return _organization.getComments();
240            }
241    
242            /**
243            * Returns the company ID of this organization.
244            *
245            * @return the company ID of this organization
246            */
247            @Override
248            public long getCompanyId() {
249                    return _organization.getCompanyId();
250            }
251    
252            /**
253            * Returns the country ID of this organization.
254            *
255            * @return the country ID of this organization
256            */
257            @Override
258            public long getCountryId() {
259                    return _organization.getCountryId();
260            }
261    
262            /**
263            * Returns the create date of this organization.
264            *
265            * @return the create date of this organization
266            */
267            @Override
268            public java.util.Date getCreateDate() {
269                    return _organization.getCreateDate();
270            }
271    
272            @Override
273            public java.util.List<com.liferay.portal.model.Organization> getDescendants() {
274                    return _organization.getDescendants();
275            }
276    
277            @Override
278            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
279                    return _organization.getExpandoBridge();
280            }
281    
282            @Override
283            public com.liferay.portal.model.Group getGroup() {
284                    return _organization.getGroup();
285            }
286    
287            @Override
288            public long getGroupId() {
289                    return _organization.getGroupId();
290            }
291    
292            /**
293            * Returns the logo ID of this organization.
294            *
295            * @return the logo ID of this organization
296            */
297            @Override
298            public long getLogoId() {
299                    return _organization.getLogoId();
300            }
301    
302            /**
303            * Returns the modified date of this organization.
304            *
305            * @return the modified date of this organization
306            */
307            @Override
308            public java.util.Date getModifiedDate() {
309                    return _organization.getModifiedDate();
310            }
311    
312            /**
313            * Returns the mvcc version of this organization.
314            *
315            * @return the mvcc version of this organization
316            */
317            @Override
318            public long getMvccVersion() {
319                    return _organization.getMvccVersion();
320            }
321    
322            /**
323            * Returns the name of this organization.
324            *
325            * @return the name of this organization
326            */
327            @Override
328            public java.lang.String getName() {
329                    return _organization.getName();
330            }
331    
332            /**
333            * Returns the organization ID of this organization.
334            *
335            * @return the organization ID of this organization
336            */
337            @Override
338            public long getOrganizationId() {
339                    return _organization.getOrganizationId();
340            }
341    
342            @Override
343            public com.liferay.portal.model.Organization getParentOrganization()
344                    throws com.liferay.portal.kernel.exception.PortalException {
345                    return _organization.getParentOrganization();
346            }
347    
348            /**
349            * Returns the parent organization ID of this organization.
350            *
351            * @return the parent organization ID of this organization
352            */
353            @Override
354            public long getParentOrganizationId() {
355                    return _organization.getParentOrganizationId();
356            }
357    
358            @Override
359            public java.lang.String getParentOrganizationName() {
360                    return _organization.getParentOrganizationName();
361            }
362    
363            @Override
364            public javax.portlet.PortletPreferences getPreferences() {
365                    return _organization.getPreferences();
366            }
367    
368            /**
369            * Returns the primary key of this organization.
370            *
371            * @return the primary key of this organization
372            */
373            @Override
374            public long getPrimaryKey() {
375                    return _organization.getPrimaryKey();
376            }
377    
378            @Override
379            public java.io.Serializable getPrimaryKeyObj() {
380                    return _organization.getPrimaryKeyObj();
381            }
382    
383            @Override
384            public int getPrivateLayoutsPageCount() {
385                    return _organization.getPrivateLayoutsPageCount();
386            }
387    
388            @Override
389            public int getPublicLayoutsPageCount() {
390                    return _organization.getPublicLayoutsPageCount();
391            }
392    
393            /**
394            * Returns the recursable of this organization.
395            *
396            * @return the recursable of this organization
397            */
398            @Override
399            public boolean getRecursable() {
400                    return _organization.getRecursable();
401            }
402    
403            /**
404            * Returns the region ID of this organization.
405            *
406            * @return the region ID of this organization
407            */
408            @Override
409            public long getRegionId() {
410                    return _organization.getRegionId();
411            }
412    
413            @Override
414            public java.util.Set<java.lang.String> getReminderQueryQuestions(
415                    java.lang.String languageId) {
416                    return _organization.getReminderQueryQuestions(languageId);
417            }
418    
419            @Override
420            public java.util.Set<java.lang.String> getReminderQueryQuestions(
421                    java.util.Locale locale) {
422                    return _organization.getReminderQueryQuestions(locale);
423            }
424    
425            /**
426            * Returns the status ID of this organization.
427            *
428            * @return the status ID of this organization
429            */
430            @Override
431            public int getStatusId() {
432                    return _organization.getStatusId();
433            }
434    
435            @Override
436            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations() {
437                    return _organization.getSuborganizations();
438            }
439    
440            @Override
441            public int getSuborganizationsSize() {
442                    return _organization.getSuborganizationsSize();
443            }
444    
445            /**
446            * Returns the tree path of this organization.
447            *
448            * @return the tree path of this organization
449            */
450            @Override
451            public java.lang.String getTreePath() {
452                    return _organization.getTreePath();
453            }
454    
455            /**
456            * Returns the type of this organization.
457            *
458            * @return the type of this organization
459            */
460            @Override
461            public java.lang.String getType() {
462                    return _organization.getType();
463            }
464    
465            @Override
466            public int getTypeOrder() {
467                    return _organization.getTypeOrder();
468            }
469    
470            /**
471            * Returns the user ID of this organization.
472            *
473            * @return the user ID of this organization
474            */
475            @Override
476            public long getUserId() {
477                    return _organization.getUserId();
478            }
479    
480            /**
481            * Returns the user name of this organization.
482            *
483            * @return the user name of this organization
484            */
485            @Override
486            public java.lang.String getUserName() {
487                    return _organization.getUserName();
488            }
489    
490            /**
491            * Returns the user uuid of this organization.
492            *
493            * @return the user uuid of this organization
494            */
495            @Override
496            public java.lang.String getUserUuid() {
497                    return _organization.getUserUuid();
498            }
499    
500            /**
501            * Returns the uuid of this organization.
502            *
503            * @return the uuid of this organization
504            */
505            @Override
506            public java.lang.String getUuid() {
507                    return _organization.getUuid();
508            }
509    
510            @Override
511            public boolean hasPrivateLayouts() {
512                    return _organization.hasPrivateLayouts();
513            }
514    
515            @Override
516            public boolean hasPublicLayouts() {
517                    return _organization.hasPublicLayouts();
518            }
519    
520            @Override
521            public boolean hasSuborganizations() {
522                    return _organization.hasSuborganizations();
523            }
524    
525            @Override
526            public int hashCode() {
527                    return _organization.hashCode();
528            }
529    
530            @Override
531            public boolean isCachedModel() {
532                    return _organization.isCachedModel();
533            }
534    
535            @Override
536            public boolean isEscapedModel() {
537                    return _organization.isEscapedModel();
538            }
539    
540            @Override
541            public boolean isNew() {
542                    return _organization.isNew();
543            }
544    
545            @Override
546            public boolean isParentable() {
547                    return _organization.isParentable();
548            }
549    
550            /**
551            * Returns <code>true</code> if this organization is recursable.
552            *
553            * @return <code>true</code> if this organization is recursable; <code>false</code> otherwise
554            */
555            @Override
556            public boolean isRecursable() {
557                    return _organization.isRecursable();
558            }
559    
560            @Override
561            public boolean isRoot() {
562                    return _organization.isRoot();
563            }
564    
565            @Override
566            public void persist() {
567                    _organization.persist();
568            }
569    
570            @Override
571            public void setCachedModel(boolean cachedModel) {
572                    _organization.setCachedModel(cachedModel);
573            }
574    
575            /**
576            * Sets the comments of this organization.
577            *
578            * @param comments the comments of this organization
579            */
580            @Override
581            public void setComments(java.lang.String comments) {
582                    _organization.setComments(comments);
583            }
584    
585            /**
586            * Sets the company ID of this organization.
587            *
588            * @param companyId the company ID of this organization
589            */
590            @Override
591            public void setCompanyId(long companyId) {
592                    _organization.setCompanyId(companyId);
593            }
594    
595            /**
596            * Sets the country ID of this organization.
597            *
598            * @param countryId the country ID of this organization
599            */
600            @Override
601            public void setCountryId(long countryId) {
602                    _organization.setCountryId(countryId);
603            }
604    
605            /**
606            * Sets the create date of this organization.
607            *
608            * @param createDate the create date of this organization
609            */
610            @Override
611            public void setCreateDate(java.util.Date createDate) {
612                    _organization.setCreateDate(createDate);
613            }
614    
615            @Override
616            public void setExpandoBridgeAttributes(
617                    com.liferay.portal.model.BaseModel<?> baseModel) {
618                    _organization.setExpandoBridgeAttributes(baseModel);
619            }
620    
621            @Override
622            public void setExpandoBridgeAttributes(
623                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
624                    _organization.setExpandoBridgeAttributes(expandoBridge);
625            }
626    
627            @Override
628            public void setExpandoBridgeAttributes(
629                    com.liferay.portal.service.ServiceContext serviceContext) {
630                    _organization.setExpandoBridgeAttributes(serviceContext);
631            }
632    
633            /**
634            * Sets the logo ID of this organization.
635            *
636            * @param logoId the logo ID of this organization
637            */
638            @Override
639            public void setLogoId(long logoId) {
640                    _organization.setLogoId(logoId);
641            }
642    
643            /**
644            * Sets the modified date of this organization.
645            *
646            * @param modifiedDate the modified date of this organization
647            */
648            @Override
649            public void setModifiedDate(java.util.Date modifiedDate) {
650                    _organization.setModifiedDate(modifiedDate);
651            }
652    
653            /**
654            * Sets the mvcc version of this organization.
655            *
656            * @param mvccVersion the mvcc version of this organization
657            */
658            @Override
659            public void setMvccVersion(long mvccVersion) {
660                    _organization.setMvccVersion(mvccVersion);
661            }
662    
663            /**
664            * Sets the name of this organization.
665            *
666            * @param name the name of this organization
667            */
668            @Override
669            public void setName(java.lang.String name) {
670                    _organization.setName(name);
671            }
672    
673            @Override
674            public void setNew(boolean n) {
675                    _organization.setNew(n);
676            }
677    
678            /**
679            * Sets the organization ID of this organization.
680            *
681            * @param organizationId the organization ID of this organization
682            */
683            @Override
684            public void setOrganizationId(long organizationId) {
685                    _organization.setOrganizationId(organizationId);
686            }
687    
688            /**
689            * Sets the parent organization ID of this organization.
690            *
691            * @param parentOrganizationId the parent organization ID of this organization
692            */
693            @Override
694            public void setParentOrganizationId(long parentOrganizationId) {
695                    _organization.setParentOrganizationId(parentOrganizationId);
696            }
697    
698            /**
699            * Sets the primary key of this organization.
700            *
701            * @param primaryKey the primary key of this organization
702            */
703            @Override
704            public void setPrimaryKey(long primaryKey) {
705                    _organization.setPrimaryKey(primaryKey);
706            }
707    
708            @Override
709            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
710                    _organization.setPrimaryKeyObj(primaryKeyObj);
711            }
712    
713            /**
714            * Sets whether this organization is recursable.
715            *
716            * @param recursable the recursable of this organization
717            */
718            @Override
719            public void setRecursable(boolean recursable) {
720                    _organization.setRecursable(recursable);
721            }
722    
723            /**
724            * Sets the region ID of this organization.
725            *
726            * @param regionId the region ID of this organization
727            */
728            @Override
729            public void setRegionId(long regionId) {
730                    _organization.setRegionId(regionId);
731            }
732    
733            /**
734            * Sets the status ID of this organization.
735            *
736            * @param statusId the status ID of this organization
737            */
738            @Override
739            public void setStatusId(int statusId) {
740                    _organization.setStatusId(statusId);
741            }
742    
743            /**
744            * Sets the tree path of this organization.
745            *
746            * @param treePath the tree path of this organization
747            */
748            @Override
749            public void setTreePath(java.lang.String treePath) {
750                    _organization.setTreePath(treePath);
751            }
752    
753            /**
754            * Sets the type of this organization.
755            *
756            * @param type the type of this organization
757            */
758            @Override
759            public void setType(java.lang.String type) {
760                    _organization.setType(type);
761            }
762    
763            /**
764            * Sets the user ID of this organization.
765            *
766            * @param userId the user ID of this organization
767            */
768            @Override
769            public void setUserId(long userId) {
770                    _organization.setUserId(userId);
771            }
772    
773            /**
774            * Sets the user name of this organization.
775            *
776            * @param userName the user name of this organization
777            */
778            @Override
779            public void setUserName(java.lang.String userName) {
780                    _organization.setUserName(userName);
781            }
782    
783            /**
784            * Sets the user uuid of this organization.
785            *
786            * @param userUuid the user uuid of this organization
787            */
788            @Override
789            public void setUserUuid(java.lang.String userUuid) {
790                    _organization.setUserUuid(userUuid);
791            }
792    
793            /**
794            * Sets the uuid of this organization.
795            *
796            * @param uuid the uuid of this organization
797            */
798            @Override
799            public void setUuid(java.lang.String uuid) {
800                    _organization.setUuid(uuid);
801            }
802    
803            @Override
804            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Organization> toCacheModel() {
805                    return _organization.toCacheModel();
806            }
807    
808            @Override
809            public com.liferay.portal.model.Organization toEscapedModel() {
810                    return new OrganizationWrapper(_organization.toEscapedModel());
811            }
812    
813            @Override
814            public java.lang.String toString() {
815                    return _organization.toString();
816            }
817    
818            @Override
819            public com.liferay.portal.model.Organization toUnescapedModel() {
820                    return new OrganizationWrapper(_organization.toUnescapedModel());
821            }
822    
823            @Override
824            public java.lang.String toXmlString() {
825                    return _organization.toXmlString();
826            }
827    
828            @Override
829            public void updateTreePath(java.lang.String treePath) {
830                    _organization.updateTreePath(treePath);
831            }
832    
833            @Override
834            public boolean equals(Object obj) {
835                    if (this == obj) {
836                            return true;
837                    }
838    
839                    if (!(obj instanceof OrganizationWrapper)) {
840                            return false;
841                    }
842    
843                    OrganizationWrapper organizationWrapper = (OrganizationWrapper)obj;
844    
845                    if (Validator.equals(_organization, organizationWrapper._organization)) {
846                            return true;
847                    }
848    
849                    return false;
850            }
851    
852            @Override
853            public StagedModelType getStagedModelType() {
854                    return _organization.getStagedModelType();
855            }
856    
857            /**
858             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
859             */
860            @Deprecated
861            public Organization getWrappedOrganization() {
862                    return _organization;
863            }
864    
865            @Override
866            public Organization getWrappedModel() {
867                    return _organization;
868            }
869    
870            @Override
871            public boolean isEntityCacheEnabled() {
872                    return _organization.isEntityCacheEnabled();
873            }
874    
875            @Override
876            public boolean isFinderCacheEnabled() {
877                    return _organization.isFinderCacheEnabled();
878            }
879    
880            @Override
881            public void resetOriginalValues() {
882                    _organization.resetOriginalValues();
883            }
884    
885            private final Organization _organization;
886    }