private AutoKeeperCluster doToModel(AutoKeeperClusterDO autoKeeperClusterDo) { AutoKeeperCluster autoKeeperCluster = new AutoKeeperCluster(); autoKeeperCluster.setId(autoKeeperClusterDo.getId()); autoKeeperCluster.setClusterName(autoKeeperClusterDo.getClusterName()); autoKeeperCluster.setDescription(autoKeeperClusterDo.getDescription()); autoKeeperCluster.setServerList( JsonUtils.unmarshalFromString( autoKeeperClusterDo.getServerList(), new TypeReference<List<String>>() {})); autoKeeperCluster.setGmtCreate(autoKeeperClusterDo.getGmtCreate()); autoKeeperCluster.setGmtModified(autoKeeperClusterDo.getGmtModified()); return autoKeeperCluster; }
private AutoKeeperClusterDO modelToDo(AutoKeeperCluster autoKeeperCluster) { AutoKeeperClusterDO autokeeperClusterDo = new AutoKeeperClusterDO(); autokeeperClusterDo.setId(autoKeeperCluster.getId()); autokeeperClusterDo.setClusterName(autoKeeperCluster.getClusterName()); autokeeperClusterDo.setDescription(autoKeeperCluster.getDescription()); autokeeperClusterDo.setServerList(JsonUtils.marshalToString(autoKeeperCluster.getServerList())); autokeeperClusterDo.setGmtCreate(autoKeeperCluster.getGmtCreate()); autokeeperClusterDo.setGmtModified(autoKeeperCluster.getGmtModified()); return autokeeperClusterDo; }