ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <mark.mil...@oblivion.ch>
Subject Object post processor feature request.
Date Mon, 27 Apr 2009 06:48:23 GMT

Hello there,

I was wondering if it would be possible to add object post processing
capabilities to iBatis.

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.

Below is the implementation that we have used, we feel that it would be
a handy feature for the standard iBatis implementation.

Please let me know if this is possible.

Many thanks in advance,



package com.ibatis.sqlmap.engine.mapping.statement;
 * Post processor for ibatis created business objects.
 * @author mima
public interface IPostProcessor {
         * The callback called immediately after an object has been created
         * @param results The result data. 
        void postProcessCallback(Object[] results);



  public void handleResultObject(
     .... CODE REMOVED

      if (object instanceof IPostProcessor) {
          ((IPostProcessor) object).postProcessCallback(results);
View this message in context: http://www.nabble.com/Object-post-processor-feature-request.-tp23250996p23250996.html
Sent from the iBATIS - Dev mailing list archive at Nabble.com.

View raw message