persistence@glassfish.java.net

Fix for issue 400

From: Mitesh Meswani <mitesh.meswani_at_Sun.COM>
Date: Thu, 16 Mar 2006 23:53:39 -0800

Attached code fixes issue 400. I still need to do some work/testing
before I can send this out for final review.

Michael,
As you had suspected, the type information of parameter is not
propagated down to ParamaterExpression. I put together a primitive
mechanism to propagate this information.
-ParameterNode#generateExpression now passes getType() to
builder.getParameter
- Expression.getParameter now takes an extra argument "Object type"
which is passed and stored in ParameterExpression

I consume the type in DB2Platform#writeParameterMarker. I am currently
assuming that type is a Class object and compare it to String.Class to
generate appropriate cast. Questions to you:
What are the possible type that a node can take?
Do you see any possible issues/improvements to the type propagation
mechanism above ?

Thanks,
Mitesh