001
014
015 package com.liferay.portal.model.impl;
016
017 import com.liferay.portal.kernel.util.StringBundler;
018 import com.liferay.portal.kernel.util.StringPool;
019 import com.liferay.portal.model.CacheModel;
020 import com.liferay.portal.model.ClusterGroup;
021
022 import java.io.Serializable;
023
024
031 public class ClusterGroupCacheModel implements CacheModel<ClusterGroup>,
032 Serializable {
033 @Override
034 public String toString() {
035 StringBundler sb = new StringBundler(9);
036
037 sb.append("{clusterGroupId=");
038 sb.append(clusterGroupId);
039 sb.append(", name=");
040 sb.append(name);
041 sb.append(", clusterNodeIds=");
042 sb.append(clusterNodeIds);
043 sb.append(", wholeCluster=");
044 sb.append(wholeCluster);
045 sb.append("}");
046
047 return sb.toString();
048 }
049
050 public ClusterGroup toEntityModel() {
051 ClusterGroupImpl clusterGroupImpl = new ClusterGroupImpl();
052
053 clusterGroupImpl.setClusterGroupId(clusterGroupId);
054
055 if (name == null) {
056 clusterGroupImpl.setName(StringPool.BLANK);
057 }
058 else {
059 clusterGroupImpl.setName(name);
060 }
061
062 if (clusterNodeIds == null) {
063 clusterGroupImpl.setClusterNodeIds(StringPool.BLANK);
064 }
065 else {
066 clusterGroupImpl.setClusterNodeIds(clusterNodeIds);
067 }
068
069 clusterGroupImpl.setWholeCluster(wholeCluster);
070
071 clusterGroupImpl.resetOriginalValues();
072
073 return clusterGroupImpl;
074 }
075
076 public long clusterGroupId;
077 public String name;
078 public String clusterNodeIds;
079 public boolean wholeCluster;
080 }