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 import com.liferay.portal.service.ServiceContext;
021
022 import com.liferay.portlet.expando.model.ExpandoBridge;
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(com.liferay.portal.model.ClusterGroup clusterGroup) {
108 return _clusterGroup.compareTo(clusterGroup);
109 }
110
111
116 @Override
117 public long getClusterGroupId() {
118 return _clusterGroup.getClusterGroupId();
119 }
120
121
126 @Override
127 public java.lang.String getClusterNodeIds() {
128 return _clusterGroup.getClusterNodeIds();
129 }
130
131 @Override
132 public java.lang.String[] getClusterNodeIdsArray() {
133 return _clusterGroup.getClusterNodeIdsArray();
134 }
135
136 @Override
137 public ExpandoBridge getExpandoBridge() {
138 return _clusterGroup.getExpandoBridge();
139 }
140
141
146 @Override
147 public long getMvccVersion() {
148 return _clusterGroup.getMvccVersion();
149 }
150
151
156 @Override
157 public java.lang.String getName() {
158 return _clusterGroup.getName();
159 }
160
161
166 @Override
167 public long getPrimaryKey() {
168 return _clusterGroup.getPrimaryKey();
169 }
170
171 @Override
172 public Serializable getPrimaryKeyObj() {
173 return _clusterGroup.getPrimaryKeyObj();
174 }
175
176
181 @Override
182 public boolean getWholeCluster() {
183 return _clusterGroup.getWholeCluster();
184 }
185
186 @Override
187 public int hashCode() {
188 return _clusterGroup.hashCode();
189 }
190
191 @Override
192 public boolean isCachedModel() {
193 return _clusterGroup.isCachedModel();
194 }
195
196 @Override
197 public boolean isEscapedModel() {
198 return _clusterGroup.isEscapedModel();
199 }
200
201 @Override
202 public boolean isNew() {
203 return _clusterGroup.isNew();
204 }
205
206
211 @Override
212 public boolean isWholeCluster() {
213 return _clusterGroup.isWholeCluster();
214 }
215
216 @Override
217 public void persist() {
218 _clusterGroup.persist();
219 }
220
221 @Override
222 public void setCachedModel(boolean cachedModel) {
223 _clusterGroup.setCachedModel(cachedModel);
224 }
225
226
231 @Override
232 public void setClusterGroupId(long clusterGroupId) {
233 _clusterGroup.setClusterGroupId(clusterGroupId);
234 }
235
236
241 @Override
242 public void setClusterNodeIds(java.lang.String clusterNodeIds) {
243 _clusterGroup.setClusterNodeIds(clusterNodeIds);
244 }
245
246 @Override
247 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
248 _clusterGroup.setExpandoBridgeAttributes(baseModel);
249 }
250
251 @Override
252 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
253 _clusterGroup.setExpandoBridgeAttributes(expandoBridge);
254 }
255
256 @Override
257 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
258 _clusterGroup.setExpandoBridgeAttributes(serviceContext);
259 }
260
261
266 @Override
267 public void setMvccVersion(long mvccVersion) {
268 _clusterGroup.setMvccVersion(mvccVersion);
269 }
270
271
276 @Override
277 public void setName(java.lang.String name) {
278 _clusterGroup.setName(name);
279 }
280
281 @Override
282 public void setNew(boolean n) {
283 _clusterGroup.setNew(n);
284 }
285
286
291 @Override
292 public void setPrimaryKey(long primaryKey) {
293 _clusterGroup.setPrimaryKey(primaryKey);
294 }
295
296 @Override
297 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
298 _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
299 }
300
301
306 @Override
307 public void setWholeCluster(boolean wholeCluster) {
308 _clusterGroup.setWholeCluster(wholeCluster);
309 }
310
311 @Override
312 public CacheModel<com.liferay.portal.model.ClusterGroup> toCacheModel() {
313 return _clusterGroup.toCacheModel();
314 }
315
316 @Override
317 public com.liferay.portal.model.ClusterGroup toEscapedModel() {
318 return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
319 }
320
321 @Override
322 public java.lang.String toString() {
323 return _clusterGroup.toString();
324 }
325
326 @Override
327 public com.liferay.portal.model.ClusterGroup toUnescapedModel() {
328 return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
329 }
330
331 @Override
332 public java.lang.String toXmlString() {
333 return _clusterGroup.toXmlString();
334 }
335
336 @Override
337 public boolean equals(Object obj) {
338 if (this == obj) {
339 return true;
340 }
341
342 if (!(obj instanceof ClusterGroupWrapper)) {
343 return false;
344 }
345
346 ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
347
348 if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
349 return true;
350 }
351
352 return false;
353 }
354
355 @Override
356 public ClusterGroup getWrappedModel() {
357 return _clusterGroup;
358 }
359
360 @Override
361 public boolean isEntityCacheEnabled() {
362 return _clusterGroup.isEntityCacheEnabled();
363 }
364
365 @Override
366 public boolean isFinderCacheEnabled() {
367 return _clusterGroup.isFinderCacheEnabled();
368 }
369
370 @Override
371 public void resetOriginalValues() {
372 _clusterGroup.resetOriginalValues();
373 }
374
375 private final ClusterGroup _clusterGroup;
376 }