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.portal.model;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link PortletPreferences}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       PortletPreferences
024     * @generated
025     */
026    public class PortletPreferencesWrapper implements PortletPreferences,
027            ModelWrapper<PortletPreferences> {
028            public PortletPreferencesWrapper(PortletPreferences portletPreferences) {
029                    _portletPreferences = portletPreferences;
030            }
031    
032            public Class<?> getModelClass() {
033                    return PortletPreferences.class;
034            }
035    
036            public String getModelClassName() {
037                    return PortletPreferences.class.getName();
038            }
039    
040            /**
041            * Returns the primary key of this portlet preferences.
042            *
043            * @return the primary key of this portlet preferences
044            */
045            public long getPrimaryKey() {
046                    return _portletPreferences.getPrimaryKey();
047            }
048    
049            /**
050            * Sets the primary key of this portlet preferences.
051            *
052            * @param primaryKey the primary key of this portlet preferences
053            */
054            public void setPrimaryKey(long primaryKey) {
055                    _portletPreferences.setPrimaryKey(primaryKey);
056            }
057    
058            /**
059            * Returns the portlet preferences ID of this portlet preferences.
060            *
061            * @return the portlet preferences ID of this portlet preferences
062            */
063            public long getPortletPreferencesId() {
064                    return _portletPreferences.getPortletPreferencesId();
065            }
066    
067            /**
068            * Sets the portlet preferences ID of this portlet preferences.
069            *
070            * @param portletPreferencesId the portlet preferences ID of this portlet preferences
071            */
072            public void setPortletPreferencesId(long portletPreferencesId) {
073                    _portletPreferences.setPortletPreferencesId(portletPreferencesId);
074            }
075    
076            /**
077            * Returns the owner ID of this portlet preferences.
078            *
079            * @return the owner ID of this portlet preferences
080            */
081            public long getOwnerId() {
082                    return _portletPreferences.getOwnerId();
083            }
084    
085            /**
086            * Sets the owner ID of this portlet preferences.
087            *
088            * @param ownerId the owner ID of this portlet preferences
089            */
090            public void setOwnerId(long ownerId) {
091                    _portletPreferences.setOwnerId(ownerId);
092            }
093    
094            /**
095            * Returns the owner type of this portlet preferences.
096            *
097            * @return the owner type of this portlet preferences
098            */
099            public int getOwnerType() {
100                    return _portletPreferences.getOwnerType();
101            }
102    
103            /**
104            * Sets the owner type of this portlet preferences.
105            *
106            * @param ownerType the owner type of this portlet preferences
107            */
108            public void setOwnerType(int ownerType) {
109                    _portletPreferences.setOwnerType(ownerType);
110            }
111    
112            /**
113            * Returns the plid of this portlet preferences.
114            *
115            * @return the plid of this portlet preferences
116            */
117            public long getPlid() {
118                    return _portletPreferences.getPlid();
119            }
120    
121            /**
122            * Sets the plid of this portlet preferences.
123            *
124            * @param plid the plid of this portlet preferences
125            */
126            public void setPlid(long plid) {
127                    _portletPreferences.setPlid(plid);
128            }
129    
130            /**
131            * Returns the portlet ID of this portlet preferences.
132            *
133            * @return the portlet ID of this portlet preferences
134            */
135            public java.lang.String getPortletId() {
136                    return _portletPreferences.getPortletId();
137            }
138    
139            /**
140            * Sets the portlet ID of this portlet preferences.
141            *
142            * @param portletId the portlet ID of this portlet preferences
143            */
144            public void setPortletId(java.lang.String portletId) {
145                    _portletPreferences.setPortletId(portletId);
146            }
147    
148            /**
149            * Returns the preferences of this portlet preferences.
150            *
151            * @return the preferences of this portlet preferences
152            */
153            public java.lang.String getPreferences() {
154                    return _portletPreferences.getPreferences();
155            }
156    
157            /**
158            * Sets the preferences of this portlet preferences.
159            *
160            * @param preferences the preferences of this portlet preferences
161            */
162            public void setPreferences(java.lang.String preferences) {
163                    _portletPreferences.setPreferences(preferences);
164            }
165    
166            public boolean isNew() {
167                    return _portletPreferences.isNew();
168            }
169    
170            public void setNew(boolean n) {
171                    _portletPreferences.setNew(n);
172            }
173    
174            public boolean isCachedModel() {
175                    return _portletPreferences.isCachedModel();
176            }
177    
178            public void setCachedModel(boolean cachedModel) {
179                    _portletPreferences.setCachedModel(cachedModel);
180            }
181    
182            public boolean isEscapedModel() {
183                    return _portletPreferences.isEscapedModel();
184            }
185    
186            public java.io.Serializable getPrimaryKeyObj() {
187                    return _portletPreferences.getPrimaryKeyObj();
188            }
189    
190            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
191                    _portletPreferences.setPrimaryKeyObj(primaryKeyObj);
192            }
193    
194            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
195                    return _portletPreferences.getExpandoBridge();
196            }
197    
198            public void setExpandoBridgeAttributes(
199                    com.liferay.portal.service.ServiceContext serviceContext) {
200                    _portletPreferences.setExpandoBridgeAttributes(serviceContext);
201            }
202    
203            @Override
204            public java.lang.Object clone() {
205                    return new PortletPreferencesWrapper((PortletPreferences)_portletPreferences.clone());
206            }
207    
208            public int compareTo(
209                    com.liferay.portal.model.PortletPreferences portletPreferences) {
210                    return _portletPreferences.compareTo(portletPreferences);
211            }
212    
213            @Override
214            public int hashCode() {
215                    return _portletPreferences.hashCode();
216            }
217    
218            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.PortletPreferences> toCacheModel() {
219                    return _portletPreferences.toCacheModel();
220            }
221    
222            public com.liferay.portal.model.PortletPreferences toEscapedModel() {
223                    return new PortletPreferencesWrapper(_portletPreferences.toEscapedModel());
224            }
225    
226            @Override
227            public java.lang.String toString() {
228                    return _portletPreferences.toString();
229            }
230    
231            public java.lang.String toXmlString() {
232                    return _portletPreferences.toXmlString();
233            }
234    
235            public void persist()
236                    throws com.liferay.portal.kernel.exception.SystemException {
237                    _portletPreferences.persist();
238            }
239    
240            /**
241             * @deprecated Renamed to {@link #getWrappedModel}
242             */
243            public PortletPreferences getWrappedPortletPreferences() {
244                    return _portletPreferences;
245            }
246    
247            public PortletPreferences getWrappedModel() {
248                    return _portletPreferences;
249            }
250    
251            public void resetOriginalValues() {
252                    _portletPreferences.resetOriginalValues();
253            }
254    
255            private PortletPreferences _portletPreferences;
256    }