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