/** * Gets all delivered modules. * * @return List DataModel.DeliveredModules */ public List<DeliveredModule> getAllDeliveredModules() { List<DeliveredModule> modules = new ArrayList<DeliveredModule>(); List<ModuleDelivery> deliveries = this.getDeliveredModuels(); for (ModuleDelivery entry : deliveries) { DeliveredModule deliveredEntry = new DeliveredModule(); deliveredEntry.setDeliveredModule(entry); deliveredEntry.setModuleInfo(this.getModule(entry.getModuleTableId())); modules.add(deliveredEntry); } return modules; }
/** * Gets delivered module from user with the content. * * @param userId * @return List DataModel.DeliveredModule */ public List<DeliveredModule> getDeliveredModuleForUserWithContent(String userId) { List<DeliveredModule> modules = new ArrayList<DeliveredModule>(); List<ModuleDelivery> deliveries = this.getDeliveredModuelsFromUser(userId); for (ModuleDelivery entry : deliveries) { DeliveredModule deliveredEntry = new DeliveredModule(); deliveredEntry.setDeliveredModule(entry); deliveredEntry.setModuleInfo(this.getModule(entry.getModuleTableId())); modules.add(deliveredEntry); } return modules; }