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