Idbutty.
can u add another Field to be of type Date? things will be much easier, so for example if u added a CMP field called completeDate of type java.sql.Date then u will have only one finder works with data range like this:
signature = java.util.Collection findPlanValueForAllProject
query = "select object(c) from Planung as c where c.currentEntry = true and c.projectId is not null AND (c.departmentId = ?1) AND c.completeDate >= ?1 AND c.completeDate <= ?2"
Main Topics
Browse All Topics





by: girionisPosted on 2004-11-12 at 00:03:19ID: 12563261
You could have only one findPlanValueForAllProject sByDepartm entAndDay method and pass all parameters in there, like
sByDepartm entAndDay( java.lang. Integer departmentId, java.lang.Integer year, java.lang.Integer quarter, java.lang.Integer month, java.lang.Integer date ) and then only have one query, somethign like:
findPlanValueForAllProject
"select object(c) from Planung as c where c.currentEntry = true and c.projectId is not null AND (c.departmentId = ?1) AND (c.date = ?2) AND (c.month = ?3) AND (c.year = ?4) AND (c.quarter=?5)"
and so on. YOu will have to combine all possible parameters passed in the method with one query.