Project

General

Profile

Actions

Architecture #2777

closed

Add Box in ReportsRepository method APIs

Added by François ARMAND over 12 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
3
Category:
Architecture - Code maintenance
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.

Actions #1

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?

Actions #2

Updated by François ARMAND almost 12 years ago

  • Target version changed from 24 to Ideas (not version specific)
Actions #3

Updated by François ARMAND over 11 years ago

  • Assignee deleted (François ARMAND)
Actions #4

Updated by Benoît PECCATTE over 5 years ago

  • Assignee set to François ARMAND

@ François I think this is not valid anymore

Actions #5

Updated by François ARMAND over 5 years ago

  • Status changed from Discussion to Rejected

Yes, not relevant anymore.

Actions

Also available in: Atom PDF