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