class MetadataEntityDao extends NamedParameterJdbcDaoSupport {

    public List<MetadataField> getMetadataKeys(Long folderId, Long classId) {
        List<MetadataField> result = new ArrayList<>();
        result.addAll(MetadataEntityParameters.fieldNames.values());
        List<String> dataFields = getJdbcTemplate()
                .queryForList(loadMetadataKeysQuery, String.class, folderId, classId);
        result.addAll(dataFields
                .stream()
                .map(name -> new MetadataField(name, null, false))
                .collect(Collectors.toList()));
        return result;
    }

}