Hi David
The version i have is the one that is available as 1.1
i have this in the callSetter method !!!
try {
// Don't call setter if the value object isn't the right type
if (this.isCompatibleType(value, params[0])) {
setter.invoke(target, new Object[] { value });
}
-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 07, 2005 3:49 PM
To: Jakarta Commons Users List; [EMAIL PROTECTED]
Subject: RE: [DBUtils] Oracle Row Processor
--- Henry Voyer <[EMAIL PROTECTED]> wrote:
> Hi
>
> I just created my oracle row processor.
>
> The current implementation of BasicRowProcessor has a method
> that checks if the field is valid :
> private boolean isCompatibleType(Object value, Class type)
>
> This method ignore dates and most important specific JDBC values.
That's not true. The first thing that method checks is if the object is
an instance of the setter method's parameter type. This will handle all
Objects. The rest of the method is only needed for primitive values.
>
> Oracle timestamp is transformed in the jdbc process into a
> oracle.sql.DATE
> object that needs to be transformed into a java.util.date .
>
> So in order to use dates in oracle we need to add the transformation
> process
> in the row processor.
I think the method you're interested in is BeanProcessor.processColumn()
http://jakarta.apache.org/commons/dbutils/xref/org/apache/commons/dbutils/Be
anProcessor.html#378
Notice that if your bean property is a java.sql.Timestamp,
ResultSet.getTimestamp() is called. Oracle will give you a proper
Timestamp object rather than their horrible custom class.
Download a nightly DbUtils build, change your bean property to Timestamp,
and I think you'll find the default implementation works fine.
David
>
> Regards
>
>
>
> -----Original Message-----
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 07, 2005 12:37 PM
> To: Jakarta Commons Users List; [EMAIL PROTECTED]
> Subject: Re: [DBUtils] Oracle Row Processor
>
>
> I'm not quite sure what you mean. Can you be more specific about why
> the
> current implementation doesn't work for Oracle?
>
> Thanks,
> David
>
> --- Henry Voyer <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone
> >
> > Is there a free implementation of an Oracle Row processor ?
> >
> > Where can i find it ?
> >
> > Regards
> >
Get Firefox!
http://www.mozilla.org/firefox/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]