You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Martin Zeltner (JIRA)" <ib...@incubator.apache.org> on 2004/12/22 12:32:03 UTC

[jira] Created: (IBATIS-36) Add BLOB and CLOB TypeHandlerCallback in SqlMap2

Add BLOB and CLOB TypeHandlerCallback in SqlMap2
------------------------------------------------

         Key: IBATIS-36
         URL: http://nagoya.apache.org/jira/browse/IBATIS-36
     Project: iBatis for Java
        Type: Wish
  Components: SQL Maps  
    Versions: 2.0.8    
 Environment: Win2000, Java 1.4.2
    Reporter: Martin Zeltner


Hi,

I've written the entry IBATIS-4, which is now closed.
I ask you to include these two TypeHandlerCallbacks
standard in SqlMap2, because it is always the same
if you've got a well implemented JDBC driver.

In the ClobCallbackHandler I had to adapt the setParameter
method as following:

    public void setParameter(ParameterSetter setter, Object parameter)
            throws SQLException {
        String s = (String) parameter;
        if (s != null) {
            StringReader reader = new StringReader(s);
            setter.setCharacterStream(reader, s.length());
        } else {
            setter.setString(null);
        }
    }

What do you think of integrate it in SqlMap2?

Cheers,
Martin

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-36) Add BLOB and CLOB TypeHandlerCallback in SqlMap2

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-36?page=history ]
     
Clinton Begin closed IBATIS-36:
-------------------------------

      Assign To: Clinton Begin
     Resolution: Fixed
    Fix Version: 2.0.9

Done.  Not the exact code.  Included your modification.

> Add BLOB and CLOB TypeHandlerCallback in SqlMap2
> ------------------------------------------------
>
>          Key: IBATIS-36
>          URL: http://issues.apache.org/jira/browse/IBATIS-36
>      Project: iBatis for Java
>         Type: Wish
>   Components: SQL Maps
>     Versions: 2.0.8
>  Environment: Win2000, Java 1.4.2
>     Reporter: Martin Zeltner
>     Assignee: Clinton Begin
>      Fix For: 2.0.9

>
> Hi,
> I've written the entry IBATIS-4, which is now closed.
> I ask you to include these two TypeHandlerCallbacks
> standard in SqlMap2, because it is always the same
> if you've got a well implemented JDBC driver.
> In the ClobCallbackHandler I had to adapt the setParameter
> method as following:
>     public void setParameter(ParameterSetter setter, Object parameter)
>             throws SQLException {
>         String s = (String) parameter;
>         if (s != null) {
>             StringReader reader = new StringReader(s);
>             setter.setCharacterStream(reader, s.length());
>         } else {
>             setter.setString(null);
>         }
>     }
> What do you think of integrate it in SqlMap2?
> Cheers,
> Martin

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira