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.util.Validator;
020    import com.liferay.portal.service.ServiceContext;
021    
022    import com.liferay.portlet.expando.model.ExpandoBridge;
023    import com.liferay.portlet.exportimport.lar.StagedModelType;
024    
025    import java.io.Serializable;
026    
027    import java.util.Date;
028    import java.util.HashMap;
029    import java.util.Map;
030    
031    /**
032     * <p>
033     * This class is a wrapper for {@link Repository}.
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see Repository
038     * @generated
039     */
040    @ProviderType
041    public class RepositoryWrapper implements Repository, ModelWrapper<Repository> {
042            public RepositoryWrapper(Repository repository) {
043                    _repository = repository;
044            }
045    
046            @Override
047            public Class<?> getModelClass() {
048                    return Repository.class;
049            }
050    
051            @Override
052            public String getModelClassName() {
053                    return Repository.class.getName();
054            }
055    
056            @Override
057            public Map<String, Object> getModelAttributes() {
058                    Map<String, Object> attributes = new HashMap<String, Object>();
059    
060                    attributes.put("mvccVersion", getMvccVersion());
061                    attributes.put("uuid", getUuid());
062                    attributes.put("repositoryId", getRepositoryId());
063                    attributes.put("groupId", getGroupId());
064                    attributes.put("companyId", getCompanyId());
065                    attributes.put("userId", getUserId());
066                    attributes.put("userName", getUserName());
067                    attributes.put("createDate", getCreateDate());
068                    attributes.put("modifiedDate", getModifiedDate());
069                    attributes.put("classNameId", getClassNameId());
070                    attributes.put("name", getName());
071                    attributes.put("description", getDescription());
072                    attributes.put("portletId", getPortletId());
073                    attributes.put("typeSettings", getTypeSettings());
074                    attributes.put("dlFolderId", getDlFolderId());
075                    attributes.put("lastPublishDate", getLastPublishDate());
076    
077                    return attributes;
078            }
079    
080            @Override
081            public void setModelAttributes(Map<String, Object> attributes) {
082                    Long mvccVersion = (Long)attributes.get("mvccVersion");
083    
084                    if (mvccVersion != null) {
085                            setMvccVersion(mvccVersion);
086                    }
087    
088                    String uuid = (String)attributes.get("uuid");
089    
090                    if (uuid != null) {
091                            setUuid(uuid);
092                    }
093    
094                    Long repositoryId = (Long)attributes.get("repositoryId");
095    
096                    if (repositoryId != null) {
097                            setRepositoryId(repositoryId);
098                    }
099    
100                    Long groupId = (Long)attributes.get("groupId");
101    
102                    if (groupId != null) {
103                            setGroupId(groupId);
104                    }
105    
106                    Long companyId = (Long)attributes.get("companyId");
107    
108                    if (companyId != null) {
109                            setCompanyId(companyId);
110                    }
111    
112                    Long userId = (Long)attributes.get("userId");
113    
114                    if (userId != null) {
115                            setUserId(userId);
116                    }
117    
118                    String userName = (String)attributes.get("userName");
119    
120                    if (userName != null) {
121                            setUserName(userName);
122                    }
123    
124                    Date createDate = (Date)attributes.get("createDate");
125    
126                    if (createDate != null) {
127                            setCreateDate(createDate);
128                    }
129    
130                    Date modifiedDate = (Date)attributes.get("modifiedDate");
131    
132                    if (modifiedDate != null) {
133                            setModifiedDate(modifiedDate);
134                    }
135    
136                    Long classNameId = (Long)attributes.get("classNameId");
137    
138                    if (classNameId != null) {
139                            setClassNameId(classNameId);
140                    }
141    
142                    String name = (String)attributes.get("name");
143    
144                    if (name != null) {
145                            setName(name);
146                    }
147    
148                    String description = (String)attributes.get("description");
149    
150                    if (description != null) {
151                            setDescription(description);
152                    }
153    
154                    String portletId = (String)attributes.get("portletId");
155    
156                    if (portletId != null) {
157                            setPortletId(portletId);
158                    }
159    
160                    String typeSettings = (String)attributes.get("typeSettings");
161    
162                    if (typeSettings != null) {
163                            setTypeSettings(typeSettings);
164                    }
165    
166                    Long dlFolderId = (Long)attributes.get("dlFolderId");
167    
168                    if (dlFolderId != null) {
169                            setDlFolderId(dlFolderId);
170                    }
171    
172                    Date lastPublishDate = (Date)attributes.get("lastPublishDate");
173    
174                    if (lastPublishDate != null) {
175                            setLastPublishDate(lastPublishDate);
176                    }
177            }
178    
179            @Override
180            public java.lang.Object clone() {
181                    return new RepositoryWrapper((Repository)_repository.clone());
182            }
183    
184            @Override
185            public int compareTo(com.liferay.portal.model.Repository repository) {
186                    return _repository.compareTo(repository);
187            }
188    
189            /**
190            * Returns the fully qualified class name of this repository.
191            *
192            * @return the fully qualified class name of this repository
193            */
194            @Override
195            public java.lang.String getClassName() {
196                    return _repository.getClassName();
197            }
198    
199            /**
200            * Returns the class name ID of this repository.
201            *
202            * @return the class name ID of this repository
203            */
204            @Override
205            public long getClassNameId() {
206                    return _repository.getClassNameId();
207            }
208    
209            /**
210            * Returns the company ID of this repository.
211            *
212            * @return the company ID of this repository
213            */
214            @Override
215            public long getCompanyId() {
216                    return _repository.getCompanyId();
217            }
218    
219            /**
220            * Returns the create date of this repository.
221            *
222            * @return the create date of this repository
223            */
224            @Override
225            public Date getCreateDate() {
226                    return _repository.getCreateDate();
227            }
228    
229            /**
230            * Returns the description of this repository.
231            *
232            * @return the description of this repository
233            */
234            @Override
235            public java.lang.String getDescription() {
236                    return _repository.getDescription();
237            }
238    
239            /**
240            * Returns the dl folder ID of this repository.
241            *
242            * @return the dl folder ID of this repository
243            */
244            @Override
245            public long getDlFolderId() {
246                    return _repository.getDlFolderId();
247            }
248    
249            @Override
250            public ExpandoBridge getExpandoBridge() {
251                    return _repository.getExpandoBridge();
252            }
253    
254            /**
255            * Returns the group ID of this repository.
256            *
257            * @return the group ID of this repository
258            */
259            @Override
260            public long getGroupId() {
261                    return _repository.getGroupId();
262            }
263    
264            /**
265            * Returns the last publish date of this repository.
266            *
267            * @return the last publish date of this repository
268            */
269            @Override
270            public Date getLastPublishDate() {
271                    return _repository.getLastPublishDate();
272            }
273    
274            /**
275            * Returns the modified date of this repository.
276            *
277            * @return the modified date of this repository
278            */
279            @Override
280            public Date getModifiedDate() {
281                    return _repository.getModifiedDate();
282            }
283    
284            /**
285            * Returns the mvcc version of this repository.
286            *
287            * @return the mvcc version of this repository
288            */
289            @Override
290            public long getMvccVersion() {
291                    return _repository.getMvccVersion();
292            }
293    
294            /**
295            * Returns the name of this repository.
296            *
297            * @return the name of this repository
298            */
299            @Override
300            public java.lang.String getName() {
301                    return _repository.getName();
302            }
303    
304            /**
305            * Returns the portlet ID of this repository.
306            *
307            * @return the portlet ID of this repository
308            */
309            @Override
310            public java.lang.String getPortletId() {
311                    return _repository.getPortletId();
312            }
313    
314            /**
315            * Returns the primary key of this repository.
316            *
317            * @return the primary key of this repository
318            */
319            @Override
320            public long getPrimaryKey() {
321                    return _repository.getPrimaryKey();
322            }
323    
324            @Override
325            public Serializable getPrimaryKeyObj() {
326                    return _repository.getPrimaryKeyObj();
327            }
328    
329            /**
330            * Returns the repository ID of this repository.
331            *
332            * @return the repository ID of this repository
333            */
334            @Override
335            public long getRepositoryId() {
336                    return _repository.getRepositoryId();
337            }
338    
339            /**
340            * Returns the type settings of this repository.
341            *
342            * @return the type settings of this repository
343            */
344            @Override
345            public java.lang.String getTypeSettings() {
346                    return _repository.getTypeSettings();
347            }
348    
349            @Override
350            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
351                    return _repository.getTypeSettingsProperties();
352            }
353    
354            /**
355            * Returns the user ID of this repository.
356            *
357            * @return the user ID of this repository
358            */
359            @Override
360            public long getUserId() {
361                    return _repository.getUserId();
362            }
363    
364            /**
365            * Returns the user name of this repository.
366            *
367            * @return the user name of this repository
368            */
369            @Override
370            public java.lang.String getUserName() {
371                    return _repository.getUserName();
372            }
373    
374            /**
375            * Returns the user uuid of this repository.
376            *
377            * @return the user uuid of this repository
378            */
379            @Override
380            public java.lang.String getUserUuid() {
381                    return _repository.getUserUuid();
382            }
383    
384            /**
385            * Returns the uuid of this repository.
386            *
387            * @return the uuid of this repository
388            */
389            @Override
390            public java.lang.String getUuid() {
391                    return _repository.getUuid();
392            }
393    
394            @Override
395            public int hashCode() {
396                    return _repository.hashCode();
397            }
398    
399            @Override
400            public boolean isCachedModel() {
401                    return _repository.isCachedModel();
402            }
403    
404            @Override
405            public boolean isEscapedModel() {
406                    return _repository.isEscapedModel();
407            }
408    
409            @Override
410            public boolean isNew() {
411                    return _repository.isNew();
412            }
413    
414            @Override
415            public void persist() {
416                    _repository.persist();
417            }
418    
419            @Override
420            public void setCachedModel(boolean cachedModel) {
421                    _repository.setCachedModel(cachedModel);
422            }
423    
424            @Override
425            public void setClassName(java.lang.String className) {
426                    _repository.setClassName(className);
427            }
428    
429            /**
430            * Sets the class name ID of this repository.
431            *
432            * @param classNameId the class name ID of this repository
433            */
434            @Override
435            public void setClassNameId(long classNameId) {
436                    _repository.setClassNameId(classNameId);
437            }
438    
439            /**
440            * Sets the company ID of this repository.
441            *
442            * @param companyId the company ID of this repository
443            */
444            @Override
445            public void setCompanyId(long companyId) {
446                    _repository.setCompanyId(companyId);
447            }
448    
449            /**
450            * Sets the create date of this repository.
451            *
452            * @param createDate the create date of this repository
453            */
454            @Override
455            public void setCreateDate(Date createDate) {
456                    _repository.setCreateDate(createDate);
457            }
458    
459            /**
460            * Sets the description of this repository.
461            *
462            * @param description the description of this repository
463            */
464            @Override
465            public void setDescription(java.lang.String description) {
466                    _repository.setDescription(description);
467            }
468    
469            /**
470            * Sets the dl folder ID of this repository.
471            *
472            * @param dlFolderId the dl folder ID of this repository
473            */
474            @Override
475            public void setDlFolderId(long dlFolderId) {
476                    _repository.setDlFolderId(dlFolderId);
477            }
478    
479            @Override
480            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
481                    _repository.setExpandoBridgeAttributes(baseModel);
482            }
483    
484            @Override
485            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
486                    _repository.setExpandoBridgeAttributes(expandoBridge);
487            }
488    
489            @Override
490            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
491                    _repository.setExpandoBridgeAttributes(serviceContext);
492            }
493    
494            /**
495            * Sets the group ID of this repository.
496            *
497            * @param groupId the group ID of this repository
498            */
499            @Override
500            public void setGroupId(long groupId) {
501                    _repository.setGroupId(groupId);
502            }
503    
504            /**
505            * Sets the last publish date of this repository.
506            *
507            * @param lastPublishDate the last publish date of this repository
508            */
509            @Override
510            public void setLastPublishDate(Date lastPublishDate) {
511                    _repository.setLastPublishDate(lastPublishDate);
512            }
513    
514            /**
515            * Sets the modified date of this repository.
516            *
517            * @param modifiedDate the modified date of this repository
518            */
519            @Override
520            public void setModifiedDate(Date modifiedDate) {
521                    _repository.setModifiedDate(modifiedDate);
522            }
523    
524            /**
525            * Sets the mvcc version of this repository.
526            *
527            * @param mvccVersion the mvcc version of this repository
528            */
529            @Override
530            public void setMvccVersion(long mvccVersion) {
531                    _repository.setMvccVersion(mvccVersion);
532            }
533    
534            /**
535            * Sets the name of this repository.
536            *
537            * @param name the name of this repository
538            */
539            @Override
540            public void setName(java.lang.String name) {
541                    _repository.setName(name);
542            }
543    
544            @Override
545            public void setNew(boolean n) {
546                    _repository.setNew(n);
547            }
548    
549            /**
550            * Sets the portlet ID of this repository.
551            *
552            * @param portletId the portlet ID of this repository
553            */
554            @Override
555            public void setPortletId(java.lang.String portletId) {
556                    _repository.setPortletId(portletId);
557            }
558    
559            /**
560            * Sets the primary key of this repository.
561            *
562            * @param primaryKey the primary key of this repository
563            */
564            @Override
565            public void setPrimaryKey(long primaryKey) {
566                    _repository.setPrimaryKey(primaryKey);
567            }
568    
569            @Override
570            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
571                    _repository.setPrimaryKeyObj(primaryKeyObj);
572            }
573    
574            /**
575            * Sets the repository ID of this repository.
576            *
577            * @param repositoryId the repository ID of this repository
578            */
579            @Override
580            public void setRepositoryId(long repositoryId) {
581                    _repository.setRepositoryId(repositoryId);
582            }
583    
584            /**
585            * Sets the type settings of this repository.
586            *
587            * @param typeSettings the type settings of this repository
588            */
589            @Override
590            public void setTypeSettings(java.lang.String typeSettings) {
591                    _repository.setTypeSettings(typeSettings);
592            }
593    
594            @Override
595            public void setTypeSettingsProperties(
596                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
597                    _repository.setTypeSettingsProperties(typeSettingsProperties);
598            }
599    
600            /**
601            * Sets the user ID of this repository.
602            *
603            * @param userId the user ID of this repository
604            */
605            @Override
606            public void setUserId(long userId) {
607                    _repository.setUserId(userId);
608            }
609    
610            /**
611            * Sets the user name of this repository.
612            *
613            * @param userName the user name of this repository
614            */
615            @Override
616            public void setUserName(java.lang.String userName) {
617                    _repository.setUserName(userName);
618            }
619    
620            /**
621            * Sets the user uuid of this repository.
622            *
623            * @param userUuid the user uuid of this repository
624            */
625            @Override
626            public void setUserUuid(java.lang.String userUuid) {
627                    _repository.setUserUuid(userUuid);
628            }
629    
630            /**
631            * Sets the uuid of this repository.
632            *
633            * @param uuid the uuid of this repository
634            */
635            @Override
636            public void setUuid(java.lang.String uuid) {
637                    _repository.setUuid(uuid);
638            }
639    
640            @Override
641            public CacheModel<com.liferay.portal.model.Repository> toCacheModel() {
642                    return _repository.toCacheModel();
643            }
644    
645            @Override
646            public com.liferay.portal.model.Repository toEscapedModel() {
647                    return new RepositoryWrapper(_repository.toEscapedModel());
648            }
649    
650            @Override
651            public java.lang.String toString() {
652                    return _repository.toString();
653            }
654    
655            @Override
656            public com.liferay.portal.model.Repository toUnescapedModel() {
657                    return new RepositoryWrapper(_repository.toUnescapedModel());
658            }
659    
660            @Override
661            public java.lang.String toXmlString() {
662                    return _repository.toXmlString();
663            }
664    
665            @Override
666            public boolean equals(Object obj) {
667                    if (this == obj) {
668                            return true;
669                    }
670    
671                    if (!(obj instanceof RepositoryWrapper)) {
672                            return false;
673                    }
674    
675                    RepositoryWrapper repositoryWrapper = (RepositoryWrapper)obj;
676    
677                    if (Validator.equals(_repository, repositoryWrapper._repository)) {
678                            return true;
679                    }
680    
681                    return false;
682            }
683    
684            @Override
685            public StagedModelType getStagedModelType() {
686                    return _repository.getStagedModelType();
687            }
688    
689            @Override
690            public Repository getWrappedModel() {
691                    return _repository;
692            }
693    
694            @Override
695            public boolean isEntityCacheEnabled() {
696                    return _repository.isEntityCacheEnabled();
697            }
698    
699            @Override
700            public boolean isFinderCacheEnabled() {
701                    return _repository.isFinderCacheEnabled();
702            }
703    
704            @Override
705            public void resetOriginalValues() {
706                    _repository.resetOriginalValues();
707            }
708    
709            private final Repository _repository;
710    }