From 9463d94a846de2183ec7a14134aa7e84602e64ed Mon Sep 17 00:00:00 2001 From: Miciele Ghiorghis Date: Thu, 17 Jan 2013 09:28:50 +0100 Subject: [PATCH] Tim-connector: Method getWorkReportLines added getWorkReportLines: gets all WorkReportLines of this order specified between start and end date. --- .../business/orders/entities/OrderElement.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java index b77d12b28..75cf96b4e 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java @@ -1568,6 +1568,24 @@ public abstract class OrderElement extends IntegrationEntity implements return workReportLineDAO.findByOrderElementAndChildren(this, sortedByDate); } + /** + * Gets workReportLines of this order-element between the specified + * startDate and endDate + * + * @param startDate + * the startDate + * @param endDate + * the endDate + * @param sortedByDate + * @return list of workReportLines + */ + public List getWorkReportLines(Date startDate, + Date endDate, boolean sortedByDate) { + IWorkReportLineDAO workReportLineDAO = Registry.getWorkReportLineDAO(); + return workReportLineDAO.findByOrderElementAndChildrenFilteredByDate( + this, startDate, endDate, sortedByDate); + } + /** * Checks if it has nay consolidated advance, if not checks if any parent * has it