If any one can accomplish the following I would appreciate it.
public class Foo {
A a;
}
public abstract class A {
}
public class B extends A {
}
public class C extends A {
}
<binding>
<mapping name="FooB" class="Foo">
<structure name="B" field="A" choice="true"/>
<structure name="C" field="A" choice="true"/>
</mapping>
</binding>
So that <FooB>...</FooB> results in Foo where A is type B, and
<FooC>...</FooC> results in Foo where A is type C.
I am trying to avoid something like:
public class Foo {
B b;
C c;
}
public abstract class A {
}
public class B extends A {
}
public class C extends A {
}
<binding>
<mapping name="FooA" class="Foo">
<structure name="B" field="B" choice="true"/>
<structure name="C" field="C" choice="true"/>
</mapping>
</binding>
<FooA>...</FooA>
if(fooA.getB() != null) {...}
else if(fooA.getC() != null) {...}
Hope it makes sense. Thanks
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users