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    import com.liferay.portal.kernel.util.Validator;
025    
026    import java.io.Serializable;
027    
028    import java.util.Date;
029    import java.util.HashMap;
030    import java.util.Map;
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 java.lang.Object clone() {
163                    return new RepositoryEntryWrapper((RepositoryEntry)_repositoryEntry.clone());
164            }
165    
166            @Override
167            public int compareTo(
168                    com.liferay.portal.kernel.model.RepositoryEntry repositoryEntry) {
169                    return _repositoryEntry.compareTo(repositoryEntry);
170            }
171    
172            /**
173            * Returns the company ID of this repository entry.
174            *
175            * @return the company ID of this repository entry
176            */
177            @Override
178            public long getCompanyId() {
179                    return _repositoryEntry.getCompanyId();
180            }
181    
182            /**
183            * Returns the create date of this repository entry.
184            *
185            * @return the create date of this repository entry
186            */
187            @Override
188            public Date getCreateDate() {
189                    return _repositoryEntry.getCreateDate();
190            }
191    
192            @Override
193            public ExpandoBridge getExpandoBridge() {
194                    return _repositoryEntry.getExpandoBridge();
195            }
196    
197            /**
198            * Returns the group ID of this repository entry.
199            *
200            * @return the group ID of this repository entry
201            */
202            @Override
203            public long getGroupId() {
204                    return _repositoryEntry.getGroupId();
205            }
206    
207            /**
208            * Returns the last publish date of this repository entry.
209            *
210            * @return the last publish date of this repository entry
211            */
212            @Override
213            public Date getLastPublishDate() {
214                    return _repositoryEntry.getLastPublishDate();
215            }
216    
217            /**
218            * Returns the manual check in required of this repository entry.
219            *
220            * @return the manual check in required of this repository entry
221            */
222            @Override
223            public boolean getManualCheckInRequired() {
224                    return _repositoryEntry.getManualCheckInRequired();
225            }
226    
227            /**
228            * Returns the mapped ID of this repository entry.
229            *
230            * @return the mapped ID of this repository entry
231            */
232            @Override
233            public java.lang.String getMappedId() {
234                    return _repositoryEntry.getMappedId();
235            }
236    
237            /**
238            * Returns the modified date of this repository entry.
239            *
240            * @return the modified date of this repository entry
241            */
242            @Override
243            public Date getModifiedDate() {
244                    return _repositoryEntry.getModifiedDate();
245            }
246    
247            /**
248            * Returns the mvcc version of this repository entry.
249            *
250            * @return the mvcc version of this repository entry
251            */
252            @Override
253            public long getMvccVersion() {
254                    return _repositoryEntry.getMvccVersion();
255            }
256    
257            /**
258            * Returns the primary key of this repository entry.
259            *
260            * @return the primary key of this repository entry
261            */
262            @Override
263            public long getPrimaryKey() {
264                    return _repositoryEntry.getPrimaryKey();
265            }
266    
267            @Override
268            public Serializable getPrimaryKeyObj() {
269                    return _repositoryEntry.getPrimaryKeyObj();
270            }
271    
272            /**
273            * Returns the repository entry ID of this repository entry.
274            *
275            * @return the repository entry ID of this repository entry
276            */
277            @Override
278            public long getRepositoryEntryId() {
279                    return _repositoryEntry.getRepositoryEntryId();
280            }
281    
282            /**
283            * Returns the repository ID of this repository entry.
284            *
285            * @return the repository ID of this repository entry
286            */
287            @Override
288            public long getRepositoryId() {
289                    return _repositoryEntry.getRepositoryId();
290            }
291    
292            /**
293            * Returns the user ID of this repository entry.
294            *
295            * @return the user ID of this repository entry
296            */
297            @Override
298            public long getUserId() {
299                    return _repositoryEntry.getUserId();
300            }
301    
302            /**
303            * Returns the user name of this repository entry.
304            *
305            * @return the user name of this repository entry
306            */
307            @Override
308            public java.lang.String getUserName() {
309                    return _repositoryEntry.getUserName();
310            }
311    
312            /**
313            * Returns the user uuid of this repository entry.
314            *
315            * @return the user uuid of this repository entry
316            */
317            @Override
318            public java.lang.String getUserUuid() {
319                    return _repositoryEntry.getUserUuid();
320            }
321    
322            /**
323            * Returns the uuid of this repository entry.
324            *
325            * @return the uuid of this repository entry
326            */
327            @Override
328            public java.lang.String getUuid() {
329                    return _repositoryEntry.getUuid();
330            }
331    
332            @Override
333            public int hashCode() {
334                    return _repositoryEntry.hashCode();
335            }
336    
337            @Override
338            public boolean isCachedModel() {
339                    return _repositoryEntry.isCachedModel();
340            }
341    
342            @Override
343            public boolean isEscapedModel() {
344                    return _repositoryEntry.isEscapedModel();
345            }
346    
347            /**
348            * Returns <code>true</code> if this repository entry is manual check in required.
349            *
350            * @return <code>true</code> if this repository entry is manual check in required; <code>false</code> otherwise
351            */
352            @Override
353            public boolean isManualCheckInRequired() {
354                    return _repositoryEntry.isManualCheckInRequired();
355            }
356    
357            @Override
358            public boolean isNew() {
359                    return _repositoryEntry.isNew();
360            }
361    
362            @Override
363            public void persist() {
364                    _repositoryEntry.persist();
365            }
366    
367            @Override
368            public void setCachedModel(boolean cachedModel) {
369                    _repositoryEntry.setCachedModel(cachedModel);
370            }
371    
372            /**
373            * Sets the company ID of this repository entry.
374            *
375            * @param companyId the company ID of this repository entry
376            */
377            @Override
378            public void setCompanyId(long companyId) {
379                    _repositoryEntry.setCompanyId(companyId);
380            }
381    
382            /**
383            * Sets the create date of this repository entry.
384            *
385            * @param createDate the create date of this repository entry
386            */
387            @Override
388            public void setCreateDate(Date createDate) {
389                    _repositoryEntry.setCreateDate(createDate);
390            }
391    
392            @Override
393            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
394                    _repositoryEntry.setExpandoBridgeAttributes(baseModel);
395            }
396    
397            @Override
398            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
399                    _repositoryEntry.setExpandoBridgeAttributes(expandoBridge);
400            }
401    
402            @Override
403            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
404                    _repositoryEntry.setExpandoBridgeAttributes(serviceContext);
405            }
406    
407            /**
408            * Sets the group ID of this repository entry.
409            *
410            * @param groupId the group ID of this repository entry
411            */
412            @Override
413            public void setGroupId(long groupId) {
414                    _repositoryEntry.setGroupId(groupId);
415            }
416    
417            /**
418            * Sets the last publish date of this repository entry.
419            *
420            * @param lastPublishDate the last publish date of this repository entry
421            */
422            @Override
423            public void setLastPublishDate(Date lastPublishDate) {
424                    _repositoryEntry.setLastPublishDate(lastPublishDate);
425            }
426    
427            /**
428            * Sets whether this repository entry is manual check in required.
429            *
430            * @param manualCheckInRequired the manual check in required of this repository entry
431            */
432            @Override
433            public void setManualCheckInRequired(boolean manualCheckInRequired) {
434                    _repositoryEntry.setManualCheckInRequired(manualCheckInRequired);
435            }
436    
437            /**
438            * Sets the mapped ID of this repository entry.
439            *
440            * @param mappedId the mapped ID of this repository entry
441            */
442            @Override
443            public void setMappedId(java.lang.String mappedId) {
444                    _repositoryEntry.setMappedId(mappedId);
445            }
446    
447            /**
448            * Sets the modified date of this repository entry.
449            *
450            * @param modifiedDate the modified date of this repository entry
451            */
452            @Override
453            public void setModifiedDate(Date modifiedDate) {
454                    _repositoryEntry.setModifiedDate(modifiedDate);
455            }
456    
457            /**
458            * Sets the mvcc version of this repository entry.
459            *
460            * @param mvccVersion the mvcc version of this repository entry
461            */
462            @Override
463            public void setMvccVersion(long mvccVersion) {
464                    _repositoryEntry.setMvccVersion(mvccVersion);
465            }
466    
467            @Override
468            public void setNew(boolean n) {
469                    _repositoryEntry.setNew(n);
470            }
471    
472            /**
473            * Sets the primary key of this repository entry.
474            *
475            * @param primaryKey the primary key of this repository entry
476            */
477            @Override
478            public void setPrimaryKey(long primaryKey) {
479                    _repositoryEntry.setPrimaryKey(primaryKey);
480            }
481    
482            @Override
483            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
484                    _repositoryEntry.setPrimaryKeyObj(primaryKeyObj);
485            }
486    
487            /**
488            * Sets the repository entry ID of this repository entry.
489            *
490            * @param repositoryEntryId the repository entry ID of this repository entry
491            */
492            @Override
493            public void setRepositoryEntryId(long repositoryEntryId) {
494                    _repositoryEntry.setRepositoryEntryId(repositoryEntryId);
495            }
496    
497            /**
498            * Sets the repository ID of this repository entry.
499            *
500            * @param repositoryId the repository ID of this repository entry
501            */
502            @Override
503            public void setRepositoryId(long repositoryId) {
504                    _repositoryEntry.setRepositoryId(repositoryId);
505            }
506    
507            /**
508            * Sets the user ID of this repository entry.
509            *
510            * @param userId the user ID of this repository entry
511            */
512            @Override
513            public void setUserId(long userId) {
514                    _repositoryEntry.setUserId(userId);
515            }
516    
517            /**
518            * Sets the user name of this repository entry.
519            *
520            * @param userName the user name of this repository entry
521            */
522            @Override
523            public void setUserName(java.lang.String userName) {
524                    _repositoryEntry.setUserName(userName);
525            }
526    
527            /**
528            * Sets the user uuid of this repository entry.
529            *
530            * @param userUuid the user uuid of this repository entry
531            */
532            @Override
533            public void setUserUuid(java.lang.String userUuid) {
534                    _repositoryEntry.setUserUuid(userUuid);
535            }
536    
537            /**
538            * Sets the uuid of this repository entry.
539            *
540            * @param uuid the uuid of this repository entry
541            */
542            @Override
543            public void setUuid(java.lang.String uuid) {
544                    _repositoryEntry.setUuid(uuid);
545            }
546    
547            @Override
548            public CacheModel<com.liferay.portal.kernel.model.RepositoryEntry> toCacheModel() {
549                    return _repositoryEntry.toCacheModel();
550            }
551    
552            @Override
553            public com.liferay.portal.kernel.model.RepositoryEntry toEscapedModel() {
554                    return new RepositoryEntryWrapper(_repositoryEntry.toEscapedModel());
555            }
556    
557            @Override
558            public java.lang.String toString() {
559                    return _repositoryEntry.toString();
560            }
561    
562            @Override
563            public com.liferay.portal.kernel.model.RepositoryEntry toUnescapedModel() {
564                    return new RepositoryEntryWrapper(_repositoryEntry.toUnescapedModel());
565            }
566    
567            @Override
568            public java.lang.String toXmlString() {
569                    return _repositoryEntry.toXmlString();
570            }
571    
572            @Override
573            public boolean equals(Object obj) {
574                    if (this == obj) {
575                            return true;
576                    }
577    
578                    if (!(obj instanceof RepositoryEntryWrapper)) {
579                            return false;
580                    }
581    
582                    RepositoryEntryWrapper repositoryEntryWrapper = (RepositoryEntryWrapper)obj;
583    
584                    if (Validator.equals(_repositoryEntry,
585                                            repositoryEntryWrapper._repositoryEntry)) {
586                            return true;
587                    }
588    
589                    return false;
590            }
591    
592            @Override
593            public StagedModelType getStagedModelType() {
594                    return _repositoryEntry.getStagedModelType();
595            }
596    
597            @Override
598            public RepositoryEntry getWrappedModel() {
599                    return _repositoryEntry;
600            }
601    
602            @Override
603            public boolean isEntityCacheEnabled() {
604                    return _repositoryEntry.isEntityCacheEnabled();
605            }
606    
607            @Override
608            public boolean isFinderCacheEnabled() {
609                    return _repositoryEntry.isFinderCacheEnabled();
610            }
611    
612            @Override
613            public void resetOriginalValues() {
614                    _repositoryEntry.resetOriginalValues();
615            }
616    
617            private final RepositoryEntry _repositoryEntry;
618    }