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.
What are you doing??? Look at the example app in the TDK, I was wondering
why you asked for Village documentation in the TDK. The peers to exactly
what you are describing:
Criteria criteria = new Criteria();
Vector entries = RdfPeer.doSelect(criteria);
And you get back a Vector of Rdf objects. You do not have to do
what you are doing. The example app shows you how to use the
peers correctly.
> 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]