001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class ClusterGroupWrapper implements ClusterGroup,
032 ModelWrapper<ClusterGroup> {
033 public ClusterGroupWrapper(ClusterGroup clusterGroup) {
034 _clusterGroup = clusterGroup;
035 }
036
037 public Class<?> getModelClass() {
038 return ClusterGroup.class;
039 }
040
041 public String getModelClassName() {
042 return ClusterGroup.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("clusterGroupId", getClusterGroupId());
049 attributes.put("name", getName());
050 attributes.put("clusterNodeIds", getClusterNodeIds());
051 attributes.put("wholeCluster", getWholeCluster());
052
053 return attributes;
054 }
055
056 public void setModelAttributes(Map<String, Object> attributes) {
057 Long clusterGroupId = (Long)attributes.get("clusterGroupId");
058
059 if (clusterGroupId != null) {
060 setClusterGroupId(clusterGroupId);
061 }
062
063 String name = (String)attributes.get("name");
064
065 if (name != null) {
066 setName(name);
067 }
068
069 String clusterNodeIds = (String)attributes.get("clusterNodeIds");
070
071 if (clusterNodeIds != null) {
072 setClusterNodeIds(clusterNodeIds);
073 }
074
075 Boolean wholeCluster = (Boolean)attributes.get("wholeCluster");
076
077 if (wholeCluster != null) {
078 setWholeCluster(wholeCluster);
079 }
080 }
081
082
087 public long getPrimaryKey() {
088 return _clusterGroup.getPrimaryKey();
089 }
090
091
096 public void setPrimaryKey(long primaryKey) {
097 _clusterGroup.setPrimaryKey(primaryKey);
098 }
099
100
105 public long getClusterGroupId() {
106 return _clusterGroup.getClusterGroupId();
107 }
108
109
114 public void setClusterGroupId(long clusterGroupId) {
115 _clusterGroup.setClusterGroupId(clusterGroupId);
116 }
117
118
123 public java.lang.String getName() {
124 return _clusterGroup.getName();
125 }
126
127
132 public void setName(java.lang.String name) {
133 _clusterGroup.setName(name);
134 }
135
136
141 public java.lang.String getClusterNodeIds() {
142 return _clusterGroup.getClusterNodeIds();
143 }
144
145
150 public void setClusterNodeIds(java.lang.String clusterNodeIds) {
151 _clusterGroup.setClusterNodeIds(clusterNodeIds);
152 }
153
154
159 public boolean getWholeCluster() {
160 return _clusterGroup.getWholeCluster();
161 }
162
163
168 public boolean isWholeCluster() {
169 return _clusterGroup.isWholeCluster();
170 }
171
172
177 public void setWholeCluster(boolean wholeCluster) {
178 _clusterGroup.setWholeCluster(wholeCluster);
179 }
180
181 public boolean isNew() {
182 return _clusterGroup.isNew();
183 }
184
185 public void setNew(boolean n) {
186 _clusterGroup.setNew(n);
187 }
188
189 public boolean isCachedModel() {
190 return _clusterGroup.isCachedModel();
191 }
192
193 public void setCachedModel(boolean cachedModel) {
194 _clusterGroup.setCachedModel(cachedModel);
195 }
196
197 public boolean isEscapedModel() {
198 return _clusterGroup.isEscapedModel();
199 }
200
201 public java.io.Serializable getPrimaryKeyObj() {
202 return _clusterGroup.getPrimaryKeyObj();
203 }
204
205 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
206 _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
207 }
208
209 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
210 return _clusterGroup.getExpandoBridge();
211 }
212
213 public void setExpandoBridgeAttributes(
214 com.liferay.portal.service.ServiceContext serviceContext) {
215 _clusterGroup.setExpandoBridgeAttributes(serviceContext);
216 }
217
218 @Override
219 public java.lang.Object clone() {
220 return new ClusterGroupWrapper((ClusterGroup)_clusterGroup.clone());
221 }
222
223 public int compareTo(com.liferay.portal.model.ClusterGroup clusterGroup) {
224 return _clusterGroup.compareTo(clusterGroup);
225 }
226
227 @Override
228 public int hashCode() {
229 return _clusterGroup.hashCode();
230 }
231
232 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ClusterGroup> toCacheModel() {
233 return _clusterGroup.toCacheModel();
234 }
235
236 public com.liferay.portal.model.ClusterGroup toEscapedModel() {
237 return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
238 }
239
240 public com.liferay.portal.model.ClusterGroup toUnescapedModel() {
241 return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
242 }
243
244 @Override
245 public java.lang.String toString() {
246 return _clusterGroup.toString();
247 }
248
249 public java.lang.String toXmlString() {
250 return _clusterGroup.toXmlString();
251 }
252
253 public void persist()
254 throws com.liferay.portal.kernel.exception.SystemException {
255 _clusterGroup.persist();
256 }
257
258 public java.lang.String[] getClusterNodeIdsArray() {
259 return _clusterGroup.getClusterNodeIdsArray();
260 }
261
262 @Override
263 public boolean equals(Object obj) {
264 if (this == obj) {
265 return true;
266 }
267
268 if (!(obj instanceof ClusterGroupWrapper)) {
269 return false;
270 }
271
272 ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
273
274 if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
275 return true;
276 }
277
278 return false;
279 }
280
281
284 public ClusterGroup getWrappedClusterGroup() {
285 return _clusterGroup;
286 }
287
288 public ClusterGroup getWrappedModel() {
289 return _clusterGroup;
290 }
291
292 public void resetOriginalValues() {
293 _clusterGroup.resetOriginalValues();
294 }
295
296 private ClusterGroup _clusterGroup;
297 }