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 java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link UserIdMapper}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see UserIdMapper
031     * @generated
032     */
033    @ProviderType
034    public class UserIdMapperWrapper implements UserIdMapper,
035            ModelWrapper<UserIdMapper> {
036            public UserIdMapperWrapper(UserIdMapper userIdMapper) {
037                    _userIdMapper = userIdMapper;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return UserIdMapper.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return UserIdMapper.class.getName();
048            }
049    
050            @Override
051            public Map<String, Object> getModelAttributes() {
052                    Map<String, Object> attributes = new HashMap<String, Object>();
053    
054                    attributes.put("mvccVersion", getMvccVersion());
055                    attributes.put("userIdMapperId", getUserIdMapperId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("userId", getUserId());
058                    attributes.put("type", getType());
059                    attributes.put("description", getDescription());
060                    attributes.put("externalUserId", getExternalUserId());
061    
062                    return attributes;
063            }
064    
065            @Override
066            public void setModelAttributes(Map<String, Object> attributes) {
067                    Long mvccVersion = (Long)attributes.get("mvccVersion");
068    
069                    if (mvccVersion != null) {
070                            setMvccVersion(mvccVersion);
071                    }
072    
073                    Long userIdMapperId = (Long)attributes.get("userIdMapperId");
074    
075                    if (userIdMapperId != null) {
076                            setUserIdMapperId(userIdMapperId);
077                    }
078    
079                    Long companyId = (Long)attributes.get("companyId");
080    
081                    if (companyId != null) {
082                            setCompanyId(companyId);
083                    }
084    
085                    Long userId = (Long)attributes.get("userId");
086    
087                    if (userId != null) {
088                            setUserId(userId);
089                    }
090    
091                    String type = (String)attributes.get("type");
092    
093                    if (type != null) {
094                            setType(type);
095                    }
096    
097                    String description = (String)attributes.get("description");
098    
099                    if (description != null) {
100                            setDescription(description);
101                    }
102    
103                    String externalUserId = (String)attributes.get("externalUserId");
104    
105                    if (externalUserId != null) {
106                            setExternalUserId(externalUserId);
107                    }
108            }
109    
110            @Override
111            public java.lang.Object clone() {
112                    return new UserIdMapperWrapper((UserIdMapper)_userIdMapper.clone());
113            }
114    
115            @Override
116            public int compareTo(com.liferay.portal.model.UserIdMapper userIdMapper) {
117                    return _userIdMapper.compareTo(userIdMapper);
118            }
119    
120            /**
121            * Returns the company ID of this user ID mapper.
122            *
123            * @return the company ID of this user ID mapper
124            */
125            @Override
126            public long getCompanyId() {
127                    return _userIdMapper.getCompanyId();
128            }
129    
130            /**
131            * Returns the description of this user ID mapper.
132            *
133            * @return the description of this user ID mapper
134            */
135            @Override
136            public java.lang.String getDescription() {
137                    return _userIdMapper.getDescription();
138            }
139    
140            @Override
141            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
142                    return _userIdMapper.getExpandoBridge();
143            }
144    
145            /**
146            * Returns the external user ID of this user ID mapper.
147            *
148            * @return the external user ID of this user ID mapper
149            */
150            @Override
151            public java.lang.String getExternalUserId() {
152                    return _userIdMapper.getExternalUserId();
153            }
154    
155            /**
156            * Returns the mvcc version of this user ID mapper.
157            *
158            * @return the mvcc version of this user ID mapper
159            */
160            @Override
161            public long getMvccVersion() {
162                    return _userIdMapper.getMvccVersion();
163            }
164    
165            /**
166            * Returns the primary key of this user ID mapper.
167            *
168            * @return the primary key of this user ID mapper
169            */
170            @Override
171            public long getPrimaryKey() {
172                    return _userIdMapper.getPrimaryKey();
173            }
174    
175            @Override
176            public java.io.Serializable getPrimaryKeyObj() {
177                    return _userIdMapper.getPrimaryKeyObj();
178            }
179    
180            /**
181            * Returns the type of this user ID mapper.
182            *
183            * @return the type of this user ID mapper
184            */
185            @Override
186            public java.lang.String getType() {
187                    return _userIdMapper.getType();
188            }
189    
190            /**
191            * Returns the user ID of this user ID mapper.
192            *
193            * @return the user ID of this user ID mapper
194            */
195            @Override
196            public long getUserId() {
197                    return _userIdMapper.getUserId();
198            }
199    
200            /**
201            * Returns the user ID mapper ID of this user ID mapper.
202            *
203            * @return the user ID mapper ID of this user ID mapper
204            */
205            @Override
206            public long getUserIdMapperId() {
207                    return _userIdMapper.getUserIdMapperId();
208            }
209    
210            /**
211            * Returns the user uuid of this user ID mapper.
212            *
213            * @return the user uuid of this user ID mapper
214            */
215            @Override
216            public java.lang.String getUserUuid() {
217                    return _userIdMapper.getUserUuid();
218            }
219    
220            @Override
221            public int hashCode() {
222                    return _userIdMapper.hashCode();
223            }
224    
225            @Override
226            public boolean isCachedModel() {
227                    return _userIdMapper.isCachedModel();
228            }
229    
230            @Override
231            public boolean isEscapedModel() {
232                    return _userIdMapper.isEscapedModel();
233            }
234    
235            @Override
236            public boolean isNew() {
237                    return _userIdMapper.isNew();
238            }
239    
240            @Override
241            public void persist() {
242                    _userIdMapper.persist();
243            }
244    
245            @Override
246            public void setCachedModel(boolean cachedModel) {
247                    _userIdMapper.setCachedModel(cachedModel);
248            }
249    
250            /**
251            * Sets the company ID of this user ID mapper.
252            *
253            * @param companyId the company ID of this user ID mapper
254            */
255            @Override
256            public void setCompanyId(long companyId) {
257                    _userIdMapper.setCompanyId(companyId);
258            }
259    
260            /**
261            * Sets the description of this user ID mapper.
262            *
263            * @param description the description of this user ID mapper
264            */
265            @Override
266            public void setDescription(java.lang.String description) {
267                    _userIdMapper.setDescription(description);
268            }
269    
270            @Override
271            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
272                    _userIdMapper.setExpandoBridgeAttributes(baseModel);
273            }
274    
275            @Override
276            public void setExpandoBridgeAttributes(
277                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
278                    _userIdMapper.setExpandoBridgeAttributes(expandoBridge);
279            }
280    
281            @Override
282            public void setExpandoBridgeAttributes(
283                    com.liferay.portal.service.ServiceContext serviceContext) {
284                    _userIdMapper.setExpandoBridgeAttributes(serviceContext);
285            }
286    
287            /**
288            * Sets the external user ID of this user ID mapper.
289            *
290            * @param externalUserId the external user ID of this user ID mapper
291            */
292            @Override
293            public void setExternalUserId(java.lang.String externalUserId) {
294                    _userIdMapper.setExternalUserId(externalUserId);
295            }
296    
297            /**
298            * Sets the mvcc version of this user ID mapper.
299            *
300            * @param mvccVersion the mvcc version of this user ID mapper
301            */
302            @Override
303            public void setMvccVersion(long mvccVersion) {
304                    _userIdMapper.setMvccVersion(mvccVersion);
305            }
306    
307            @Override
308            public void setNew(boolean n) {
309                    _userIdMapper.setNew(n);
310            }
311    
312            /**
313            * Sets the primary key of this user ID mapper.
314            *
315            * @param primaryKey the primary key of this user ID mapper
316            */
317            @Override
318            public void setPrimaryKey(long primaryKey) {
319                    _userIdMapper.setPrimaryKey(primaryKey);
320            }
321    
322            @Override
323            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
324                    _userIdMapper.setPrimaryKeyObj(primaryKeyObj);
325            }
326    
327            /**
328            * Sets the type of this user ID mapper.
329            *
330            * @param type the type of this user ID mapper
331            */
332            @Override
333            public void setType(java.lang.String type) {
334                    _userIdMapper.setType(type);
335            }
336    
337            /**
338            * Sets the user ID of this user ID mapper.
339            *
340            * @param userId the user ID of this user ID mapper
341            */
342            @Override
343            public void setUserId(long userId) {
344                    _userIdMapper.setUserId(userId);
345            }
346    
347            /**
348            * Sets the user ID mapper ID of this user ID mapper.
349            *
350            * @param userIdMapperId the user ID mapper ID of this user ID mapper
351            */
352            @Override
353            public void setUserIdMapperId(long userIdMapperId) {
354                    _userIdMapper.setUserIdMapperId(userIdMapperId);
355            }
356    
357            /**
358            * Sets the user uuid of this user ID mapper.
359            *
360            * @param userUuid the user uuid of this user ID mapper
361            */
362            @Override
363            public void setUserUuid(java.lang.String userUuid) {
364                    _userIdMapper.setUserUuid(userUuid);
365            }
366    
367            @Override
368            public CacheModel<com.liferay.portal.model.UserIdMapper> toCacheModel() {
369                    return _userIdMapper.toCacheModel();
370            }
371    
372            @Override
373            public com.liferay.portal.model.UserIdMapper toEscapedModel() {
374                    return new UserIdMapperWrapper(_userIdMapper.toEscapedModel());
375            }
376    
377            @Override
378            public java.lang.String toString() {
379                    return _userIdMapper.toString();
380            }
381    
382            @Override
383            public com.liferay.portal.model.UserIdMapper toUnescapedModel() {
384                    return new UserIdMapperWrapper(_userIdMapper.toUnescapedModel());
385            }
386    
387            @Override
388            public java.lang.String toXmlString() {
389                    return _userIdMapper.toXmlString();
390            }
391    
392            @Override
393            public boolean equals(Object obj) {
394                    if (this == obj) {
395                            return true;
396                    }
397    
398                    if (!(obj instanceof UserIdMapperWrapper)) {
399                            return false;
400                    }
401    
402                    UserIdMapperWrapper userIdMapperWrapper = (UserIdMapperWrapper)obj;
403    
404                    if (Validator.equals(_userIdMapper, userIdMapperWrapper._userIdMapper)) {
405                            return true;
406                    }
407    
408                    return false;
409            }
410    
411            @Override
412            public UserIdMapper getWrappedModel() {
413                    return _userIdMapper;
414            }
415    
416            @Override
417            public boolean isEntityCacheEnabled() {
418                    return _userIdMapper.isEntityCacheEnabled();
419            }
420    
421            @Override
422            public boolean isFinderCacheEnabled() {
423                    return _userIdMapper.isFinderCacheEnabled();
424            }
425    
426            @Override
427            public void resetOriginalValues() {
428                    _userIdMapper.resetOriginalValues();
429            }
430    
431            private final UserIdMapper _userIdMapper;
432    }