public Map<String, String> getValues(String name) { Directory directory = em.find(Directory.class, name.trim()); if (directory == null) { return Maps.newHashMap(); } return directory.getValues(); }
public void remove(String name, String key) { Directory directory = em.find(Directory.class, name.trim()); if (directory != null) { Map<String, String> values = directory.getValues(); values.remove(key); directory.setValues(values); em.merge(directory); } }