db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: ddlutils: override default return object type
Date Wed, 14 May 2008 02:41:51 GMT
On Tue, May 13, 2008 at 2:57 PM, tyju tiui <jckdnk111@yahoo.com> wrote:

>  I'm curious to know if it is currently possible to override the default return object
for a specific platform.
>  For example, postgres can't deal with JAVA_OBJECT types so I'm serializing the object
to a byte[] and storing the bytes.
>  I simply override the "setObject" method in postgres' platform implementation and it
is seamless.
>  However, when I want to select the object it comes back as a byte[] instead of my original
>  Is there any place I can override in ddlutils to catch the byte[] and convert it back
to an object automagically?

The insert/update/query functionality in DdlUtils is pretty basic
(intentionally). You might be better off using something like jDbi
(http://jdbi.codehaus.org) or similar for that.

That being said, in your case you probably also want to override the
getObjectFromResultSet method in the platform which does sort of the
opposite of setObject.


View raw message