The most easy solution is to use a Object2ByteArray FieldConversion, this will allow to store the criteria objects in VARCHAR columns.
There is a sample for this Conversion in the TestSuite. HTH, Thomas > -----Original Message----- > From: Janssen, Roger [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2003 3:03 PM > To: 'OJB Users List' > Subject: RE: Is there a way to store a Criteria object in database > > > Hi, > > what we did is implementing a wrapper around ojb, implementing our own > query/criteria objects. > > we develop webapps and webapps submit webforms, so for > instance the search > criteria submitted from a searchscreen can be translated to a uri. > > we implemented an object (queryspec) that is able to hold a parsed and > filtered (not all submitted values might be needed/wanted) uri. > > we developed a service able to create queryspecs from submitted uri's > we developed a service able to create queries (our own > implementation) from > queryspecs > our ojb wrapper is able to parse our query object to OJB queries > > we made our queryspec persistent... thus by storing the > queryspecs we are > able to store queries > > really making the criteria/query object persistent is more > complex, because > criteria can be nested... > > this approach might be usefull for webapps... > > roger janssen > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: donderdag 20 maart 2003 14:02 > To: [EMAIL PROTECTED] > Subject: Is there a way to store a Criteria object in database > > > Hello, > > In my project I have Group objects with attributes. > One of the attribute is "criteria". > This attribute is in fact a SQL query. > > class Group > ----------- > String groupName; > String groupType; > String criteria; > > > For the moment I store this SQL query in a String. > > I think that it could be possible to use Query objects to > store my query in > database. > Is it possible? > How can I do that? > How can I store a Query object in database? > > Is anyone has an experience? > > Thanks > Sylvain > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > ************************************************************** > *********** > The information contained in this communication is confidential and is > intended solely for the use of the individual or entity to whom it is > addressed.You should not copy, disclose or distribute this > communication > without the authority of iBanx bv. iBanx bv is neither liable for > the proper and complete transmission of the information has > been maintained > nor that the communication is free of viruses, interceptions > or interference. > > If you are not the intended recipient of this communication > please return > the communication to the sender and delete and destroy all copies. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
