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