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