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 com.liferay.portal.kernel.util.Validator;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link UserIdMapper}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       UserIdMapper
029     * @generated
030     */
031    public class UserIdMapperWrapper implements UserIdMapper,
032            ModelWrapper<UserIdMapper> {
033            public UserIdMapperWrapper(UserIdMapper userIdMapper) {
034                    _userIdMapper = userIdMapper;
035            }
036    
037            public Class<?> getModelClass() {
038                    return UserIdMapper.class;
039            }
040    
041            public String getModelClassName() {
042                    return UserIdMapper.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("userIdMapperId", getUserIdMapperId());
049                    attributes.put("userId", getUserId());
050                    attributes.put("type", getType());
051                    attributes.put("description", getDescription());
052                    attributes.put("externalUserId", getExternalUserId());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    Long userIdMapperId = (Long)attributes.get("userIdMapperId");
059    
060                    if (userIdMapperId != null) {
061                            setUserIdMapperId(userIdMapperId);
062                    }
063    
064                    Long userId = (Long)attributes.get("userId");
065    
066                    if (userId != null) {
067                            setUserId(userId);
068                    }
069    
070                    String type = (String)attributes.get("type");
071    
072                    if (type != null) {
073                            setType(type);
074                    }
075    
076                    String description = (String)attributes.get("description");
077    
078                    if (description != null) {
079                            setDescription(description);
080                    }
081    
082                    String externalUserId = (String)attributes.get("externalUserId");
083    
084                    if (externalUserId != null) {
085                            setExternalUserId(externalUserId);
086                    }
087            }
088    
089            /**
090            * Returns the primary key of this user ID mapper.
091            *
092            * @return the primary key of this user ID mapper
093            */
094            public long getPrimaryKey() {
095                    return _userIdMapper.getPrimaryKey();
096            }
097    
098            /**
099            * Sets the primary key of this user ID mapper.
100            *
101            * @param primaryKey the primary key of this user ID mapper
102            */
103            public void setPrimaryKey(long primaryKey) {
104                    _userIdMapper.setPrimaryKey(primaryKey);
105            }
106    
107            /**
108            * Returns the user ID mapper ID of this user ID mapper.
109            *
110            * @return the user ID mapper ID of this user ID mapper
111            */
112            public long getUserIdMapperId() {
113                    return _userIdMapper.getUserIdMapperId();
114            }
115    
116            /**
117            * Sets the user ID mapper ID of this user ID mapper.
118            *
119            * @param userIdMapperId the user ID mapper ID of this user ID mapper
120            */
121            public void setUserIdMapperId(long userIdMapperId) {
122                    _userIdMapper.setUserIdMapperId(userIdMapperId);
123            }
124    
125            /**
126            * Returns the user ID of this user ID mapper.
127            *
128            * @return the user ID of this user ID mapper
129            */
130            public long getUserId() {
131                    return _userIdMapper.getUserId();
132            }
133    
134            /**
135            * Sets the user ID of this user ID mapper.
136            *
137            * @param userId the user ID of this user ID mapper
138            */
139            public void setUserId(long userId) {
140                    _userIdMapper.setUserId(userId);
141            }
142    
143            /**
144            * Returns the user uuid of this user ID mapper.
145            *
146            * @return the user uuid of this user ID mapper
147            * @throws SystemException if a system exception occurred
148            */
149            public java.lang.String getUserUuid()
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return _userIdMapper.getUserUuid();
152            }
153    
154            /**
155            * Sets the user uuid of this user ID mapper.
156            *
157            * @param userUuid the user uuid of this user ID mapper
158            */
159            public void setUserUuid(java.lang.String userUuid) {
160                    _userIdMapper.setUserUuid(userUuid);
161            }
162    
163            /**
164            * Returns the type of this user ID mapper.
165            *
166            * @return the type of this user ID mapper
167            */
168            public java.lang.String getType() {
169                    return _userIdMapper.getType();
170            }
171    
172            /**
173            * Sets the type of this user ID mapper.
174            *
175            * @param type the type of this user ID mapper
176            */
177            public void setType(java.lang.String type) {
178                    _userIdMapper.setType(type);
179            }
180    
181            /**
182            * Returns the description of this user ID mapper.
183            *
184            * @return the description of this user ID mapper
185            */
186            public java.lang.String getDescription() {
187                    return _userIdMapper.getDescription();
188            }
189    
190            /**
191            * Sets the description of this user ID mapper.
192            *
193            * @param description the description of this user ID mapper
194            */
195            public void setDescription(java.lang.String description) {
196                    _userIdMapper.setDescription(description);
197            }
198    
199            /**
200            * Returns the external user ID of this user ID mapper.
201            *
202            * @return the external user ID of this user ID mapper
203            */
204            public java.lang.String getExternalUserId() {
205                    return _userIdMapper.getExternalUserId();
206            }
207    
208            /**
209            * Sets the external user ID of this user ID mapper.
210            *
211            * @param externalUserId the external user ID of this user ID mapper
212            */
213            public void setExternalUserId(java.lang.String externalUserId) {
214                    _userIdMapper.setExternalUserId(externalUserId);
215            }
216    
217            public boolean isNew() {
218                    return _userIdMapper.isNew();
219            }
220    
221            public void setNew(boolean n) {
222                    _userIdMapper.setNew(n);
223            }
224    
225            public boolean isCachedModel() {
226                    return _userIdMapper.isCachedModel();
227            }
228    
229            public void setCachedModel(boolean cachedModel) {
230                    _userIdMapper.setCachedModel(cachedModel);
231            }
232    
233            public boolean isEscapedModel() {
234                    return _userIdMapper.isEscapedModel();
235            }
236    
237            public java.io.Serializable getPrimaryKeyObj() {
238                    return _userIdMapper.getPrimaryKeyObj();
239            }
240    
241            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
242                    _userIdMapper.setPrimaryKeyObj(primaryKeyObj);
243            }
244    
245            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
246                    return _userIdMapper.getExpandoBridge();
247            }
248    
249            public void setExpandoBridgeAttributes(
250                    com.liferay.portal.service.ServiceContext serviceContext) {
251                    _userIdMapper.setExpandoBridgeAttributes(serviceContext);
252            }
253    
254            @Override
255            public java.lang.Object clone() {
256                    return new UserIdMapperWrapper((UserIdMapper)_userIdMapper.clone());
257            }
258    
259            public int compareTo(com.liferay.portal.model.UserIdMapper userIdMapper) {
260                    return _userIdMapper.compareTo(userIdMapper);
261            }
262    
263            @Override
264            public int hashCode() {
265                    return _userIdMapper.hashCode();
266            }
267    
268            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserIdMapper> toCacheModel() {
269                    return _userIdMapper.toCacheModel();
270            }
271    
272            public com.liferay.portal.model.UserIdMapper toEscapedModel() {
273                    return new UserIdMapperWrapper(_userIdMapper.toEscapedModel());
274            }
275    
276            public com.liferay.portal.model.UserIdMapper toUnescapedModel() {
277                    return new UserIdMapperWrapper(_userIdMapper.toUnescapedModel());
278            }
279    
280            @Override
281            public java.lang.String toString() {
282                    return _userIdMapper.toString();
283            }
284    
285            public java.lang.String toXmlString() {
286                    return _userIdMapper.toXmlString();
287            }
288    
289            public void persist()
290                    throws com.liferay.portal.kernel.exception.SystemException {
291                    _userIdMapper.persist();
292            }
293    
294            @Override
295            public boolean equals(Object obj) {
296                    if (this == obj) {
297                            return true;
298                    }
299    
300                    if (!(obj instanceof UserIdMapperWrapper)) {
301                            return false;
302                    }
303    
304                    UserIdMapperWrapper userIdMapperWrapper = (UserIdMapperWrapper)obj;
305    
306                    if (Validator.equals(_userIdMapper, userIdMapperWrapper._userIdMapper)) {
307                            return true;
308                    }
309    
310                    return false;
311            }
312    
313            /**
314             * @deprecated Renamed to {@link #getWrappedModel}
315             */
316            public UserIdMapper getWrappedUserIdMapper() {
317                    return _userIdMapper;
318            }
319    
320            public UserIdMapper getWrappedModel() {
321                    return _userIdMapper;
322            }
323    
324            public void resetOriginalValues() {
325                    _userIdMapper.resetOriginalValues();
326            }
327    
328            private UserIdMapper _userIdMapper;
329    }