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(BaseModel<?> baseModel) {
218                    _virtualHost.setExpandoBridgeAttributes(baseModel);
219            }
220    
221            @Override
222            public void setExpandoBridgeAttributes(
223                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
224                    _virtualHost.setExpandoBridgeAttributes(expandoBridge);
225            }
226    
227            @Override
228            public void setExpandoBridgeAttributes(
229                    com.liferay.portal.service.ServiceContext serviceContext) {
230                    _virtualHost.setExpandoBridgeAttributes(serviceContext);
231            }
232    
233            /**
234            * Sets the hostname of this virtual host.
235            *
236            * @param hostname the hostname of this virtual host
237            */
238            @Override
239            public void setHostname(java.lang.String hostname) {
240                    _virtualHost.setHostname(hostname);
241            }
242    
243            /**
244            * Sets the layout set ID of this virtual host.
245            *
246            * @param layoutSetId the layout set ID of this virtual host
247            */
248            @Override
249            public void setLayoutSetId(long layoutSetId) {
250                    _virtualHost.setLayoutSetId(layoutSetId);
251            }
252    
253            /**
254            * Sets the mvcc version of this virtual host.
255            *
256            * @param mvccVersion the mvcc version of this virtual host
257            */
258            @Override
259            public void setMvccVersion(long mvccVersion) {
260                    _virtualHost.setMvccVersion(mvccVersion);
261            }
262    
263            @Override
264            public void setNew(boolean n) {
265                    _virtualHost.setNew(n);
266            }
267    
268            /**
269            * Sets the primary key of this virtual host.
270            *
271            * @param primaryKey the primary key of this virtual host
272            */
273            @Override
274            public void setPrimaryKey(long primaryKey) {
275                    _virtualHost.setPrimaryKey(primaryKey);
276            }
277    
278            @Override
279            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
280                    _virtualHost.setPrimaryKeyObj(primaryKeyObj);
281            }
282    
283            /**
284            * Sets the virtual host ID of this virtual host.
285            *
286            * @param virtualHostId the virtual host ID of this virtual host
287            */
288            @Override
289            public void setVirtualHostId(long virtualHostId) {
290                    _virtualHost.setVirtualHostId(virtualHostId);
291            }
292    
293            @Override
294            public CacheModel<com.liferay.portal.model.VirtualHost> toCacheModel() {
295                    return _virtualHost.toCacheModel();
296            }
297    
298            @Override
299            public com.liferay.portal.model.VirtualHost toEscapedModel() {
300                    return new VirtualHostWrapper(_virtualHost.toEscapedModel());
301            }
302    
303            @Override
304            public java.lang.String toString() {
305                    return _virtualHost.toString();
306            }
307    
308            @Override
309            public com.liferay.portal.model.VirtualHost toUnescapedModel() {
310                    return new VirtualHostWrapper(_virtualHost.toUnescapedModel());
311            }
312    
313            @Override
314            public java.lang.String toXmlString() {
315                    return _virtualHost.toXmlString();
316            }
317    
318            @Override
319            public boolean equals(Object obj) {
320                    if (this == obj) {
321                            return true;
322                    }
323    
324                    if (!(obj instanceof VirtualHostWrapper)) {
325                            return false;
326                    }
327    
328                    VirtualHostWrapper virtualHostWrapper = (VirtualHostWrapper)obj;
329    
330                    if (Validator.equals(_virtualHost, virtualHostWrapper._virtualHost)) {
331                            return true;
332                    }
333    
334                    return false;
335            }
336    
337            @Override
338            public VirtualHost getWrappedModel() {
339                    return _virtualHost;
340            }
341    
342            @Override
343            public boolean isEntityCacheEnabled() {
344                    return _virtualHost.isEntityCacheEnabled();
345            }
346    
347            @Override
348            public boolean isFinderCacheEnabled() {
349                    return _virtualHost.isFinderCacheEnabled();
350            }
351    
352            @Override
353            public void resetOriginalValues() {
354                    _virtualHost.resetOriginalValues();
355            }
356    
357            private final VirtualHost _virtualHost;
358    }