ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: Enum typeHandlerCallback
Date Tue, 10 Oct 2006 22:59:29 GMT
Hmm, I should probably get some sleep :)
Tested it, works perfectly well...

Thanks Larry!

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
Of Larry Meadors
Sent: woensdag 11 oktober 2006 0:57
To: user-java@ibatis.apache.org
Subject: Re: Enum typeHandlerCallback

An inner enum class?

Hmm, should it be:

javaType="com.sybase.cosmos.domain.DocumentStore$State"

Larry


On 10/10/06, Christopher.Mathrusse@sybase.com
<Christopher.Mathrusse@sybase.com> wrote:
>
>
> I'm attempting to implement a TypeHandlerCallback to handle an Enum.
The
> Enum is declared within a class but I can't seem to figure out how to
do
> this correctly. I keep getting an exception thrown at startup because
iBatis
> cannot seem to load the enum. In the Resources class, the method
> classForName(String) keeps throwing an exception based upon the
javaType
> that I have specified in my config file.
>
> SqlMapConfig Type Handler declaration:
>
>
> <typeHandler
> javaType="com.sybase.cosmos.domain.DocumentStore.State"
>
callback="com.sybase.cosmos.dao.impl.ibatis.extentions.DocStoreStateType
HandlerCallback"
> />
>
> Enum defined in java class:
>
>
> public class DocumentStore extends DomainObject {
>
> public static enum State { INITIALIZED, PROCESSING, COMPLETE, ERROR }
>
>
> The following in Resources.classForName(String), which is using the
class
> loader, cannot locate the enum that I have specified.  So how can I
tell
> iBatis to use my TypeHandlerCallback for this enum?
>
>
>
> Thanks....
>
> Chris Mathrusse
> christopher.mathrusse@sybase.com
> (925) 236-5553
>

Mime
View raw message