FileDAO { public File get(FileId fileId) { Session session = sessionFactory.openSession(); session.beginTransaction(); File file = (File) session.get(File.class, fileId); session.getTransaction().commit(); session.close(); return file; }  List<File> list(Integer pageNum, Integer numResults); Long totalRecordCount(); File get(FileId fileId); FileId insert(File file); com.wipro.ats.bdre.md.beans.table.File update(com.wipro.ats.bdre.md.beans.table.File tableFile); void delete(Long batchId); List<com.wipro.ats.bdre.md.beans.FileInfo> getFiles(long minBatchId, long maxBatchId); com.wipro.ats.bdre.md.beans.table.File getFile(com.wipro.ats.bdre.md.beans.table.File file); com.wipro.ats.bdre.md.beans.table.File insert(com.wipro.ats.bdre.md.beans.table.File tableFile);  }
@Test @Ignore public void testGet() throws Exception { FileId fileId = new FileId(); fileId.setBatchId(1L); fileId.setCreationTs(new Date()); fileId.setFileSize(1L); fileId.setServerId(1); fileId.setPath(""); LOGGER.info("File(1) size is:" + fileDAO.get(fileId).getId().getFileSize()); }