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