ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject RE: Enum typeHandlerCallback
Date Tue, 10 Oct 2006 23:01:40 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content="text/html; charset=us-ascii" inline 
Content-Disposition: format="flowed" plain; text Content-Type: 7bit 
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<DIV dir=ltr align=left><SPAN class=871160123-10102006><FONT color=#0000ff

size=2>Sweet!!! That did the trick.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=871160123-10102006><FONT color=#0000ff

<DIV dir=ltr align=left><SPAN class=871160123-10102006><FONT color=#0000ff

size=2>Thanks very much Larry!</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> larry.meadors@gmail.com 
[mailto:larry.meadors@gmail.com] <B>On Behalf Of </B>"Larry Meadors" 
&lt;lmeadors@apache.org&gt;<BR><B>Sent:</B> Tuesday, October 10,
2006 3:57 
PM<BR><B>To:</B> user-java@ibatis.apache.org<BR><B>Subject:</B>
Re: Enum 
<DIV></DIV>An inner enum class? <BR><BR>Hmm, should it be: 
<BR><BR>javaType="com.sybase.cosmos.domain.DocumentStore$State" <BR><BR>Larry

<BR><BR><BR>On 10/10/06, Christopher.Mathrusse@sybase.com 
<BR>&gt; I'm 
attempting to implement a TypeHandlerCallback to handle an Enum. The <BR>&gt; 
Enum is declared within a class but I can't seem to figure out how to do 
<BR>&gt; this correctly. I keep getting an exception thrown at startup because 
iBatis <BR>&gt; cannot seem to load the enum. In the Resources class, the method

<BR>&gt; classForName(String) keeps throwing an exception based upon the 
javaType <BR>&gt; that I have specified in my config file. <BR>&gt; <BR>&gt;

SqlMapConfig Type Handler declaration: <BR>&gt; <BR>&gt; <BR>&gt;
<BR>&gt; javaType="com.sybase.cosmos.domain.DocumentStore.State" <BR>&gt;

<BR>&gt; /&gt; <BR>&gt; <BR>&gt; Enum defined in java class:
<BR>&gt; <BR>&gt; 
<BR>&gt; public class DocumentStore extends DomainObject { <BR>&gt; <BR>&gt;

public static enum State { INITIALIZED, PROCESSING, COMPLETE, ERROR } <BR>&gt; 
<BR>&gt; <BR>&gt; The following in Resources.classForName(String), which
using the class <BR>&gt; loader, cannot locate the enum that I have specified. 
So how can I tell <BR>&gt; iBatis to use my TypeHandlerCallback for this enum? 
<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Thanks.... <BR>&gt;
<BR>&gt; Chris Mathrusse 
<BR>&gt; christopher.mathrusse@sybase.com <BR>&gt; (925) 236-5553 <BR>&gt;


View raw message