Quote:
1) I created my own copy of the Loader class, MyLoader. In the doFind () I replaced the following section of code
What I suggest you do is produce a patch for Hibernate that changes Loader so that you can override just one method.
Now, why would it not be enough to simply override prepareQueryStatement() ? (CallableStatement extends PreparedStatement) Why did you need to also override getResultSet() ?
Is it ONLY because prepareQueryStatement() is declared final?
If so, is it enough to just change this line:
Code:
PreparedStatement st = session.getBatcher().prepareQueryStatement(sql, scrollable);
in prepareQueryStatement() so that it calls another (nonfinal) method? Then you would only need to override that.
Quote:
1) In step 1 above when i replaced the prepared statement with the Callable Statement I'm ignoring the following parameters that the existing prepared statement uses in some way
lockmodes, values, types, namedparams, selection.
That stuff is used for
queries.
Quote:
2) The doFind is being called from the load () in the CutomPersister in this scenario.
It is probably better style to implement a load() method on the Loader that calls up to doFind() on the superclass.
You have to guide me here, because I've never triued to implement this myself.