ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Gmeiner (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-594) Object post processor feature request.
Date Mon, 11 May 2009 12:51:45 GMT

    [ https://issues.apache.org/jira/browse/IBATIS-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708008#action_12708008

Stefan Gmeiner commented on IBATIS-594:

I find the idea of "post processing" an object a good idea but I think there
should be a more generic solution. I attached a patch which delegates the
creation of the RowHandlerCallback into a factory. This allows to replace
or extends the default implementation with custom actions like post
processing of some of the objects.

The advantage of this patch is that the user of iBatis have much more
control of the creation of objects opposed to the post processor interface.
For example he could replace the whole object through a proxy, etc.

In the patch the factory for RowHandlerCallback is configured in the
SQL-Map config through a static class RowHandlerCallbackFactoryUtil. I'm
not sure if this is the appropriate way to do it. I also recognized that
in case of multiple result sets a DefaultRowHandler is used for subsequent
result sets. I think this could be problematic if a custom RowHandler is
used which derives from DefaultRowHandler. In this case the custom handler
is not used for the subsequent result sets.

> Object post processor feature request.
> --------------------------------------
>                 Key: IBATIS-594
>                 URL: https://issues.apache.org/jira/browse/IBATIS-594
>             Project: iBatis for Java
>          Issue Type: Improvement
>          Components: DAO
>    Affects Versions: 2.3.4
>         Environment: All platforms.
>            Reporter: Mark Miller
>            Priority: Minor
>         Attachments: postprocessor.patch
> add object post processing capabilities to iBatis after objects have been populated from
the recordset.
> We have found the need to set fields within business objects after they have been read
from a database using iBatis. Up until now we have been using the row handler callback, however,
when using iBatis lazy loading, this does no longer suffice.
> To counter this we have added an interface to the iBatis package to allow for any implementors
to be called after the object has been created and populated.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message