ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Bennett" <Jason.Benn...@3nonline.com>
Subject Mapping EnumsSets and EnumMaps
Date Fri, 22 Feb 2008 01:50:01 GMT

I have an unfortunately complicated data structure that I'm trying to
map through iBatis, but alas I'm not making a lot of progress.

I have an object that I'm running validation upon. Each field needs to
be validated for one of several possible problems. The result of this
validation is a collection of fields that have errors, and for each
field a collection of errors for that field. Since I'm using JDK5, I've
chosen to implement these fields and errors as enums, such that I'm
creating a map of fields that have errors, where the key is the field
enum, and the value is an EnumSet of errors.

What I want to configure iBatis to do is to load the complete data
structure when I load my main object. I've read over the documentation
on how to load collections, but iBatis seems to want to make the key
name the column name, when I want the column value to be the key. I'm
also open to changing how I represent the structure, and simply having a
set of objects that contains the field name as a property, with a set of
errors, if this is easier.

Appreciate any and all help.

				jason

Mime
View raw message