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