users@jaxb.java.net

Re: create a new nodo

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 8 Jun 2007 19:42:39 +0200

Hi.

I gererate the class, my problem is that I donīt know put I the catalog a
> new
> product. I create a new produd this:
>
> Catalogs mifichero = (Catalogs)u.unmarshal(in);
> //recuperamos la lista de catalogos y productos
>
> List catalogo = mifichero.getCatalog();
> //Aqui aņadimos un producto para el catalogo
>
> ProductTypeImpl nuevoProducto = new ProductTypeImpl();
>
> nuevoProducto.setProductID("C349K7");
> nuevoProducto.setProductName(nomProd);
> nuevoProducto.setPrice(precio);
> nuevoProducto.setVendor(nomEmp);
>
> But now I donīt put th product in the catalog. Could you help me?
> thanks very much


Ask yourself, which objects does the catalogo list contains.
Ask yourself, into which catalog object do you want to put your
nuevoProducto.
Ask yourself, which property of the catalog represents a list of products of
this catalogs.

This is a trivial task, try harder.

Bye.
/lexi