001    /**
002     * Copyright (c) 2000-2012 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 java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * <p>
022     * This class is a wrapper for {@link Organization}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       Organization
027     * @generated
028     */
029    public class OrganizationWrapper implements Organization,
030            ModelWrapper<Organization> {
031            public OrganizationWrapper(Organization organization) {
032                    _organization = organization;
033            }
034    
035            public Class<?> getModelClass() {
036                    return Organization.class;
037            }
038    
039            public String getModelClassName() {
040                    return Organization.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("organizationId", getOrganizationId());
047                    attributes.put("companyId", getCompanyId());
048                    attributes.put("parentOrganizationId", getParentOrganizationId());
049                    attributes.put("treePath", getTreePath());
050                    attributes.put("name", getName());
051                    attributes.put("type", getType());
052                    attributes.put("recursable", getRecursable());
053                    attributes.put("regionId", getRegionId());
054                    attributes.put("countryId", getCountryId());
055                    attributes.put("statusId", getStatusId());
056                    attributes.put("comments", getComments());
057    
058                    return attributes;
059            }
060    
061            public void setModelAttributes(Map<String, Object> attributes) {
062                    Long organizationId = (Long)attributes.get("organizationId");
063    
064                    if (organizationId != null) {
065                            setOrganizationId(organizationId);
066                    }
067    
068                    Long companyId = (Long)attributes.get("companyId");
069    
070                    if (companyId != null) {
071                            setCompanyId(companyId);
072                    }
073    
074                    Long parentOrganizationId = (Long)attributes.get("parentOrganizationId");
075    
076                    if (parentOrganizationId != null) {
077                            setParentOrganizationId(parentOrganizationId);
078                    }
079    
080                    String treePath = (String)attributes.get("treePath");
081    
082                    if (treePath != null) {
083                            setTreePath(treePath);
084                    }
085    
086                    String name = (String)attributes.get("name");
087    
088                    if (name != null) {
089                            setName(name);
090                    }
091    
092                    String type = (String)attributes.get("type");
093    
094                    if (type != null) {
095                            setType(type);
096                    }
097    
098                    Boolean recursable = (Boolean)attributes.get("recursable");
099    
100                    if (recursable != null) {
101                            setRecursable(recursable);
102                    }
103    
104                    Long regionId = (Long)attributes.get("regionId");
105    
106                    if (regionId != null) {
107                            setRegionId(regionId);
108                    }
109    
110                    Long countryId = (Long)attributes.get("countryId");
111    
112                    if (countryId != null) {
113                            setCountryId(countryId);
114                    }
115    
116                    Integer statusId = (Integer)attributes.get("statusId");
117    
118                    if (statusId != null) {
119                            setStatusId(statusId);
120                    }
121    
122                    String comments = (String)attributes.get("comments");
123    
124                    if (comments != null) {
125                            setComments(comments);
126                    }
127            }
128    
129            /**
130            * Returns the primary key of this organization.
131            *
132            * @return the primary key of this organization
133            */
134            public long getPrimaryKey() {
135                    return _organization.getPrimaryKey();
136            }
137    
138            /**
139            * Sets the primary key of this organization.
140            *
141            * @param primaryKey the primary key of this organization
142            */
143            public void setPrimaryKey(long primaryKey) {
144                    _organization.setPrimaryKey(primaryKey);
145            }
146    
147            /**
148            * Returns the organization ID of this organization.
149            *
150            * @return the organization ID of this organization
151            */
152            public long getOrganizationId() {
153                    return _organization.getOrganizationId();
154            }
155    
156            /**
157            * Sets the organization ID of this organization.
158            *
159            * @param organizationId the organization ID of this organization
160            */
161            public void setOrganizationId(long organizationId) {
162                    _organization.setOrganizationId(organizationId);
163            }
164    
165            /**
166            * Returns the company ID of this organization.
167            *
168            * @return the company ID of this organization
169            */
170            public long getCompanyId() {
171                    return _organization.getCompanyId();
172            }
173    
174            /**
175            * Sets the company ID of this organization.
176            *
177            * @param companyId the company ID of this organization
178            */
179            public void setCompanyId(long companyId) {
180                    _organization.setCompanyId(companyId);
181            }
182    
183            /**
184            * Returns the parent organization ID of this organization.
185            *
186            * @return the parent organization ID of this organization
187            */
188            public long getParentOrganizationId() {
189                    return _organization.getParentOrganizationId();
190            }
191    
192            /**
193            * Sets the parent organization ID of this organization.
194            *
195            * @param parentOrganizationId the parent organization ID of this organization
196            */
197            public void setParentOrganizationId(long parentOrganizationId) {
198                    _organization.setParentOrganizationId(parentOrganizationId);
199            }
200    
201            /**
202            * Returns the tree path of this organization.
203            *
204            * @return the tree path of this organization
205            */
206            public java.lang.String getTreePath() {
207                    return _organization.getTreePath();
208            }
209    
210            /**
211            * Sets the tree path of this organization.
212            *
213            * @param treePath the tree path of this organization
214            */
215            public void setTreePath(java.lang.String treePath) {
216                    _organization.setTreePath(treePath);
217            }
218    
219            /**
220            * Returns the name of this organization.
221            *
222            * @return the name of this organization
223            */
224            public java.lang.String getName() {
225                    return _organization.getName();
226            }
227    
228            /**
229            * Sets the name of this organization.
230            *
231            * @param name the name of this organization
232            */
233            public void setName(java.lang.String name) {
234                    _organization.setName(name);
235            }
236    
237            /**
238            * Returns the type of this organization.
239            *
240            * @return the type of this organization
241            */
242            public java.lang.String getType() {
243                    return _organization.getType();
244            }
245    
246            /**
247            * Sets the type of this organization.
248            *
249            * @param type the type of this organization
250            */
251            public void setType(java.lang.String type) {
252                    _organization.setType(type);
253            }
254    
255            /**
256            * Returns the recursable of this organization.
257            *
258            * @return the recursable of this organization
259            */
260            public boolean getRecursable() {
261                    return _organization.getRecursable();
262            }
263    
264            /**
265            * Returns <code>true</code> if this organization is recursable.
266            *
267            * @return <code>true</code> if this organization is recursable; <code>false</code> otherwise
268            */
269            public boolean isRecursable() {
270                    return _organization.isRecursable();
271            }
272    
273            /**
274            * Sets whether this organization is recursable.
275            *
276            * @param recursable the recursable of this organization
277            */
278            public void setRecursable(boolean recursable) {
279                    _organization.setRecursable(recursable);
280            }
281    
282            /**
283            * Returns the region ID of this organization.
284            *
285            * @return the region ID of this organization
286            */
287            public long getRegionId() {
288                    return _organization.getRegionId();
289            }
290    
291            /**
292            * Sets the region ID of this organization.
293            *
294            * @param regionId the region ID of this organization
295            */
296            public void setRegionId(long regionId) {
297                    _organization.setRegionId(regionId);
298            }
299    
300            /**
301            * Returns the country ID of this organization.
302            *
303            * @return the country ID of this organization
304            */
305            public long getCountryId() {
306                    return _organization.getCountryId();
307            }
308    
309            /**
310            * Sets the country ID of this organization.
311            *
312            * @param countryId the country ID of this organization
313            */
314            public void setCountryId(long countryId) {
315                    _organization.setCountryId(countryId);
316            }
317    
318            /**
319            * Returns the status ID of this organization.
320            *
321            * @return the status ID of this organization
322            */
323            public int getStatusId() {
324                    return _organization.getStatusId();
325            }
326    
327            /**
328            * Sets the status ID of this organization.
329            *
330            * @param statusId the status ID of this organization
331            */
332            public void setStatusId(int statusId) {
333                    _organization.setStatusId(statusId);
334            }
335    
336            /**
337            * Returns the comments of this organization.
338            *
339            * @return the comments of this organization
340            */
341            public java.lang.String getComments() {
342                    return _organization.getComments();
343            }
344    
345            /**
346            * Sets the comments of this organization.
347            *
348            * @param comments the comments of this organization
349            */
350            public void setComments(java.lang.String comments) {
351                    _organization.setComments(comments);
352            }
353    
354            public boolean isNew() {
355                    return _organization.isNew();
356            }
357    
358            public void setNew(boolean n) {
359                    _organization.setNew(n);
360            }
361    
362            public boolean isCachedModel() {
363                    return _organization.isCachedModel();
364            }
365    
366            public void setCachedModel(boolean cachedModel) {
367                    _organization.setCachedModel(cachedModel);
368            }
369    
370            public boolean isEscapedModel() {
371                    return _organization.isEscapedModel();
372            }
373    
374            public java.io.Serializable getPrimaryKeyObj() {
375                    return _organization.getPrimaryKeyObj();
376            }
377    
378            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
379                    _organization.setPrimaryKeyObj(primaryKeyObj);
380            }
381    
382            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
383                    return _organization.getExpandoBridge();
384            }
385    
386            public void setExpandoBridgeAttributes(
387                    com.liferay.portal.service.ServiceContext serviceContext) {
388                    _organization.setExpandoBridgeAttributes(serviceContext);
389            }
390    
391            @Override
392            public java.lang.Object clone() {
393                    return new OrganizationWrapper((Organization)_organization.clone());
394            }
395    
396            public int compareTo(com.liferay.portal.model.Organization organization) {
397                    return _organization.compareTo(organization);
398            }
399    
400            @Override
401            public int hashCode() {
402                    return _organization.hashCode();
403            }
404    
405            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Organization> toCacheModel() {
406                    return _organization.toCacheModel();
407            }
408    
409            public com.liferay.portal.model.Organization toEscapedModel() {
410                    return new OrganizationWrapper(_organization.toEscapedModel());
411            }
412    
413            public com.liferay.portal.model.Organization toUnescapedModel() {
414                    return new OrganizationWrapper(_organization.toUnescapedModel());
415            }
416    
417            @Override
418            public java.lang.String toString() {
419                    return _organization.toString();
420            }
421    
422            public java.lang.String toXmlString() {
423                    return _organization.toXmlString();
424            }
425    
426            public void persist()
427                    throws com.liferay.portal.kernel.exception.SystemException {
428                    _organization.persist();
429            }
430    
431            public java.lang.String buildTreePath()
432                    throws com.liferay.portal.kernel.exception.PortalException,
433                            com.liferay.portal.kernel.exception.SystemException {
434                    return _organization.buildTreePath();
435            }
436    
437            public com.liferay.portal.model.Address getAddress() {
438                    return _organization.getAddress();
439            }
440    
441            public java.util.List<com.liferay.portal.model.Address> getAddresses()
442                    throws com.liferay.portal.kernel.exception.SystemException {
443                    return _organization.getAddresses();
444            }
445    
446            public java.util.List<com.liferay.portal.model.Organization> getAncestors()
447                    throws com.liferay.portal.kernel.exception.PortalException,
448                            com.liferay.portal.kernel.exception.SystemException {
449                    return _organization.getAncestors();
450            }
451    
452            public java.lang.String[] getChildrenTypes() {
453                    return _organization.getChildrenTypes();
454            }
455    
456            public java.util.List<com.liferay.portal.model.Organization> getDescendants()
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    return _organization.getDescendants();
459            }
460    
461            public com.liferay.portal.model.Group getGroup() {
462                    return _organization.getGroup();
463            }
464    
465            public long getGroupId() {
466                    return _organization.getGroupId();
467            }
468    
469            public long getLogoId() {
470                    return _organization.getLogoId();
471            }
472    
473            public com.liferay.portal.model.Organization getParentOrganization()
474                    throws com.liferay.portal.kernel.exception.PortalException,
475                            com.liferay.portal.kernel.exception.SystemException {
476                    return _organization.getParentOrganization();
477            }
478    
479            public javax.portlet.PortletPreferences getPreferences()
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    return _organization.getPreferences();
482            }
483    
484            public int getPrivateLayoutsPageCount() {
485                    return _organization.getPrivateLayoutsPageCount();
486            }
487    
488            public int getPublicLayoutsPageCount() {
489                    return _organization.getPublicLayoutsPageCount();
490            }
491    
492            public java.util.Set<java.lang.String> getReminderQueryQuestions(
493                    java.util.Locale locale)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return _organization.getReminderQueryQuestions(locale);
496            }
497    
498            public java.util.Set<java.lang.String> getReminderQueryQuestions(
499                    java.lang.String languageId)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return _organization.getReminderQueryQuestions(languageId);
502            }
503    
504            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations()
505                    throws com.liferay.portal.kernel.exception.SystemException {
506                    return _organization.getSuborganizations();
507            }
508    
509            public int getSuborganizationsSize()
510                    throws com.liferay.portal.kernel.exception.SystemException {
511                    return _organization.getSuborganizationsSize();
512            }
513    
514            public int getTypeOrder() {
515                    return _organization.getTypeOrder();
516            }
517    
518            public boolean hasPrivateLayouts() {
519                    return _organization.hasPrivateLayouts();
520            }
521    
522            public boolean hasPublicLayouts() {
523                    return _organization.hasPublicLayouts();
524            }
525    
526            public boolean hasSuborganizations()
527                    throws com.liferay.portal.kernel.exception.SystemException {
528                    return _organization.hasSuborganizations();
529            }
530    
531            public boolean isParentable() {
532                    return _organization.isParentable();
533            }
534    
535            public boolean isRoot() {
536                    return _organization.isRoot();
537            }
538    
539            /**
540             * @deprecated Renamed to {@link #getWrappedModel}
541             */
542            public Organization getWrappedOrganization() {
543                    return _organization;
544            }
545    
546            public Organization getWrappedModel() {
547                    return _organization;
548            }
549    
550            public void resetOriginalValues() {
551                    _organization.resetOriginalValues();
552            }
553    
554            private Organization _organization;
555    }