break;
}
}
if (!contains) {
HostComponentDesiredConfigMappingEntity newEntity = new HostComponentDesiredConfigMappingEntity();
newEntity.setClusterId(desiredStateEntity.getClusterId());
newEntity.setServiceName(desiredStateEntity.getServiceName());
newEntity.setComponentName(desiredStateEntity.getComponentName());
newEntity.setHostName(desiredStateEntity.getHostName());
newEntity.setConfigType(entry.getKey());
newEntity.setVersionTag(entry.getValue().getVersionTag());
newEntity.setTimestamp(new Date().getTime());
newEntity.setHostComponentDesiredStateEntity(desiredStateEntity);
desiredStateEntity.getHostComponentDesiredConfigMappingEntities().add(newEntity);
hostComponentDesiredConfigMappingDAO.create(newEntity);
}
this.desiredConfigs.put(entry.getKey(), entry.getValue().getVersionTag());