You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Manel Clos <ma...@microdisseny.com> on 2008/04/04 10:49:42 UTC

Help mapping an ArrayList derived object

Hi,

I have to map these two objects:

public class LayerNode extends ArrayList<FieldNode> { /* fields omitted */ }
public class FieldNode { /* fields omitted */ }

Automatic reading using Instrospection works right, but then I need to
remove some properties. Trying with the FieldNode class, using the
FieldNode.betwixt file works as expected. Then, when trying to map the
parent class (LayerNode), I get no child objects (FieldNode). I've tried
putting an element tag and set the updater to "add", but it does not help.

I suppose the problem is that the LayerNode class extends and ArrayList
instead of the list being a property, but I need it that way.

Any ideas how to map it?

Thanks in advance!

LayerNode.betwixt:
<?xml version='1.0' encoding='UTF-8' ?>
<info primitiveTypes='attribute'>
<element name='LayerNode'>
<element name='FieldNode' updater='add'/>
<addDefaults/>
</element>
</info>

FieldNode.betwixt:
<?xml version='1.0' encoding='UTF-8' ?>
<info primitiveTypes='attribute'>
<hide property='position'/>
<element name='FieldNode'>
<addDefaults/>
</element>
</info>