On 9/7/05, Daniel Perry <[EMAIL PROTECTED]> wrote:
> True.
> 
> Although surely if you're passing an item through the conversion, it
> requires the conversion every time, so the default behaviour *should* never
> happen.  So, checking the extra types should only impact cases where you've
> not used INTEGER.  So, no penalty (except a few more bytes in class file) to
> people using it properly!

You'd still have the instanceof check, even if the check for Integer
is the first one.
There may however be another option. The field conversion obejct is
the same for every time the field is accessed, thus it can store
state. Upon first access in the Sql->Java direction the type returned
by the database could be determined and stored for later usage, thus
saving the cost in subsequent calls.
Could you open an issue in OJB's JIRA
(http://issues.apache.org/jira/browse/OJB) for this ?

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to