Пример #1
0
 public void save(String name, String source, boolean isDirectory) {
   DbTpl bean = new DbTpl();
   bean.setId(name);
   if (!isDirectory && source == null) {
     source = "";
   }
   bean.setSource(source);
   bean.setLastModified(System.currentTimeMillis());
   bean.setDirectory(isDirectory);
   dao.save(bean);
   createParentDir(name);
 }
Пример #2
0
 public void update(String name, String source) {
   DbTpl entity = (DbTpl) get(name);
   entity.setSource(source);
   entity.setLastModified(System.currentTimeMillis());
 }