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.dynamicdatamapping.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    import com.liferay.portal.model.ModelWrapper;
019    
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link DDMStorageLink}.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see DDMStorageLink
030     * @generated
031     */
032    public class DDMStorageLinkWrapper implements DDMStorageLink,
033            ModelWrapper<DDMStorageLink> {
034            public DDMStorageLinkWrapper(DDMStorageLink ddmStorageLink) {
035                    _ddmStorageLink = ddmStorageLink;
036            }
037    
038            @Override
039            public Class<?> getModelClass() {
040                    return DDMStorageLink.class;
041            }
042    
043            @Override
044            public String getModelClassName() {
045                    return DDMStorageLink.class.getName();
046            }
047    
048            @Override
049            public Map<String, Object> getModelAttributes() {
050                    Map<String, Object> attributes = new HashMap<String, Object>();
051    
052                    attributes.put("uuid", getUuid());
053                    attributes.put("storageLinkId", getStorageLinkId());
054                    attributes.put("classNameId", getClassNameId());
055                    attributes.put("classPK", getClassPK());
056                    attributes.put("structureId", getStructureId());
057    
058                    return attributes;
059            }
060    
061            @Override
062            public void setModelAttributes(Map<String, Object> attributes) {
063                    String uuid = (String)attributes.get("uuid");
064    
065                    if (uuid != null) {
066                            setUuid(uuid);
067                    }
068    
069                    Long storageLinkId = (Long)attributes.get("storageLinkId");
070    
071                    if (storageLinkId != null) {
072                            setStorageLinkId(storageLinkId);
073                    }
074    
075                    Long classNameId = (Long)attributes.get("classNameId");
076    
077                    if (classNameId != null) {
078                            setClassNameId(classNameId);
079                    }
080    
081                    Long classPK = (Long)attributes.get("classPK");
082    
083                    if (classPK != null) {
084                            setClassPK(classPK);
085                    }
086    
087                    Long structureId = (Long)attributes.get("structureId");
088    
089                    if (structureId != null) {
090                            setStructureId(structureId);
091                    }
092            }
093    
094            /**
095            * Returns the primary key of this d d m storage link.
096            *
097            * @return the primary key of this d d m storage link
098            */
099            @Override
100            public long getPrimaryKey() {
101                    return _ddmStorageLink.getPrimaryKey();
102            }
103    
104            /**
105            * Sets the primary key of this d d m storage link.
106            *
107            * @param primaryKey the primary key of this d d m storage link
108            */
109            @Override
110            public void setPrimaryKey(long primaryKey) {
111                    _ddmStorageLink.setPrimaryKey(primaryKey);
112            }
113    
114            /**
115            * Returns the uuid of this d d m storage link.
116            *
117            * @return the uuid of this d d m storage link
118            */
119            @Override
120            public java.lang.String getUuid() {
121                    return _ddmStorageLink.getUuid();
122            }
123    
124            /**
125            * Sets the uuid of this d d m storage link.
126            *
127            * @param uuid the uuid of this d d m storage link
128            */
129            @Override
130            public void setUuid(java.lang.String uuid) {
131                    _ddmStorageLink.setUuid(uuid);
132            }
133    
134            /**
135            * Returns the storage link ID of this d d m storage link.
136            *
137            * @return the storage link ID of this d d m storage link
138            */
139            @Override
140            public long getStorageLinkId() {
141                    return _ddmStorageLink.getStorageLinkId();
142            }
143    
144            /**
145            * Sets the storage link ID of this d d m storage link.
146            *
147            * @param storageLinkId the storage link ID of this d d m storage link
148            */
149            @Override
150            public void setStorageLinkId(long storageLinkId) {
151                    _ddmStorageLink.setStorageLinkId(storageLinkId);
152            }
153    
154            /**
155            * Returns the fully qualified class name of this d d m storage link.
156            *
157            * @return the fully qualified class name of this d d m storage link
158            */
159            @Override
160            public java.lang.String getClassName() {
161                    return _ddmStorageLink.getClassName();
162            }
163    
164            @Override
165            public void setClassName(java.lang.String className) {
166                    _ddmStorageLink.setClassName(className);
167            }
168    
169            /**
170            * Returns the class name ID of this d d m storage link.
171            *
172            * @return the class name ID of this d d m storage link
173            */
174            @Override
175            public long getClassNameId() {
176                    return _ddmStorageLink.getClassNameId();
177            }
178    
179            /**
180            * Sets the class name ID of this d d m storage link.
181            *
182            * @param classNameId the class name ID of this d d m storage link
183            */
184            @Override
185            public void setClassNameId(long classNameId) {
186                    _ddmStorageLink.setClassNameId(classNameId);
187            }
188    
189            /**
190            * Returns the class p k of this d d m storage link.
191            *
192            * @return the class p k of this d d m storage link
193            */
194            @Override
195            public long getClassPK() {
196                    return _ddmStorageLink.getClassPK();
197            }
198    
199            /**
200            * Sets the class p k of this d d m storage link.
201            *
202            * @param classPK the class p k of this d d m storage link
203            */
204            @Override
205            public void setClassPK(long classPK) {
206                    _ddmStorageLink.setClassPK(classPK);
207            }
208    
209            /**
210            * Returns the structure ID of this d d m storage link.
211            *
212            * @return the structure ID of this d d m storage link
213            */
214            @Override
215            public long getStructureId() {
216                    return _ddmStorageLink.getStructureId();
217            }
218    
219            /**
220            * Sets the structure ID of this d d m storage link.
221            *
222            * @param structureId the structure ID of this d d m storage link
223            */
224            @Override
225            public void setStructureId(long structureId) {
226                    _ddmStorageLink.setStructureId(structureId);
227            }
228    
229            @Override
230            public boolean isNew() {
231                    return _ddmStorageLink.isNew();
232            }
233    
234            @Override
235            public void setNew(boolean n) {
236                    _ddmStorageLink.setNew(n);
237            }
238    
239            @Override
240            public boolean isCachedModel() {
241                    return _ddmStorageLink.isCachedModel();
242            }
243    
244            @Override
245            public void setCachedModel(boolean cachedModel) {
246                    _ddmStorageLink.setCachedModel(cachedModel);
247            }
248    
249            @Override
250            public boolean isEscapedModel() {
251                    return _ddmStorageLink.isEscapedModel();
252            }
253    
254            @Override
255            public java.io.Serializable getPrimaryKeyObj() {
256                    return _ddmStorageLink.getPrimaryKeyObj();
257            }
258    
259            @Override
260            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
261                    _ddmStorageLink.setPrimaryKeyObj(primaryKeyObj);
262            }
263    
264            @Override
265            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
266                    return _ddmStorageLink.getExpandoBridge();
267            }
268    
269            @Override
270            public void setExpandoBridgeAttributes(
271                    com.liferay.portal.model.BaseModel<?> baseModel) {
272                    _ddmStorageLink.setExpandoBridgeAttributes(baseModel);
273            }
274    
275            @Override
276            public void setExpandoBridgeAttributes(
277                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
278                    _ddmStorageLink.setExpandoBridgeAttributes(expandoBridge);
279            }
280    
281            @Override
282            public void setExpandoBridgeAttributes(
283                    com.liferay.portal.service.ServiceContext serviceContext) {
284                    _ddmStorageLink.setExpandoBridgeAttributes(serviceContext);
285            }
286    
287            @Override
288            public java.lang.Object clone() {
289                    return new DDMStorageLinkWrapper((DDMStorageLink)_ddmStorageLink.clone());
290            }
291    
292            @Override
293            public int compareTo(
294                    com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink ddmStorageLink) {
295                    return _ddmStorageLink.compareTo(ddmStorageLink);
296            }
297    
298            @Override
299            public int hashCode() {
300                    return _ddmStorageLink.hashCode();
301            }
302    
303            @Override
304            public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink> toCacheModel() {
305                    return _ddmStorageLink.toCacheModel();
306            }
307    
308            @Override
309            public com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink toEscapedModel() {
310                    return new DDMStorageLinkWrapper(_ddmStorageLink.toEscapedModel());
311            }
312    
313            @Override
314            public com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink toUnescapedModel() {
315                    return new DDMStorageLinkWrapper(_ddmStorageLink.toUnescapedModel());
316            }
317    
318            @Override
319            public java.lang.String toString() {
320                    return _ddmStorageLink.toString();
321            }
322    
323            @Override
324            public java.lang.String toXmlString() {
325                    return _ddmStorageLink.toXmlString();
326            }
327    
328            @Override
329            public void persist()
330                    throws com.liferay.portal.kernel.exception.SystemException {
331                    _ddmStorageLink.persist();
332            }
333    
334            @Override
335            public java.lang.String getStorageType()
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    return _ddmStorageLink.getStorageType();
339            }
340    
341            @Override
342            public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure()
343                    throws com.liferay.portal.kernel.exception.PortalException,
344                            com.liferay.portal.kernel.exception.SystemException {
345                    return _ddmStorageLink.getStructure();
346            }
347    
348            @Override
349            public boolean equals(Object obj) {
350                    if (this == obj) {
351                            return true;
352                    }
353    
354                    if (!(obj instanceof DDMStorageLinkWrapper)) {
355                            return false;
356                    }
357    
358                    DDMStorageLinkWrapper ddmStorageLinkWrapper = (DDMStorageLinkWrapper)obj;
359    
360                    if (Validator.equals(_ddmStorageLink,
361                                            ddmStorageLinkWrapper._ddmStorageLink)) {
362                            return true;
363                    }
364    
365                    return false;
366            }
367    
368            /**
369             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
370             */
371            public DDMStorageLink getWrappedDDMStorageLink() {
372                    return _ddmStorageLink;
373            }
374    
375            @Override
376            public DDMStorageLink getWrappedModel() {
377                    return _ddmStorageLink;
378            }
379    
380            @Override
381            public void resetOriginalValues() {
382                    _ddmStorageLink.resetOriginalValues();
383            }
384    
385            private DDMStorageLink _ddmStorageLink;
386    }