-->
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.  [ 2 posts ] 
Author Message
 Post subject: How do you recommend to map such a structure?
PostPosted: Thu Apr 22, 2004 7:05 am 
Newbie

Joined: Tue Sep 30, 2003 10:08 am
Posts: 7
Location: Turkey
Hello, I got a question about how to map the following kind of implementation of a strategy pattern...

public Class A {
String property1;
String property2;
Policy property3;
....
}

public interface Policy {
//method definitions...
}

public class PolicyX implements Policy {
String propertyx1;
int propertyx2;
....
}

public class PolicyY implements Policy {
String propertyy1;
....
}

public class PolicyC implements Policy {
//No properties for example, only method implementation...
}

Suppose all declared properties you see above must be persistant... How can I map such kind of a structure, what would you suggest? (An example mapping file and some code would greatly be appreciated..)

Thanks in advance..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 26, 2004 7:04 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
read hibernate reference documentation,
there exist many such easy examples..


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

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.