001
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
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
111 @Override
112 public long getClusterGroupId() {
113 return _clusterGroup.getClusterGroupId();
114 }
115
116
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
141 @Override
142 public long getMvccVersion() {
143 return _clusterGroup.getMvccVersion();
144 }
145
146
151 @Override
152 public java.lang.String getName() {
153 return _clusterGroup.getName();
154 }
155
156
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
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
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
226 @Override
227 public void setClusterGroupId(long clusterGroupId) {
228 _clusterGroup.setClusterGroupId(clusterGroupId);
229 }
230
231
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
263 @Override
264 public void setMvccVersion(long mvccVersion) {
265 _clusterGroup.setMvccVersion(mvccVersion);
266 }
267
268
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
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
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 }