Hi,
I have my object hierarchy that represents a
container which in turn can hold any type of other uder-defined objects. e.g.
the following Container object looks like
public class Container {
private String containerId ;
private Object holderObj ;
public String getContainerId()
{
return containerId
;
}
public void setContainerId(String
id)
{
containerId = id
;
}
public Object getHolderObj()
{
return holderObj ;
}
public void setHolderObj(Object
obj)
{
holderObj = obj;
}
}
I have 2 holder objects (A and B) which are
altogether different in terms of relationship.
In one case when i create Container object, i could
do
container.setHolderObj (A aObject)
whereas in other case, i would be
doing
container.setHolderObj (B bObject)
In such a case how do i define the mapping file for
Container class as there is no explicit reference to either of A or B object in
the Container class. All i know is that Container can contain either of A or B
during the runtime.
Does castor XML support such object structures? Can
anyone share an example for the mapping file in case it's already
supported?
Thanks and regards,
Sumanta

