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