Jon Stevens <[EMAIL PROTECTED]> writes:

> on 1/17/01 5:37 PM, "John McNally" <[EMAIL PROTECTED]> wrote:
> 
> > I want to chain CriteriaObjects as a way of providing OR functionality
> > without resorting to a Custom Criteria.  Take a look at Leonard's
> > Criterion class in Joist.  I think it might be easier to build up a
> > complex where clause using the pieces directly.  At least it seems
> > easier to me at the outset, I do not want to provide another complete
> > set of addOr methods.
> 
> What is wrong with something like this:
> 
> Criteria.chainCriteriaObject(currentCOToChain, String name, String value)
> or
> Criteria.chainCriteriaObject(currentCOToChain,
> Criteria.createCriteriaObject(name, value))
> 
> Again, this focuses Criteria into providing a view.

Leonard's Criterion object in Joist provides a very elegant way of
representing SQL criterion.  Of note are the constructors and the
toString() method.

http://joist.tigris.org/source/browse/joist/java/org/joist/database/Criterion.java?rev=1&content-type=text/x-cvsweb-markup
-- 

Daniel Rall <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to