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