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