Exemple #1
0
 @Override
 public void saveDoc(String id, Doc doc) throws IOException {
   Map<String, String> data = new HashMap<String, String>();
   data.put(DOC_NAME, doc.get(Doc.Field.NAME));
   data.put(DOC_DESCRIPTION, doc.get(Doc.Field.DESCRIPTION));
   _saveData(id, data);
 }
Exemple #2
0
 @Override
 public Doc loadDoc(String id) throws IOException {
   Map<String, String> data = _loadData(id);
   Doc doc = new Doc();
   doc.set(Doc.Field.NAME, data.get(DOC_NAME));
   doc.set(Doc.Field.DESCRIPTION, data.get(DOC_DESCRIPTION));
   return doc;
 }