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 @Override
038 public Class<?> getModelClass() {
039 return ClusterGroup.class;
040 }
041
042 @Override
043 public String getModelClassName() {
044 return ClusterGroup.class.getName();
045 }
046
047 @Override
048 public Map<String, Object> getModelAttributes() {
049 Map<String, Object> attributes = new HashMap<String, Object>();
050
051 attributes.put("clusterGroupId", getClusterGroupId());
052 attributes.put("name", getName());
053 attributes.put("clusterNodeIds", getClusterNodeIds());
054 attributes.put("wholeCluster", getWholeCluster());
055
056 return attributes;
057 }
058
059 @Override
060 public void setModelAttributes(Map<String, Object> attributes) {
061 Long clusterGroupId = (Long)attributes.get("clusterGroupId");
062
063 if (clusterGroupId != null) {
064 setClusterGroupId(clusterGroupId);
065 }
066
067 String name = (String)attributes.get("name");
068
069 if (name != null) {
070 setName(name);
071 }
072
073 String clusterNodeIds = (String)attributes.get("clusterNodeIds");
074
075 if (clusterNodeIds != null) {
076 setClusterNodeIds(clusterNodeIds);
077 }
078
079 Boolean wholeCluster = (Boolean)attributes.get("wholeCluster");
080
081 if (wholeCluster != null) {
082 setWholeCluster(wholeCluster);
083 }
084 }
085
086
091 @Override
092 public long getPrimaryKey() {
093 return _clusterGroup.getPrimaryKey();
094 }
095
096
101 @Override
102 public void setPrimaryKey(long primaryKey) {
103 _clusterGroup.setPrimaryKey(primaryKey);
104 }
105
106
111 @Override
112 public long getClusterGroupId() {
113 return _clusterGroup.getClusterGroupId();
114 }
115
116
121 @Override
122 public void setClusterGroupId(long clusterGroupId) {
123 _clusterGroup.setClusterGroupId(clusterGroupId);
124 }
125
126
131 @Override
132 public java.lang.String getName() {
133 return _clusterGroup.getName();
134 }
135
136
141 @Override
142 public void setName(java.lang.String name) {
143 _clusterGroup.setName(name);
144 }
145
146
151 @Override
152 public java.lang.String getClusterNodeIds() {
153 return _clusterGroup.getClusterNodeIds();
154 }
155
156
161 @Override
162 public void setClusterNodeIds(java.lang.String clusterNodeIds) {
163 _clusterGroup.setClusterNodeIds(clusterNodeIds);
164 }
165
166
171 @Override
172 public boolean getWholeCluster() {
173 return _clusterGroup.getWholeCluster();
174 }
175
176
181 @Override
182 public boolean isWholeCluster() {
183 return _clusterGroup.isWholeCluster();
184 }
185
186
191 @Override
192 public void setWholeCluster(boolean wholeCluster) {
193 _clusterGroup.setWholeCluster(wholeCluster);
194 }
195
196 @Override
197 public boolean isNew() {
198 return _clusterGroup.isNew();
199 }
200
201 @Override
202 public void setNew(boolean n) {
203 _clusterGroup.setNew(n);
204 }
205
206 @Override
207 public boolean isCachedModel() {
208 return _clusterGroup.isCachedModel();
209 }
210
211 @Override
212 public void setCachedModel(boolean cachedModel) {
213 _clusterGroup.setCachedModel(cachedModel);
214 }
215
216 @Override
217 public boolean isEscapedModel() {
218 return _clusterGroup.isEscapedModel();
219 }
220
221 @Override
222 public java.io.Serializable getPrimaryKeyObj() {
223 return _clusterGroup.getPrimaryKeyObj();
224 }
225
226 @Override
227 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
228 _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
229 }
230
231 @Override
232 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
233 return _clusterGroup.getExpandoBridge();
234 }
235
236 @Override
237 public void setExpandoBridgeAttributes(
238 com.liferay.portal.model.BaseModel<?> baseModel) {
239 _clusterGroup.setExpandoBridgeAttributes(baseModel);
240 }
241
242 @Override
243 public void setExpandoBridgeAttributes(
244 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
245 _clusterGroup.setExpandoBridgeAttributes(expandoBridge);
246 }
247
248 @Override
249 public void setExpandoBridgeAttributes(
250 com.liferay.portal.service.ServiceContext serviceContext) {
251 _clusterGroup.setExpandoBridgeAttributes(serviceContext);
252 }
253
254 @Override
255 public java.lang.Object clone() {
256 return new ClusterGroupWrapper((ClusterGroup)_clusterGroup.clone());
257 }
258
259 @Override
260 public int compareTo(com.liferay.portal.model.ClusterGroup clusterGroup) {
261 return _clusterGroup.compareTo(clusterGroup);
262 }
263
264 @Override
265 public int hashCode() {
266 return _clusterGroup.hashCode();
267 }
268
269 @Override
270 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ClusterGroup> toCacheModel() {
271 return _clusterGroup.toCacheModel();
272 }
273
274 @Override
275 public com.liferay.portal.model.ClusterGroup toEscapedModel() {
276 return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
277 }
278
279 @Override
280 public com.liferay.portal.model.ClusterGroup toUnescapedModel() {
281 return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
282 }
283
284 @Override
285 public java.lang.String toString() {
286 return _clusterGroup.toString();
287 }
288
289 @Override
290 public java.lang.String toXmlString() {
291 return _clusterGroup.toXmlString();
292 }
293
294 @Override
295 public void persist()
296 throws com.liferay.portal.kernel.exception.SystemException {
297 _clusterGroup.persist();
298 }
299
300 @Override
301 public java.lang.String[] getClusterNodeIdsArray() {
302 return _clusterGroup.getClusterNodeIdsArray();
303 }
304
305 @Override
306 public boolean equals(Object obj) {
307 if (this == obj) {
308 return true;
309 }
310
311 if (!(obj instanceof ClusterGroupWrapper)) {
312 return false;
313 }
314
315 ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
316
317 if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
318 return true;
319 }
320
321 return false;
322 }
323
324
327 public ClusterGroup getWrappedClusterGroup() {
328 return _clusterGroup;
329 }
330
331 @Override
332 public ClusterGroup getWrappedModel() {
333 return _clusterGroup;
334 }
335
336 @Override
337 public void resetOriginalValues() {
338 _clusterGroup.resetOriginalValues();
339 }
340
341 private ClusterGroup _clusterGroup;
342 }