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