class TechnologySettingService {

    @Transactional(readOnly = true)
    public List<TechnologySettingGroupDTO> getAllGroups(Long projectId) {
        List<TechnologySettingGroupDTO> groups = getTechnologySettingGroupDefinition();
        List<TechnologySetting> savedSettings = technologySettingRepository.findByProjectId(projectId);

        for (TechnologySettingGroupDTO group : groups) {
            List<SettingDTO> settings = group.getSettings();
            for (SettingDTO setting : settings) {
                String code = setting.getCode();
                Optional<String> value = getValueFromSavedSettings(savedSettings, code);
                value.ifPresent(setting::setValue);
            }
        }
        return groups;
    }

}