Actions
Architecture #2777
closedAdd Box in ReportsRepository method APIs
Status:
Rejected
Priority:
3
Assignee:
Category:
Architecture - Code maintenance
Target version:
Pull Request:
Effort required:
Name check:
Fix check:
Regression:
Description
ReportsRepository method can fail, for example on a database connection problem.
That must be reflected in ReportsRepository method type with Box[...].
For example:
def findReportsByNode( nodeId : NodeId , ruleId : RuleId , serial : Int , beginDate: DateTime , endDate : Option[DateTime] ): Seq[Reports]
Should be:
def findReportsByNode( nodeId : NodeId , ruleId : RuleId , serial : Int , beginDate: DateTime , endDate : Option[DateTime] ): Box[Seq[Reports]]
Moreover, implementation of ReportsRepository like ReportsJdbcRepository must handle error case. Typically, ReportsJdbcRepository must boxes all call to "jdbcTemplate.query" in a try/catch.
See #2709 and commit 27ddf8848d448943a67d028025fb12c9bf533eee for a place where such a modification is important. That also means that DatabaseManager will have to be modified to remove the try/catch.
Updated by Jonathan CLARKE over 12 years ago
- Status changed from 8 to Discussion
- Assignee changed from Nicolas CHARLES to François ARMAND
What is the end user effect of this not being fixed?
Updated by François ARMAND almost 12 years ago
- Target version changed from 24 to Ideas (not version specific)
Updated by Benoît PECCATTE over 5 years ago
- Assignee set to François ARMAND
@ François I think this is not valid anymore
Updated by François ARMAND over 5 years ago
- Status changed from Discussion to Rejected
Yes, not relevant anymore.
Actions