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