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