-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to map repeating group in a table to class instances
PostPosted: Fri Dec 01, 2006 11:52 am 
Newbie

Joined: Fri Dec 01, 2006 11:36 am
Posts: 3
Location: Belgium
Hello,

I need to map a (legacy) table containing repeating groups into a oo-oriented class model.

Consider have following sample table CONTAINER with fields :
ID
Seal1
Seal2
Seal3
Color
Material
...

I want to map this information to 3 classes

class Container
{
String containerID;
}

The repeating group needs to be mapped to a normalized class.

class Seal
{
String containerID;
int sequence; // 1, 2, 3...
String seal;
}

We want to map the other fields The other fi
class OtherInfo
{
String containerID;
String InfoKey; // "Color", "Material", ...
String InfoValue;
}


Can I map a field (eg Seal1) towards 1 instance of a class, and set specific values (1,2, 3) to a property of that instance?

Thanks for any assistance.

Regards,

_________________
Luc De Graef


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.