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