ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Rodenbaugh" <drodenba...@WILDBLUECORP.COM>
Subject Difference in two queryForObject signatures
Date Mon, 19 Feb 2007 18:15:17 GMT
Can someone differentiate for me the reasoning behind these two
functions in SqlMapDaoTemplate:
Object queryForObject(String id, Object parameters);
Object queryForObject(String id, Object parameters, Object result);
The docs appear very similar on them except that the first explicitly
states that it populates a single object instance, the second populates
the "specified result object"--this seems to be a minor semantic
difference IMO and doesn't clarify why I want to use one over the other.
Which form would I want to use if I'm trying to call a SP that returns a
value of the form:
{ call ? := foo(?) }
And would I want to pass a Map into the parameters with a pair of values
(one for the return value placeholder, and one for the "real"
parameter), or just the single parameter?  Not sure based on what I read
which is correct...

View raw message