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(
243                    com.liferay.portal.model.BaseModel<?> baseModel) {
244                    _clusterGroup.setExpandoBridgeAttributes(baseModel);
245            }
246    
247            @Override
248            public void setExpandoBridgeAttributes(
249                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
250                    _clusterGroup.setExpandoBridgeAttributes(expandoBridge);
251            }
252    
253            @Override
254            public void setExpandoBridgeAttributes(
255                    com.liferay.portal.service.ServiceContext serviceContext) {
256                    _clusterGroup.setExpandoBridgeAttributes(serviceContext);
257            }
258    
259            /**
260            * Sets the mvcc version of this cluster group.
261            *
262            * @param mvccVersion the mvcc version of this cluster group
263            */
264            @Override
265            public void setMvccVersion(long mvccVersion) {
266                    _clusterGroup.setMvccVersion(mvccVersion);
267            }
268    
269            /**
270            * Sets the name of this cluster group.
271            *
272            * @param name the name of this cluster group
273            */
274            @Override
275            public void setName(java.lang.String name) {
276                    _clusterGroup.setName(name);
277            }
278    
279            @Override
280            public void setNew(boolean n) {
281                    _clusterGroup.setNew(n);
282            }
283    
284            /**
285            * Sets the primary key of this cluster group.
286            *
287            * @param primaryKey the primary key of this cluster group
288            */
289            @Override
290            public void setPrimaryKey(long primaryKey) {
291                    _clusterGroup.setPrimaryKey(primaryKey);
292            }
293    
294            @Override
295            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
296                    _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
297            }
298    
299            /**
300            * Sets whether this cluster group is whole cluster.
301            *
302            * @param wholeCluster the whole cluster of this cluster group
303            */
304            @Override
305            public void setWholeCluster(boolean wholeCluster) {
306                    _clusterGroup.setWholeCluster(wholeCluster);
307            }
308    
309            @Override
310            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ClusterGroup> toCacheModel() {
311                    return _clusterGroup.toCacheModel();
312            }
313    
314            @Override
315            public com.liferay.portal.model.ClusterGroup toEscapedModel() {
316                    return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
317            }
318    
319            @Override
320            public java.lang.String toString() {
321                    return _clusterGroup.toString();
322            }
323    
324            @Override
325            public com.liferay.portal.model.ClusterGroup toUnescapedModel() {
326                    return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
327            }
328    
329            @Override
330            public java.lang.String toXmlString() {
331                    return _clusterGroup.toXmlString();
332            }
333    
334            @Override
335            public boolean equals(Object obj) {
336                    if (this == obj) {
337                            return true;
338                    }
339    
340                    if (!(obj instanceof ClusterGroupWrapper)) {
341                            return false;
342                    }
343    
344                    ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
345    
346                    if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
347                            return true;
348                    }
349    
350                    return false;
351            }
352    
353            /**
354             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
355             */
356            @Deprecated
357            public ClusterGroup getWrappedClusterGroup() {
358                    return _clusterGroup;
359            }
360    
361            @Override
362            public ClusterGroup getWrappedModel() {
363                    return _clusterGroup;
364            }
365    
366            @Override
367            public boolean isEntityCacheEnabled() {
368                    return _clusterGroup.isEntityCacheEnabled();
369            }
370    
371            @Override
372            public boolean isFinderCacheEnabled() {
373                    return _clusterGroup.isFinderCacheEnabled();
374            }
375    
376            @Override
377            public void resetOriginalValues() {
378                    _clusterGroup.resetOriginalValues();
379            }
380    
381            private final ClusterGroup _clusterGroup;
382    }