Exemplo n.º 1
0
 public Map<String, String> getValues(String name) {
   Directory directory = em.find(Directory.class, name.trim());
   if (directory == null) {
     return Maps.newHashMap();
   }
   return directory.getValues();
 }
Exemplo n.º 2
0
 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);
   }
 }