private Spreadsheet convertDownloadItemToSpreadsheet(DownloadItem di) { Spreadsheet sp = new Spreadsheet(); sp.setTitle(di.getTitle()); sp.setId(di.getAddress()); sp.setUpdateDate(new Date()); return sp; }
private DownloadItem convertSpreadsheetToDownloadItem(Spreadsheet spreadsheet) { DownloadItem di = new DownloadItem(); di.setTitle(spreadsheet.getTitle()); di.setType(DownloadItem.ItemType.Spreadsheet); di.setAddress(spreadsheet.getId()); return di; }