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