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 ClusterGroup}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see ClusterGroup
031     * @generated
032     */
033    @ProviderType
034    public class ClusterGroupWrapper implements ClusterGroup,
035            ModelWrapper<ClusterGroup> {
036            public ClusterGroupWrapper(ClusterGroup clusterGroup) {
037                    _clusterGroup = clusterGroup;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return ClusterGroup.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return ClusterGroup.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("clusterGroupId", getClusterGroupId());
056                    attributes.put("name", getName());
057                    attributes.put("clusterNodeIds", getClusterNodeIds());
058                    attributes.put("wholeCluster", getWholeCluster());
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 clusterGroupId = (Long)attributes.get("clusterGroupId");
072    
073                    if (clusterGroupId != null) {
074                            setClusterGroupId(clusterGroupId);
075                    }
076    
077                    String name = (String)attributes.get("name");
078    
079                    if (name != null) {
080                            setName(name);
081                    }
082    
083                    String clusterNodeIds = (String)attributes.get("clusterNodeIds");
084    
085                    if (clusterNodeIds != null) {
086                            setClusterNodeIds(clusterNodeIds);
087                    }
088    
089                    Boolean wholeCluster = (Boolean)attributes.get("wholeCluster");
090    
091                    if (wholeCluster != null) {
092                            setWholeCluster(wholeCluster);
093                    }
094            }
095    
096            @Override
097            public java.lang.Object clone() {
098                    return new ClusterGroupWrapper((ClusterGroup)_clusterGroup.clone());
099            }
100    
101            @Override
102            public int compareTo(com.liferay.portal.model.ClusterGroup clusterGroup) {
103                    return _clusterGroup.compareTo(clusterGroup);
104            }
105    
106            /**
107            * Returns the cluster group ID of this cluster group.
108            *
109            * @return the cluster group ID of this cluster group
110            */
111            @Override
112            public long getClusterGroupId() {
113                    return _clusterGroup.getClusterGroupId();
114            }
115    
116            /**
117            * Returns the cluster node IDs of this cluster group.
118            *
119            * @return the cluster node IDs of this cluster group
120            */
121            @Override
122            public java.lang.String getClusterNodeIds() {
123                    return _clusterGroup.getClusterNodeIds();
124            }
125    
126            @Override
127            public java.lang.String[] getClusterNodeIdsArray() {
128                    return _clusterGroup.getClusterNodeIdsArray();
129            }
130    
131            @Override
132            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
133                    return _clusterGroup.getExpandoBridge();
134            }
135    
136            /**
137            * Returns the mvcc version of this cluster group.
138            *
139            * @return the mvcc version of this cluster group
140            */
141            @Override
142            public long getMvccVersion() {
143                    return _clusterGroup.getMvccVersion();
144            }
145    
146            /**
147            * Returns the name of this cluster group.
148            *
149            * @return the name of this cluster group
150            */
151            @Override
152            public java.lang.String getName() {
153                    return _clusterGroup.getName();
154            }
155    
156            /**
157            * Returns the primary key of this cluster group.
158            *
159            * @return the primary key of this cluster group
160            */
161            @Override
162            public long getPrimaryKey() {
163                    return _clusterGroup.getPrimaryKey();
164            }
165    
166            @Override
167            public java.io.Serializable getPrimaryKeyObj() {
168                    return _clusterGroup.getPrimaryKeyObj();
169            }
170    
171            /**
172            * Returns the whole cluster of this cluster group.
173            *
174            * @return the whole cluster of this cluster group
175            */
176            @Override
177            public boolean getWholeCluster() {
178                    return _clusterGroup.getWholeCluster();
179            }
180    
181            @Override
182            public int hashCode() {
183                    return _clusterGroup.hashCode();
184            }
185    
186            @Override
187            public boolean isCachedModel() {
188                    return _clusterGroup.isCachedModel();
189            }
190    
191            @Override
192            public boolean isEscapedModel() {
193                    return _clusterGroup.isEscapedModel();
194            }
195    
196            @Override
197            public boolean isNew() {
198                    return _clusterGroup.isNew();
199            }
200    
201            /**
202            * Returns <code>true</code> if this cluster group is whole cluster.
203            *
204            * @return <code>true</code> if this cluster group is whole cluster; <code>false</code> otherwise
205            */
206            @Override
207            public boolean isWholeCluster() {
208                    return _clusterGroup.isWholeCluster();
209            }
210    
211            @Override
212            public void persist() {
213                    _clusterGroup.persist();
214            }
215    
216            @Override
217            public void setCachedModel(boolean cachedModel) {
218                    _clusterGroup.setCachedModel(cachedModel);
219            }
220    
221            /**
222            * Sets the cluster group ID of this cluster group.
223            *
224            * @param clusterGroupId the cluster group ID of this cluster group
225            */
226            @Override
227            public void setClusterGroupId(long clusterGroupId) {
228                    _clusterGroup.setClusterGroupId(clusterGroupId);
229            }
230    
231            /**
232            * Sets the cluster node IDs of this cluster group.
233            *
234            * @param clusterNodeIds the cluster node IDs of this cluster group
235            */
236            @Override
237            public void setClusterNodeIds(java.lang.String clusterNodeIds) {
238                    _clusterGroup.setClusterNodeIds(clusterNodeIds);
239            }
240    
241            @Override
242            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
243                    _clusterGroup.setExpandoBridgeAttributes(baseModel);
244            }
245    
246            @Override
247            public void setExpandoBridgeAttributes(
248                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
249                    _clusterGroup.setExpandoBridgeAttributes(expandoBridge);
250            }
251    
252            @Override
253            public void setExpandoBridgeAttributes(
254                    com.liferay.portal.service.ServiceContext serviceContext) {
255                    _clusterGroup.setExpandoBridgeAttributes(serviceContext);
256            }
257    
258            /**
259            * Sets the mvcc version of this cluster group.
260            *
261            * @param mvccVersion the mvcc version of this cluster group
262            */
263            @Override
264            public void setMvccVersion(long mvccVersion) {
265                    _clusterGroup.setMvccVersion(mvccVersion);
266            }
267    
268            /**
269            * Sets the name of this cluster group.
270            *
271            * @param name the name of this cluster group
272            */
273            @Override
274            public void setName(java.lang.String name) {
275                    _clusterGroup.setName(name);
276            }
277    
278            @Override
279            public void setNew(boolean n) {
280                    _clusterGroup.setNew(n);
281            }
282    
283            /**
284            * Sets the primary key of this cluster group.
285            *
286            * @param primaryKey the primary key of this cluster group
287            */
288            @Override
289            public void setPrimaryKey(long primaryKey) {
290                    _clusterGroup.setPrimaryKey(primaryKey);
291            }
292    
293            @Override
294            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
295                    _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
296            }
297    
298            /**
299            * Sets whether this cluster group is whole cluster.
300            *
301            * @param wholeCluster the whole cluster of this cluster group
302            */
303            @Override
304            public void setWholeCluster(boolean wholeCluster) {
305                    _clusterGroup.setWholeCluster(wholeCluster);
306            }
307    
308            @Override
309            public CacheModel<com.liferay.portal.model.ClusterGroup> toCacheModel() {
310                    return _clusterGroup.toCacheModel();
311            }
312    
313            @Override
314            public com.liferay.portal.model.ClusterGroup toEscapedModel() {
315                    return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
316            }
317    
318            @Override
319            public java.lang.String toString() {
320                    return _clusterGroup.toString();
321            }
322    
323            @Override
324            public com.liferay.portal.model.ClusterGroup toUnescapedModel() {
325                    return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
326            }
327    
328            @Override
329            public java.lang.String toXmlString() {
330                    return _clusterGroup.toXmlString();
331            }
332    
333            @Override
334            public boolean equals(Object obj) {
335                    if (this == obj) {
336                            return true;
337                    }
338    
339                    if (!(obj instanceof ClusterGroupWrapper)) {
340                            return false;
341                    }
342    
343                    ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
344    
345                    if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
346                            return true;
347                    }
348    
349                    return false;
350            }
351    
352            @Override
353            public ClusterGroup getWrappedModel() {
354                    return _clusterGroup;
355            }
356    
357            @Override
358            public boolean isEntityCacheEnabled() {
359                    return _clusterGroup.isEntityCacheEnabled();
360            }
361    
362            @Override
363            public boolean isFinderCacheEnabled() {
364                    return _clusterGroup.isFinderCacheEnabled();
365            }
366    
367            @Override
368            public void resetOriginalValues() {
369                    _clusterGroup.resetOriginalValues();
370            }
371    
372            private final ClusterGroup _clusterGroup;
373    }