Hi,

I'd like to transparently send parameters to SQL functions, without having
to include those parameters always through my code.
For example,

<select id="getAllMatchingPeople" parameterClass="com.blah.Person"
resultMap="personParameterResult">
SELECT * from person
WHERE
lastname = #lastname#
AND
recordstatus = #recordstatus#
</select>

Where the "recordstatus" property is not inside my Person domain object, but
something configured separately; perhaps "injected" into the map object
somehow.

Thus, my code would look like this:
sqlMap.queryForList("getAllMatchingPeople", myPersonQueryByExampleObject);

Is there a way to achieve this in a straight forward manner? I don't want to
have multiple SQL function and fragments for the status, since
there could be many many statuses, all of which will be applied under
different contexts.

Reply via email to