This mail did not reach the group so I am resending it...

Date: Wed, 7 Jan 2004 02:27:51 +0500 (GMT)
From: Fasihullah Askiri <[EMAIL PROTECTED]>
Subject: Multiple key search...

Hi..
I have implemented a base class DataObject which encapsulates all the
functions required.. this serves as the base class for each of the class
representing a table in the database.. like findByPrimaryKey, delete..etc
However I want a search function in this base class which can find the
occurence of a string in any of the field in the dataobject.. 
for eg...

class DataObject 
DataObject findByPrimaryKey(Object primaryKey) {
 this.load();
}
etc...


Person extends DataObject..
Person p;
p.findByPrimaryKey("fasihuce"); // Get the details in p
Vector ppl = p.search("fasih"); // Get the vector of all the Persons where
   // the string "fasih"  appears in any of the column.. and this is
   // implemented in the base class like findByPrimaryKey


I could not figure out a way to find out how to query multiple fields
in the base class...

Please help

bye
Fasih

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to