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