Merge with 95418fb0c49b from default
authorChristos V. Stathis <chstath@ebs.gr>
Fri, 10 Dec 2010 13:09:28 +0000 (15:09 +0200)
committerChristos V. Stathis <chstath@ebs.gr>
Fri, 10 Dec 2010 13:09:28 +0000 (15:09 +0200)
1  2 
src/gr/ebs/gss/server/ejb/ExternalAPIBean.java

@@@ -1785,23 -1785,15 +1785,18 @@@ public class ExternalAPIBean implement
        }
  
        @Override
-       public List<FileHeaderDTO> searchFiles(Long userId, String query) throws ObjectNotFoundException {
+       public List<FileHeader> searchFiles(Long userId, String query) throws ObjectNotFoundException {
 +        long startTime = System.currentTimeMillis();
                if (userId == null)
                        throw new ObjectNotFoundException("No user specified");
                User user = getUser(userId);
                if (query == null)
                        throw new ObjectNotFoundException("No query specified");
                List<FileHeader> files = search(user.getId(), query);
-         long startTime2 = System.currentTimeMillis();
-               List<FileHeaderDTO> res = new ArrayList<FileHeaderDTO>();
-               for(FileHeader f : files)
-                       res.add(f.getDTO());
-         long stopTime2 = System.currentTimeMillis();
-         logger.info("DTO time: " + (stopTime2 - startTime2));
+               
 +        long stopTime = System.currentTimeMillis();
 +        logger.info("Total time: " + (stopTime - startTime));
-               return res;
+               return files;
        }
  
        /**