On 7/20/01 7:46 AM, "Scott Eade" <[EMAIL PROTECTED]> wrote:

> 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.

Sorry, I meant to say that I am updating the sample app in the TDK
so I will add an example for your scenerio.
 
> Cheers,
> 
> Scott
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to