From: "Andrea Papotti" <[EMAIL PROTECTED]>
> Vector resultset =
> OrdersPeer.executeQuery(OrdersPeer.createQueryString(criteria));
I just pass my criteria to doSelect(). It works, but I am a
little wary because of the JavaDoc comment at the top of
this method - "Old method for performing a SELECT."
> for (int x=0; x<resultset.size(); x++)
> {
> Record r = (Record)resultset.elementAt(x);
>
> Hashtable h = new Hashtable();
>
> h.put( "Id", r.getValue(1).asString() );
> h.put( "Quantity", r.getValue(2).asString() );
> h.put( "Orderdate", r.getValue(3).asString() );
> h.put( "Arrivedate", r.getValue(4).asString() );
> h.put( "Company", r.getValue(5).asString() );
>
> results.add( h );
> }
It would be great if the either Village code or the torque generated
peer code would provide a nice way of mapping from the selected
columns to an object you defined yourself.
Cheers,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]