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    
070                    return attributes;
071            }
072    
073            @Override
074            public void setModelAttributes(Map<String, Object> attributes) {
075                    Long mvccVersion = (Long)attributes.get("mvccVersion");
076    
077                    if (mvccVersion != null) {
078                            setMvccVersion(mvccVersion);
079                    }
080    
081                    String uuid = (String)attributes.get("uuid");
082    
083                    if (uuid != null) {
084                            setUuid(uuid);
085                    }
086    
087                    Long repositoryEntryId = (Long)attributes.get("repositoryEntryId");
088    
089                    if (repositoryEntryId != null) {
090                            setRepositoryEntryId(repositoryEntryId);
091                    }
092    
093                    Long groupId = (Long)attributes.get("groupId");
094    
095                    if (groupId != null) {
096                            setGroupId(groupId);
097                    }
098    
099                    Long companyId = (Long)attributes.get("companyId");
100    
101                    if (companyId != null) {
102                            setCompanyId(companyId);
103                    }
104    
105                    Long userId = (Long)attributes.get("userId");
106    
107                    if (userId != null) {
108                            setUserId(userId);
109                    }
110    
111                    String userName = (String)attributes.get("userName");
112    
113                    if (userName != null) {
114                            setUserName(userName);
115                    }
116    
117                    Date createDate = (Date)attributes.get("createDate");
118    
119                    if (createDate != null) {
120                            setCreateDate(createDate);
121                    }
122    
123                    Date modifiedDate = (Date)attributes.get("modifiedDate");
124    
125                    if (modifiedDate != null) {
126                            setModifiedDate(modifiedDate);
127                    }
128    
129                    Long repositoryId = (Long)attributes.get("repositoryId");
130    
131                    if (repositoryId != null) {
132                            setRepositoryId(repositoryId);
133                    }
134    
135                    String mappedId = (String)attributes.get("mappedId");
136    
137                    if (mappedId != null) {
138                            setMappedId(mappedId);
139                    }
140    
141                    Boolean manualCheckInRequired = (Boolean)attributes.get(
142                                    "manualCheckInRequired");
143    
144                    if (manualCheckInRequired != null) {
145                            setManualCheckInRequired(manualCheckInRequired);
146                    }
147            }
148    
149            @Override
150            public java.lang.Object clone() {
151                    return new RepositoryEntryWrapper((RepositoryEntry)_repositoryEntry.clone());
152            }
153    
154            @Override
155            public int compareTo(
156                    com.liferay.portal.model.RepositoryEntry repositoryEntry) {
157                    return _repositoryEntry.compareTo(repositoryEntry);
158            }
159    
160            /**
161            * Returns the company ID of this repository entry.
162            *
163            * @return the company ID of this repository entry
164            */
165            @Override
166            public long getCompanyId() {
167                    return _repositoryEntry.getCompanyId();
168            }
169    
170            /**
171            * Returns the create date of this repository entry.
172            *
173            * @return the create date of this repository entry
174            */
175            @Override
176            public Date getCreateDate() {
177                    return _repositoryEntry.getCreateDate();
178            }
179    
180            @Override
181            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
182                    return _repositoryEntry.getExpandoBridge();
183            }
184    
185            /**
186            * Returns the group ID of this repository entry.
187            *
188            * @return the group ID of this repository entry
189            */
190            @Override
191            public long getGroupId() {
192                    return _repositoryEntry.getGroupId();
193            }
194    
195            /**
196            * Returns the manual check in required of this repository entry.
197            *
198            * @return the manual check in required of this repository entry
199            */
200            @Override
201            public boolean getManualCheckInRequired() {
202                    return _repositoryEntry.getManualCheckInRequired();
203            }
204    
205            /**
206            * Returns the mapped ID of this repository entry.
207            *
208            * @return the mapped ID of this repository entry
209            */
210            @Override
211            public java.lang.String getMappedId() {
212                    return _repositoryEntry.getMappedId();
213            }
214    
215            /**
216            * Returns the modified date of this repository entry.
217            *
218            * @return the modified date of this repository entry
219            */
220            @Override
221            public Date getModifiedDate() {
222                    return _repositoryEntry.getModifiedDate();
223            }
224    
225            /**
226            * Returns the mvcc version of this repository entry.
227            *
228            * @return the mvcc version of this repository entry
229            */
230            @Override
231            public long getMvccVersion() {
232                    return _repositoryEntry.getMvccVersion();
233            }
234    
235            /**
236            * Returns the primary key of this repository entry.
237            *
238            * @return the primary key of this repository entry
239            */
240            @Override
241            public long getPrimaryKey() {
242                    return _repositoryEntry.getPrimaryKey();
243            }
244    
245            @Override
246            public java.io.Serializable getPrimaryKeyObj() {
247                    return _repositoryEntry.getPrimaryKeyObj();
248            }
249    
250            /**
251            * Returns the repository entry ID of this repository entry.
252            *
253            * @return the repository entry ID of this repository entry
254            */
255            @Override
256            public long getRepositoryEntryId() {
257                    return _repositoryEntry.getRepositoryEntryId();
258            }
259    
260            /**
261            * Returns the repository ID of this repository entry.
262            *
263            * @return the repository ID of this repository entry
264            */
265            @Override
266            public long getRepositoryId() {
267                    return _repositoryEntry.getRepositoryId();
268            }
269    
270            /**
271            * Returns the user ID of this repository entry.
272            *
273            * @return the user ID of this repository entry
274            */
275            @Override
276            public long getUserId() {
277                    return _repositoryEntry.getUserId();
278            }
279    
280            /**
281            * Returns the user name of this repository entry.
282            *
283            * @return the user name of this repository entry
284            */
285            @Override
286            public java.lang.String getUserName() {
287                    return _repositoryEntry.getUserName();
288            }
289    
290            /**
291            * Returns the user uuid of this repository entry.
292            *
293            * @return the user uuid of this repository entry
294            */
295            @Override
296            public java.lang.String getUserUuid() {
297                    return _repositoryEntry.getUserUuid();
298            }
299    
300            /**
301            * Returns the uuid of this repository entry.
302            *
303            * @return the uuid of this repository entry
304            */
305            @Override
306            public java.lang.String getUuid() {
307                    return _repositoryEntry.getUuid();
308            }
309    
310            @Override
311            public int hashCode() {
312                    return _repositoryEntry.hashCode();
313            }
314    
315            @Override
316            public boolean isCachedModel() {
317                    return _repositoryEntry.isCachedModel();
318            }
319    
320            @Override
321            public boolean isEscapedModel() {
322                    return _repositoryEntry.isEscapedModel();
323            }
324    
325            /**
326            * Returns <code>true</code> if this repository entry is manual check in required.
327            *
328            * @return <code>true</code> if this repository entry is manual check in required; <code>false</code> otherwise
329            */
330            @Override
331            public boolean isManualCheckInRequired() {
332                    return _repositoryEntry.isManualCheckInRequired();
333            }
334    
335            @Override
336            public boolean isNew() {
337                    return _repositoryEntry.isNew();
338            }
339    
340            @Override
341            public void persist() {
342                    _repositoryEntry.persist();
343            }
344    
345            @Override
346            public void setCachedModel(boolean cachedModel) {
347                    _repositoryEntry.setCachedModel(cachedModel);
348            }
349    
350            /**
351            * Sets the company ID of this repository entry.
352            *
353            * @param companyId the company ID of this repository entry
354            */
355            @Override
356            public void setCompanyId(long companyId) {
357                    _repositoryEntry.setCompanyId(companyId);
358            }
359    
360            /**
361            * Sets the create date of this repository entry.
362            *
363            * @param createDate the create date of this repository entry
364            */
365            @Override
366            public void setCreateDate(Date createDate) {
367                    _repositoryEntry.setCreateDate(createDate);
368            }
369    
370            @Override
371            public void setExpandoBridgeAttributes(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(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 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    }