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: PlatformImplBase.store() proposal
Date Wed, 20 Feb 2008 16:41:31 GMT
Hi Rijk,

Mhmm, yes, totally forgot about that one :-)

On Feb 20, 2008 7:17 AM, Rijk van Haaften <r.j.c.vanhaaften@gmail.com> wrote:

> Noticing that PlatformImplBase.store() was not implemented, I'd
> propose and discuss an implementation for it (attached).
> To be discussed:
> 1) I think I need the Database model for the getDynaClassFor call, but
> in order to acommodate that I changed
> protected boolean exists(Connection connection, DynaBean dynaBean)
> to
> protected boolean exists(Connection connection, Database model,
> DynaBean dynaBean)
> What were the thoughts behind the original method signature choice?

Yes, you're right, the exists method would need the database model, as well.

> 2) I'm not sure about exception that should be thrown if exists fails,
> currently:
> catch (SQLException ex)
> {
>     throw new DatabaseOperationException("Error while reading from the
> database", ex);
> }

Look at the fetch method implementation, it does similar things and
you can probably use it as a blueprint for the exists one.


View raw message