You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Harvey Kim <ca...@fastmail.fm> on 2007/09/15 00:10:23 UTC

Re: TypeHandlerCallBack javaType for byte[]

I have a generic Boolean type handler and I registered it this way:  

  <resultMap id="genericResultMap" class="GenericDTO" >
    <result property="id" column="id"/>
    <result property="yesNo" column="rqr_ind_cd"
	    typeHandler="my.app.YesNoBoolTypeHandlerCallback"/>
  </resultMap>

It isn't a byte type converter but only thing different should be the
"getResult" method.

On Fri, 14 Sep 2007 14:32:25 -0700, Christopher.Mathrusse@sybase.com
said:
> I'm writing a TypeHandlerCallback for my application, which is
> running against Sybase ASE. I'm trying to convert a Block (IMAGE
> or TEXT) field into a byte[]. If I allow iBatis to handle this
> with the default TypeConverter the Sybase JDBC driver raises an
> exception complaining that getBlob() cannot be called.
> The TypeHandler is rather simple as it simply reads the data as a
> BinaryStream. The problem that I'm having is registering it with
> iBatis in the sql-map-config file. While I know the JDBC type I
> can't seem to figure out how to tell iBatis that the Java type is
> a byte[].  If I specify byte[] iBatis raises an exception.
> java.lang.ClassNotFoundException: byte[]
> So how do I register this Type Handler?
> <typeHandler javaType="?" jdbcType="LONGVARCHAR"
> Thanks...

-- 
http://www.fastmail.fm - A fast, anti-spam email service.