Sweet!!! That did the trick.
Thanks very much Larry!
An inner enum class?
Hmm, should it be:
javaType="com.sybase.cosmos.domain.DocumentStore$State"
Larry
On 10/10/06, Christopher.Mathrusse <at> 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:
>
>
> > javaType="com.sybase.cosmos.domain.DocumentStore.State"
>
callback="com.sybase.cosmos.dao.impl.ibatis.extentions.DocStoreStateTypeHandlerCallback"
> />
>
> 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 <at> sybase.com
> (925) 236-5553
>