Hi Laszlo,
I wanted a way to return a hook entity (GlusterHookEntity) as well as
content of the hook. So had a single procedure getGlusterHookById(id
UUID, includeContent BOOLEAN) but 2 dao methods
getGlusterHook - returns GlusterHookEntity
getGlusterHookContent - returns String (used a RowMapper to get only
content from resultset)
But the second method caused a ClassCastException due to the first
RowMapper being used.
Anyways, this is the patch where I changed the implementation to use
separate sp -
http://gerrit.ovirt.org/#/c/14832/
thanks!
sahina
On 05/17/2013 03:48 PM, Laszlo Hornyak wrote:
Hi Sahina,
Could you share more details what you are trying to do?
A procedure always returns the same structure of data, so maybe it is more simple if you
to return all the data you received from the plpgsql stored procedure and then just use
the data mapped into the beans to build your own data structures.
Laszlo
----- Original Message -----
> From: "Sahina Bose" <sabose(a)redhat.com>
> To: "engine-devel" <engine-devel(a)ovirt.org>
> Sent: Friday, May 17, 2013 11:34:31 AM
> Subject: [Engine-devel] SQL procedure - row mapper
>
> Hi all,
>
> In org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler , there's a
> map maintained for procedure name and SimpleJdbcCall.
>
> If I have the same procedure with different row mappers, this results in
> an error - because the map already contains a mapping for the procedure
> name but with different row mapper.
>
> Do we intend to support calling the same procedure with different
> RowMappers? If so, I can change this class to handle this.
>
> thanks
> sahina
> _______________________________________________
> Engine-devel mailing list
> Engine-devel(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/engine-devel
>