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..
|