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("clusterGroupId", getClusterGroupId());
055 attributes.put("name", getName());
056 attributes.put("clusterNodeIds", getClusterNodeIds());
057 attributes.put("wholeCluster", getWholeCluster());
058
059 return attributes;
060 }
061
062 @Override
063 public void setModelAttributes(Map<String, Object> attributes) {
064 Long clusterGroupId = (Long)attributes.get("clusterGroupId");
065
066 if (clusterGroupId != null) {
067 setClusterGroupId(clusterGroupId);
068 }
069
070 String name = (String)attributes.get("name");
071
072 if (name != null) {
073 setName(name);
074 }
075
076 String clusterNodeIds = (String)attributes.get("clusterNodeIds");
077
078 if (clusterNodeIds != null) {
079 setClusterNodeIds(clusterNodeIds);
080 }
081
082 Boolean wholeCluster = (Boolean)attributes.get("wholeCluster");
083
084 if (wholeCluster != null) {
085 setWholeCluster(wholeCluster);
086 }
087 }
088
089
094 @Override
095 public long getPrimaryKey() {
096 return _clusterGroup.getPrimaryKey();
097 }
098
099
104 @Override
105 public void setPrimaryKey(long primaryKey) {
106 _clusterGroup.setPrimaryKey(primaryKey);
107 }
108
109
114 @Override
115 public long getClusterGroupId() {
116 return _clusterGroup.getClusterGroupId();
117 }
118
119
124 @Override
125 public void setClusterGroupId(long clusterGroupId) {
126 _clusterGroup.setClusterGroupId(clusterGroupId);
127 }
128
129
134 @Override
135 public java.lang.String getName() {
136 return _clusterGroup.getName();
137 }
138
139
144 @Override
145 public void setName(java.lang.String name) {
146 _clusterGroup.setName(name);
147 }
148
149
154 @Override
155 public java.lang.String getClusterNodeIds() {
156 return _clusterGroup.getClusterNodeIds();
157 }
158
159
164 @Override
165 public void setClusterNodeIds(java.lang.String clusterNodeIds) {
166 _clusterGroup.setClusterNodeIds(clusterNodeIds);
167 }
168
169
174 @Override
175 public boolean getWholeCluster() {
176 return _clusterGroup.getWholeCluster();
177 }
178
179
184 @Override
185 public boolean isWholeCluster() {
186 return _clusterGroup.isWholeCluster();
187 }
188
189
194 @Override
195 public void setWholeCluster(boolean wholeCluster) {
196 _clusterGroup.setWholeCluster(wholeCluster);
197 }
198
199 @Override
200 public boolean isNew() {
201 return _clusterGroup.isNew();
202 }
203
204 @Override
205 public void setNew(boolean n) {
206 _clusterGroup.setNew(n);
207 }
208
209 @Override
210 public boolean isCachedModel() {
211 return _clusterGroup.isCachedModel();
212 }
213
214 @Override
215 public void setCachedModel(boolean cachedModel) {
216 _clusterGroup.setCachedModel(cachedModel);
217 }
218
219 @Override
220 public boolean isEscapedModel() {
221 return _clusterGroup.isEscapedModel();
222 }
223
224 @Override
225 public java.io.Serializable getPrimaryKeyObj() {
226 return _clusterGroup.getPrimaryKeyObj();
227 }
228
229 @Override
230 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
231 _clusterGroup.setPrimaryKeyObj(primaryKeyObj);
232 }
233
234 @Override
235 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
236 return _clusterGroup.getExpandoBridge();
237 }
238
239 @Override
240 public void setExpandoBridgeAttributes(
241 com.liferay.portal.model.BaseModel<?> baseModel) {
242 _clusterGroup.setExpandoBridgeAttributes(baseModel);
243 }
244
245 @Override
246 public void setExpandoBridgeAttributes(
247 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
248 _clusterGroup.setExpandoBridgeAttributes(expandoBridge);
249 }
250
251 @Override
252 public void setExpandoBridgeAttributes(
253 com.liferay.portal.service.ServiceContext serviceContext) {
254 _clusterGroup.setExpandoBridgeAttributes(serviceContext);
255 }
256
257 @Override
258 public java.lang.Object clone() {
259 return new ClusterGroupWrapper((ClusterGroup)_clusterGroup.clone());
260 }
261
262 @Override
263 public int compareTo(com.liferay.portal.model.ClusterGroup clusterGroup) {
264 return _clusterGroup.compareTo(clusterGroup);
265 }
266
267 @Override
268 public int hashCode() {
269 return _clusterGroup.hashCode();
270 }
271
272 @Override
273 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ClusterGroup> toCacheModel() {
274 return _clusterGroup.toCacheModel();
275 }
276
277 @Override
278 public com.liferay.portal.model.ClusterGroup toEscapedModel() {
279 return new ClusterGroupWrapper(_clusterGroup.toEscapedModel());
280 }
281
282 @Override
283 public com.liferay.portal.model.ClusterGroup toUnescapedModel() {
284 return new ClusterGroupWrapper(_clusterGroup.toUnescapedModel());
285 }
286
287 @Override
288 public java.lang.String toString() {
289 return _clusterGroup.toString();
290 }
291
292 @Override
293 public java.lang.String toXmlString() {
294 return _clusterGroup.toXmlString();
295 }
296
297 @Override
298 public void persist()
299 throws com.liferay.portal.kernel.exception.SystemException {
300 _clusterGroup.persist();
301 }
302
303 @Override
304 public java.lang.String[] getClusterNodeIdsArray() {
305 return _clusterGroup.getClusterNodeIdsArray();
306 }
307
308 @Override
309 public boolean equals(Object obj) {
310 if (this == obj) {
311 return true;
312 }
313
314 if (!(obj instanceof ClusterGroupWrapper)) {
315 return false;
316 }
317
318 ClusterGroupWrapper clusterGroupWrapper = (ClusterGroupWrapper)obj;
319
320 if (Validator.equals(_clusterGroup, clusterGroupWrapper._clusterGroup)) {
321 return true;
322 }
323
324 return false;
325 }
326
327
330 public ClusterGroup getWrappedClusterGroup() {
331 return _clusterGroup;
332 }
333
334 @Override
335 public ClusterGroup getWrappedModel() {
336 return _clusterGroup;
337 }
338
339 @Override
340 public void resetOriginalValues() {
341 _clusterGroup.resetOriginalValues();
342 }
343
344 private ClusterGroup _clusterGroup;
345 }