001
014
015 package com.liferay.portal.kernel.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.expando.kernel.model.ExpandoBridge;
020
021 import com.liferay.portal.kernel.service.ServiceContext;
022 import com.liferay.portal.kernel.util.Validator;
023
024 import java.io.Serializable;
025
026 import java.util.HashMap;
027 import java.util.Map;
028
029
038 @ProviderType
039 public class ClusterGroupWrapper implements ClusterGroup,
040 ModelWrapper<ClusterGroup> {
041 public ClusterGroupWrapper(ClusterGroup clusterGroup) {
042 _clusterGroup = clusterGroup;
043 }
044
045 @Override
046 public Class<?> getModelClass() {
047 return ClusterGroup.class;
048 }
049
050 @Override
051 public String getModelClassName() {
052 return ClusterGroup.class.getName();
053 }
054
055 @Override
056 public Map<String, Object> getModelAttributes() {
057 Map<String, Object> attributes = new HashMap<String, Object>();
058
059 attributes.put("mvccVersion", getMvccVersion());
060 attributes.put("clusterGroupId", getClusterGroupId());
061 attributes.put("name", getName());
062 attributes.put("clusterNodeIds", getClusterNodeIds());
063 attributes.put("wholeCluster", getWholeCluster());
064
065 return attributes;
066 }
067
068 @Override
069 public void setModelAttributes(Map<String, Object> attributes) {
070 Long mvccVersion = (Long)attributes.get("mvccVersion");
071
072 if (mvccVersion != null) {
073 setMvccVersion(mvccVersion);
074 }
075
076 Long clusterGroupId = (Long)attributes.get("clusterGroupId");
077
078 if (clusterGroupId != null) {
079 setClusterGroupId(clusterGroupId);
080 }
081
082 String name = (String)attributes.get("name");
083
084 if (name != null) {
085 setName(name);
086 }
087
088 String clusterNodeIds = (String)attributes.get("clusterNodeIds");
089
090 if (clusterNodeIds != null) {
091 setClusterNodeIds(clusterNodeIds);
092 }
093
094 Boolean wholeCluster = (Boolean)attributes.get("wholeCluster");
095
096 if (wholeCluster != null) {
097 setWholeCluster(wholeCluster);
098 }
099 }
100
101 @Override
102 public java.lang.Object clone() {
103 return new ClusterGroupWrapper((ClusterGroup)_clusterGroup.clone());
104 }
105
106 @Override
107 public int compareTo(
108 com.liferay.portal.kernel.model.ClusterGroup clusterGroup) {
109 return _clusterGroup.compareTo(clusterGroup);
110 }
111
112
117 @Override
118 public long getClusterGroupId() {
119 return _clusterGroup.getClusterGroupId();
120 }
121
122
127 @Override
128 public java.lang.String getClusterNodeIds() {
129 return _clusterGroup.getClusterNodeIds();
130 }
131
132 @Override
133 public java.lang.String[] getClusterNodeIdsArray() {
134 return _clusterGroup.getClusterNodeIdsArray();
135 }
136
137 @Override
138 public ExpandoBridge getExpandoBridge() {
139 return _clusterGroup.getExpandoBridge();
140 }
141
142
147 @Override
148 public long getMvccVersion() {
149 return _clusterGroup.getMvccVersion();
150 }
151
152
157 @Override
158 public java.lang.String getName() {
159 return _clusterGroup.getName();
160 }
161
162
167 @Override
168 public long getPrimaryKey() {
169 return _clusterGroup.getPrimaryKey();
170 }
171
172 @Override
173 public Serializable getPrimaryKeyObj() {
174 return _clusterGroup.getPrimaryKeyObj();
175 }
176
177
182 @Override
183 public boolean getWholeCluster() {
184 return _clusterGroup.getWholeCluster();
185 }
186
187 @Override
188 public int hashCode() {
189 return _clusterGroup.hashCode();
190 }
191
192 @Override
193 public boolean isCachedModel() {
194 return _clusterGroup.isCachedModel();
195 }
196
197 @Override
198 public boolean isEscapedModel() {
199 return _clusterGroup.isEscapedModel();
200 }
201
202 @Override
203 public boolean isNew() {
204 return _clusterGroup.isNew();
205 }
206
207
212 @Override
213 public boolean isWholeCluster() {
214 return _clusterGroup.isWholeCluster();
215 }
216
217 @Override
218 public void persist() {
219 _clusterGroup.persist();
220 }
221
222 @Override
223 public void setCachedModel(boolean cachedModel) {
224 _clusterGroup.setCachedModel(cachedModel);
225 }
226
227
232 @Override
233 public void setClusterGroupId(long clusterGroupId) {
234 _clusterGroup.setClusterGroupId(clusterGroupId);
235 }
236
237
242 @Override
243 public void setClusterNodeIds(java.lang.String clusterNodeIds) {
244 _clusterGroup.setClusterNodeIds(clusterNodeIds);
245 }
246
247 @Override
248 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
249 _clusterGroup.setExpandoBridgeAttributes(baseModel);
250 }
251
252 @Override
253 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
254 _clusterGroup.setExpandoBridgeAttributes(expandoBridge);
255 }
256
257 @Override
258 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
259 _clusterGroup.setExpandoBridgeAttributes(serviceContext);
260 }
261
262
267 @Override
268 public void setMvccVersion(long mvccVersion) {
269 _clusterGroup.setMvccVersion(mvccVersion);
270 }
271
272
277 @Override
278 public void setName(java.lang.String name) {
279 _clusterGroup.setName(name);
280 }
281
282 @Override
283 public void setNew(boolean n) {
284 _clusterGroup.setNew(n);
285 }
286
287
292 @Override
293 public void setPrimaryKey(long primaryKey) {
294 _clusterGroup.setPrimaryKey(primaryKey);
295 }
296
297 @Override
298 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
299 _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
300 }
301
302
307 @Override
308 public void setWholeCluster(boolean wholeCluster) {
309 _clusterGroup.setWholeCluster(wholeCluster);
310 }
311
312 @Override
313 public CacheModel<com.liferay.portal.kernel.model.ClusterGroup> toCacheModel() {
314 return _clusterGroup.toCacheModel();
315 }
316
317 @Override
318 public com.liferay.portal.kernel.model.ClusterGroup toEscapedModel() {
319 return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
320 }
321
322 @Override
323 public java.lang.String toString() {
324 return _clusterGroup.toString();
325 }
326
327 @Override
328 public com.liferay.portal.kernel.model.ClusterGroup toUnescapedModel() {
329 return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
330 }
331
332 @Override
333 public java.lang.String toXmlString() {
334 return _clusterGroup.toXmlString();
335 }
336
337 @Override
338 public boolean equals(Object obj) {
339 if (this == obj) {
340 return true;
341 }
342
343 if (!(obj instanceof ClusterGroupWrapper)) {
344 return false;
345 }
346
347 ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
348
349 if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
350 return true;
351 }
352
353 return false;
354 }
355
356 @Override
357 public ClusterGroup getWrappedModel() {
358 return _clusterGroup;
359 }
360
361 @Override
362 public boolean isEntityCacheEnabled() {
363 return _clusterGroup.isEntityCacheEnabled();
364 }
365
366 @Override
367 public boolean isFinderCacheEnabled() {
368 return _clusterGroup.isFinderCacheEnabled();
369 }
370
371 @Override
372 public void resetOriginalValues() {
373 _clusterGroup.resetOriginalValues();
374 }
375
376 private final ClusterGroup _clusterGroup;
377 }